mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
* lib/ld-lib.exp (default_ld_nm): Run nm with LC_ALL=C to ensure
consistent sorting. (run_dump_test): Likewise for objdump/nm/objcopy/readelf. * ld-sh/sh64/sh64.exp (run_ld_link_tests): Likewise.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2002-07-03 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* lib/ld-lib.exp (default_ld_nm): Run nm with LC_ALL=C to ensure
|
||||||
|
consistent sorting.
|
||||||
|
(run_dump_test): Likewise for objdump/nm/objcopy/readelf.
|
||||||
|
* ld-sh/sh64/sh64.exp (run_ld_link_tests): Likewise.
|
||||||
|
|
||||||
2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
|
2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
|
||||||
|
|
||||||
* ld-mmix/sec-8m.d, ld-mmix/sec-8m.s, ld-mmix/sec-8a.s,
|
* ld-mmix/sec-8m.d, ld-mmix/sec-8m.s, ld-mmix/sec-8a.s,
|
||||||
|
@ -132,6 +132,7 @@ proc run_ld_link_tests { ldtests } {
|
|||||||
global readelf
|
global readelf
|
||||||
global srcdir
|
global srcdir
|
||||||
global subdir
|
global subdir
|
||||||
|
global env
|
||||||
|
|
||||||
set binfile "tmpdir/linked"
|
set binfile "tmpdir/linked"
|
||||||
|
|
||||||
@ -199,8 +200,19 @@ proc run_ld_link_tests { ldtests } {
|
|||||||
set dumpfile [lindex $actionlist 2]
|
set dumpfile [lindex $actionlist 2]
|
||||||
set binary $dump_prog
|
set binary $dump_prog
|
||||||
|
|
||||||
send_log "$binary $progopts $binfile > dump.out\n"
|
# Ensure consistent sorting of symbols
|
||||||
catch "exec $binary $progopts $binfile > dump.out" comp_output
|
if {[info exists env(LC_ALL)]} {
|
||||||
|
set old_lc_all $env(LC_ALL)
|
||||||
|
}
|
||||||
|
set env(LC_ALL) "C"
|
||||||
|
set cmd "$binary $progopts $binfile > dump.out"
|
||||||
|
send_log "$cmd\n"
|
||||||
|
catch "exec $cmd" comp_output
|
||||||
|
if {[info exists old_lc_all]} {
|
||||||
|
set env(LC_ALL) $old_lc_all
|
||||||
|
} else {
|
||||||
|
unset env(LC_ALL)
|
||||||
|
}
|
||||||
set comp_output [prune_warnings $comp_output]
|
set comp_output [prune_warnings $comp_output]
|
||||||
|
|
||||||
if ![string match "" $comp_output] then {
|
if ![string match "" $comp_output] then {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Support routines for LD testsuite.
|
# Support routines for LD testsuite.
|
||||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; you can redistribute it and/or modify
|
# This file is free software; you can redistribute it and/or modify
|
||||||
@ -299,9 +299,19 @@ proc default_ld_nm { nm nmflags object } {
|
|||||||
|
|
||||||
if ![info exists NMFLAGS] { set NMFLAGS "" }
|
if ![info exists NMFLAGS] { set NMFLAGS "" }
|
||||||
|
|
||||||
|
# Ensure consistent sorting of symbols
|
||||||
|
if {[info exists env(LC_ALL)]} {
|
||||||
|
set old_lc_all $env(LC_ALL)
|
||||||
|
}
|
||||||
|
set env(LC_ALL) "C"
|
||||||
verbose -log "$nm $NMFLAGS $nmflags $object >tmpdir/nm.out"
|
verbose -log "$nm $NMFLAGS $nmflags $object >tmpdir/nm.out"
|
||||||
|
|
||||||
catch "exec $nm $NMFLAGS $nmflags $object >tmpdir/nm.out" exec_output
|
catch "exec $nm $NMFLAGS $nmflags $object >tmpdir/nm.out" exec_output
|
||||||
|
if {[info exists old_lc_all]} {
|
||||||
|
set env(LC_ALL) $old_lc_all
|
||||||
|
} else {
|
||||||
|
unset env(LC_ALL)
|
||||||
|
}
|
||||||
set exec_output [prune_warnings $exec_output]
|
set exec_output [prune_warnings $exec_output]
|
||||||
if [string match "" $exec_output] then {
|
if [string match "" $exec_output] then {
|
||||||
set file [open tmpdir/nm.out r]
|
set file [open tmpdir/nm.out r]
|
||||||
@ -474,6 +484,8 @@ proc simple_diff { file_1 file_2 } {
|
|||||||
# objcopy: FLAGS
|
# objcopy: FLAGS
|
||||||
# Use the specified program to analyze the assembler or linker
|
# Use the specified program to analyze the assembler or linker
|
||||||
# output file, and pass it FLAGS, in addition to the output name.
|
# output file, and pass it FLAGS, in addition to the output name.
|
||||||
|
# Note that they are run with LC_ALL=C in the environment to give
|
||||||
|
# consistent sorting of symbols.
|
||||||
#
|
#
|
||||||
# source: SOURCE [FLAGS]
|
# source: SOURCE [FLAGS]
|
||||||
# Assemble the file SOURCE.s using the flags in the "as" directive
|
# Assemble the file SOURCE.s using the flags in the "as" directive
|
||||||
@ -512,6 +524,7 @@ proc run_dump_test { name } {
|
|||||||
global OBJDUMP NM AS OBJCOPY READELF LD
|
global OBJDUMP NM AS OBJCOPY READELF LD
|
||||||
global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS READELFFLAGS LDFLAGS
|
global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS READELFFLAGS LDFLAGS
|
||||||
global host_triplet runtests
|
global host_triplet runtests
|
||||||
|
global env
|
||||||
|
|
||||||
if [string match "*/*" $name] {
|
if [string match "*/*" $name] {
|
||||||
set file $name
|
set file $name
|
||||||
@ -778,27 +791,29 @@ proc run_dump_test { name } {
|
|||||||
|
|
||||||
# Objcopy, unlike the other two, won't send its output to stdout,
|
# Objcopy, unlike the other two, won't send its output to stdout,
|
||||||
# so we have to run it specially.
|
# so we have to run it specially.
|
||||||
|
set cmd "$binary $progopts $progopts1 $objfile > $dumpfile"
|
||||||
if { $program == "objcopy" } {
|
if { $program == "objcopy" } {
|
||||||
set cmd "$binary $progopts $progopts1 $objfile $dumpfile"
|
set cmd "$binary $progopts $progopts1 $objfile $dumpfile"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ensure consistent sorting of symbols
|
||||||
|
if {[info exists env(LC_ALL)]} {
|
||||||
|
set old_lc_all $env(LC_ALL)
|
||||||
|
}
|
||||||
|
set env(LC_ALL) "C"
|
||||||
send_log "$cmd\n"
|
send_log "$cmd\n"
|
||||||
catch "exec $cmd" comp_output
|
catch "exec $cmd" comp_output
|
||||||
set comp_output [prune_warnings $comp_output]
|
if {[info exists old_lc_all]} {
|
||||||
if ![string match "" $comp_output] then {
|
set env(LC_ALL) $old_lc_all
|
||||||
send_log "$comp_output\n"
|
|
||||||
fail $testname
|
|
||||||
return
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
set cmd "$binary $progopts $progopts1 $objfile > $dumpfile"
|
unset env(LC_ALL)
|
||||||
send_log "$cmd\n"
|
}
|
||||||
catch "exec $cmd" comp_output
|
|
||||||
set comp_output [prune_warnings $comp_output]
|
set comp_output [prune_warnings $comp_output]
|
||||||
if ![string match "" $comp_output] then {
|
if ![string match "" $comp_output] then {
|
||||||
send_log "$comp_output\n"
|
send_log "$comp_output\n"
|
||||||
fail $testname
|
fail $testname
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
verbose_eval {[file_contents $dumpfile]} 3
|
verbose_eval {[file_contents $dumpfile]} 3
|
||||||
if { [regexp_diff $dumpfile "${file}.d"] } then {
|
if { [regexp_diff $dumpfile "${file}.d"] } then {
|
||||||
|
Reference in New Issue
Block a user