diff options
35 files changed, 117 insertions, 75 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 2f1ba9e..9a1a48b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,41 @@ 2018-09-15 Alan Modra <amodra@gmail.com> + * testsuite/gas/mips/aent-2.d, + * testsuite/gas/mips/aent-mdebug-2.d, + * testsuite/gas/mips/attr-gnu-4-0.d, + * testsuite/gas/mips/attr-gnu-4-1.d, + * testsuite/gas/mips/attr-gnu-4-2.d, + * testsuite/gas/mips/attr-gnu-4-3.d, + * testsuite/gas/mips/attr-gnu-4-5.d, + * testsuite/gas/mips/attr-gnu-4-6.d, + * testsuite/gas/mips/attr-gnu-4-7.d, + * testsuite/gas/mips/attr-none-double.d, + * testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d, + * testsuite/gas/mips/attr-none-o32-fp64.d, + * testsuite/gas/mips/attr-none-o32-fpxx.d, + * testsuite/gas/mips/attr-none-single-float.d, + * testsuite/gas/mips/attr-none-soft-float.d, + * testsuite/gas/mips/elf-rel27.d, + * testsuite/gas/mips/loc-swap-2.d, + * testsuite/gas/mips/loc-swap-3.d, + * testsuite/gas/mips/loc-swap.d, + * testsuite/gas/mips/micromips@loc-swap-2.d, + * testsuite/gas/mips/micromips@loc-swap.d, + * testsuite/gas/mips/micromips@stabs-symbol-type.d, + * testsuite/gas/mips/mips16-intermix.d, + * testsuite/gas/mips/mips16@loc-swap-2.d, + * testsuite/gas/mips/mips16@loc-swap.d, + * testsuite/gas/mips/mips16@stabs-symbol-type.d, + * testsuite/gas/mips/mips16e@loc-swap.d, + * testsuite/gas/mips/no-odd-spreg.d, + * testsuite/gas/mips/odd-spreg.d, + * testsuite/gas/mips/r6-attr-none-double.d, + * testsuite/gas/mips/stabs-symbol-type.d, + * testsuite/lib/gas-defs.exp (run_dump_test): Replace PROG + with DUMPPROG. + +2018-09-15 Alan Modra <amodra@gmail.com> + * testsuite/gas/elf/symver.d, * testsuite/gas/ft32/insn.d, * testsuite/gas/ft32/insnsc.d, diff --git a/gas/testsuite/gas/mips/aent-2.d b/gas/testsuite/gas/mips/aent-2.d index 4115919..0a4a313 100644 --- a/gas/testsuite/gas/mips/aent-2.d +++ b/gas/testsuite/gas/mips/aent-2.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -s #name: MIPS .aent directive 2 #as: -32 diff --git a/gas/testsuite/gas/mips/aent-mdebug-2.d b/gas/testsuite/gas/mips/aent-mdebug-2.d index eea4115..89d07c0 100644 --- a/gas/testsuite/gas/mips/aent-mdebug-2.d +++ b/gas/testsuite/gas/mips/aent-mdebug-2.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -s #name: MIPS .aent directive with ECOFF debug 2 #as: -32 -mdebug diff --git a/gas/testsuite/gas/mips/attr-gnu-4-0.d b/gas/testsuite/gas/mips/attr-gnu-4-0.d index 7728079..f3ebff3 100644 --- a/gas/testsuite/gas/mips/attr-gnu-4-0.d +++ b/gas/testsuite/gas/mips/attr-gnu-4-0.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS gnu_attribute 4,0 diff --git a/gas/testsuite/gas/mips/attr-gnu-4-1.d b/gas/testsuite/gas/mips/attr-gnu-4-1.d index ee1bc49..e94ea10 100644 --- a/gas/testsuite/gas/mips/attr-gnu-4-1.d +++ b/gas/testsuite/gas/mips/attr-gnu-4-1.d @@ -1,5 +1,5 @@ #source: attr-gnu-4-1.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS gnu_attribute 4,1 (double precision) diff --git a/gas/testsuite/gas/mips/attr-gnu-4-2.d b/gas/testsuite/gas/mips/attr-gnu-4-2.d index eb06a1f..6995ec2 100644 --- a/gas/testsuite/gas/mips/attr-gnu-4-2.d +++ b/gas/testsuite/gas/mips/attr-gnu-4-2.d @@ -1,6 +1,6 @@ #source: attr-gnu-4-2.s #as: -msingle-float -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS gnu_attribute 4,2 (single precision) diff --git a/gas/testsuite/gas/mips/attr-gnu-4-3.d b/gas/testsuite/gas/mips/attr-gnu-4-3.d index ed0be23..3f18c67 100644 --- a/gas/testsuite/gas/mips/attr-gnu-4-3.d +++ b/gas/testsuite/gas/mips/attr-gnu-4-3.d @@ -1,6 +1,6 @@ #as: -msoft-float #source: attr-gnu-4-3.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS gnu_attribute 4,3 (-msoft-float) diff --git a/gas/testsuite/gas/mips/attr-gnu-4-5.d b/gas/testsuite/gas/mips/attr-gnu-4-5.d index 8ae92d7..2c68772 100644 --- a/gas/testsuite/gas/mips/attr-gnu-4-5.d +++ b/gas/testsuite/gas/mips/attr-gnu-4-5.d @@ -1,6 +1,6 @@ #as: -32 -mfpxx #source: attr-gnu-4-5.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS gnu_attribute 4,5 (-mfpxx) diff --git a/gas/testsuite/gas/mips/attr-gnu-4-6.d b/gas/testsuite/gas/mips/attr-gnu-4-6.d index cb83ac2..10627e8 100644 --- a/gas/testsuite/gas/mips/attr-gnu-4-6.d +++ b/gas/testsuite/gas/mips/attr-gnu-4-6.d @@ -1,6 +1,6 @@ #as: -32 #source: attr-gnu-4-6.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS gnu_attribute 4,6 (-mfp64) diff --git a/gas/testsuite/gas/mips/attr-gnu-4-7.d b/gas/testsuite/gas/mips/attr-gnu-4-7.d index c01904d..b7bbb34 100644 --- a/gas/testsuite/gas/mips/attr-gnu-4-7.d +++ b/gas/testsuite/gas/mips/attr-gnu-4-7.d @@ -1,6 +1,6 @@ #as: -32 #source: attr-gnu-4-7.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS gnu_attribute 4,7 (-mfp64 -mno-odd-spreg) diff --git a/gas/testsuite/gas/mips/attr-none-double.d b/gas/testsuite/gas/mips/attr-none-double.d index 639bb53..1977e16 100644 --- a/gas/testsuite/gas/mips/attr-none-double.d +++ b/gas/testsuite/gas/mips/attr-none-double.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #source: empty.s #readelf: -A #name: MIPS infer fpabi (double-precision) diff --git a/gas/testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d b/gas/testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d index 65e15179..dba02c0 100644 --- a/gas/testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d +++ b/gas/testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d @@ -1,6 +1,6 @@ #as: -mfp64 -mno-odd-spreg -32 #source: empty.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS infer fpabi (O32 fp64 nooddspreg) diff --git a/gas/testsuite/gas/mips/attr-none-o32-fp64.d b/gas/testsuite/gas/mips/attr-none-o32-fp64.d index 90c8798..567cf43 100644 --- a/gas/testsuite/gas/mips/attr-none-o32-fp64.d +++ b/gas/testsuite/gas/mips/attr-none-o32-fp64.d @@ -1,6 +1,6 @@ #as: -mfp64 -32 #source: empty.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS infer fpabi (O32 fp64) diff --git a/gas/testsuite/gas/mips/attr-none-o32-fpxx.d b/gas/testsuite/gas/mips/attr-none-o32-fpxx.d index 86d6aa4..28bab75 100644 --- a/gas/testsuite/gas/mips/attr-none-o32-fpxx.d +++ b/gas/testsuite/gas/mips/attr-none-o32-fpxx.d @@ -1,6 +1,6 @@ #as: -mfpxx -32 #source: empty.s -#PROG: readelf +#DUMPPROG: readelf #readelf: -A #name: MIPS infer fpabi (O32 fpxx) diff --git a/gas/testsuite/gas/mips/attr-none-single-float.d b/gas/testsuite/gas/mips/attr-none-single-float.d index 9c03a51..abef34a 100644 --- a/gas/testsuite/gas/mips/attr-none-single-float.d +++ b/gas/testsuite/gas/mips/attr-none-single-float.d @@ -1,5 +1,5 @@ #as: -msingle-float -#PROG: readelf +#DUMPPROG: readelf #source: empty.s #readelf: -A #name: MIPS infer fpabi (single-precision) diff --git a/gas/testsuite/gas/mips/attr-none-soft-float.d b/gas/testsuite/gas/mips/attr-none-soft-float.d index 0b4cf7a..078fde5 100644 --- a/gas/testsuite/gas/mips/attr-none-soft-float.d +++ b/gas/testsuite/gas/mips/attr-none-soft-float.d @@ -1,5 +1,5 @@ #as: -msoft-float -#PROG: readelf +#DUMPPROG: readelf #source: empty.s #readelf: -A #name: MIPS infer fpabi (soft-precision) diff --git a/gas/testsuite/gas/mips/elf-rel27.d b/gas/testsuite/gas/mips/elf-rel27.d index b3a0648..6a20183 100644 --- a/gas/testsuite/gas/mips/elf-rel27.d +++ b/gas/testsuite/gas/mips/elf-rel27.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -Wr #name: MIPS ELF reloc 27 #as: -32 diff --git a/gas/testsuite/gas/mips/loc-swap-2.d b/gas/testsuite/gas/mips/loc-swap-2.d index 204b93d..8eb2c1c 100644 --- a/gas/testsuite/gas/mips/loc-swap-2.d +++ b/gas/testsuite/gas/mips/loc-swap-2.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #name: MIPS DWARF-2 location information with branch swapping (2) #as: -32 diff --git a/gas/testsuite/gas/mips/loc-swap-3.d b/gas/testsuite/gas/mips/loc-swap-3.d index 0610a44..595493c 100644 --- a/gas/testsuite/gas/mips/loc-swap-3.d +++ b/gas/testsuite/gas/mips/loc-swap-3.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #as: -32 #name: MIPS DWARF-2 location information with branch swapping (3) diff --git a/gas/testsuite/gas/mips/loc-swap.d b/gas/testsuite/gas/mips/loc-swap.d index 48e13ef..ef44136 100644 --- a/gas/testsuite/gas/mips/loc-swap.d +++ b/gas/testsuite/gas/mips/loc-swap.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #name: MIPS DWARF-2 location information with branch swapping #as: -32 diff --git a/gas/testsuite/gas/mips/micromips@loc-swap-2.d b/gas/testsuite/gas/mips/micromips@loc-swap-2.d index ad96744..7f19ad5 100644 --- a/gas/testsuite/gas/mips/micromips@loc-swap-2.d +++ b/gas/testsuite/gas/mips/micromips@loc-swap-2.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #name: MIPS DWARF-2 location information with branch swapping (2) #as: -32 diff --git a/gas/testsuite/gas/mips/micromips@loc-swap.d b/gas/testsuite/gas/mips/micromips@loc-swap.d index a7f07e5..972cf56 100644 --- a/gas/testsuite/gas/mips/micromips@loc-swap.d +++ b/gas/testsuite/gas/mips/micromips@loc-swap.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #name: MIPS DWARF-2 location information with branch swapping #as: -32 diff --git a/gas/testsuite/gas/mips/micromips@stabs-symbol-type.d b/gas/testsuite/gas/mips/micromips@stabs-symbol-type.d index c93efe5..2f33129 100644 --- a/gas/testsuite/gas/mips/micromips@stabs-symbol-type.d +++ b/gas/testsuite/gas/mips/micromips@stabs-symbol-type.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -s #name: MIPS .stab symbol type #as: -32 diff --git a/gas/testsuite/gas/mips/mips16-intermix.d b/gas/testsuite/gas/mips/mips16-intermix.d index 0242d9c..4606ce2 100644 --- a/gas/testsuite/gas/mips/mips16-intermix.d +++ b/gas/testsuite/gas/mips/mips16-intermix.d @@ -1,4 +1,4 @@ -#PROG: nm +#DUMPPROG: nm #as: -mips32r2 -32 #name: MIPS16 intermix diff --git a/gas/testsuite/gas/mips/mips16@loc-swap-2.d b/gas/testsuite/gas/mips/mips16@loc-swap-2.d index 85beeac..8fd71e5 100644 --- a/gas/testsuite/gas/mips/mips16@loc-swap-2.d +++ b/gas/testsuite/gas/mips/mips16@loc-swap-2.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #name: MIPS DWARF-2 location information with branch swapping (2) #as: -32 diff --git a/gas/testsuite/gas/mips/mips16@loc-swap.d b/gas/testsuite/gas/mips/mips16@loc-swap.d index cdac1ae..0327e98 100644 --- a/gas/testsuite/gas/mips/mips16@loc-swap.d +++ b/gas/testsuite/gas/mips/mips16@loc-swap.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #name: MIPS DWARF-2 location information with branch swapping #as: -32 diff --git a/gas/testsuite/gas/mips/mips16@stabs-symbol-type.d b/gas/testsuite/gas/mips/mips16@stabs-symbol-type.d index b37aa1e..04a6cce 100644 --- a/gas/testsuite/gas/mips/mips16@stabs-symbol-type.d +++ b/gas/testsuite/gas/mips/mips16@stabs-symbol-type.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -s #name: MIPS .stab symbol type #as: -32 diff --git a/gas/testsuite/gas/mips/mips16e@loc-swap.d b/gas/testsuite/gas/mips/mips16e@loc-swap.d index 973745f..03d08a2 100644 --- a/gas/testsuite/gas/mips/mips16e@loc-swap.d +++ b/gas/testsuite/gas/mips/mips16e@loc-swap.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -wl #name: MIPS DWARF-2 location information with branch swapping #as: -32 diff --git a/gas/testsuite/gas/mips/no-odd-spreg.d b/gas/testsuite/gas/mips/no-odd-spreg.d index f33e3a6..244938c 100644 --- a/gas/testsuite/gas/mips/no-odd-spreg.d +++ b/gas/testsuite/gas/mips/no-odd-spreg.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #source: empty.s #as: -32 -mno-odd-spreg #readelf: -A diff --git a/gas/testsuite/gas/mips/odd-spreg.d b/gas/testsuite/gas/mips/odd-spreg.d index 7f80c2c..951c011 100644 --- a/gas/testsuite/gas/mips/odd-spreg.d +++ b/gas/testsuite/gas/mips/odd-spreg.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #source: empty.s #as: -32 -modd-spreg #readelf: -A diff --git a/gas/testsuite/gas/mips/r6-attr-none-double.d b/gas/testsuite/gas/mips/r6-attr-none-double.d index 2a9fd36..e9cca55 100644 --- a/gas/testsuite/gas/mips/r6-attr-none-double.d +++ b/gas/testsuite/gas/mips/r6-attr-none-double.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #source: empty.s #readelf: -A #name: MIPS infer fpabi (double-precision) diff --git a/gas/testsuite/gas/mips/stabs-symbol-type.d b/gas/testsuite/gas/mips/stabs-symbol-type.d index 4f8501d..450ac1f 100644 --- a/gas/testsuite/gas/mips/stabs-symbol-type.d +++ b/gas/testsuite/gas/mips/stabs-symbol-type.d @@ -1,4 +1,4 @@ -#PROG: readelf +#DUMPPROG: readelf #readelf: -s #name: MIPS .stab symbol type #as: -32 diff --git a/gas/testsuite/lib/gas-defs.exp b/gas/testsuite/lib/gas-defs.exp index 2d7d38e..fe36135 100644 --- a/gas/testsuite/lib/gas-defs.exp +++ b/gas/testsuite/lib/gas-defs.exp @@ -365,7 +365,7 @@ proc run_dump_tests { testcases {extra_options {}} } { # FLAGS, in addition to the .o file name. Note that they are run # with LC_ALL=C in the environment to give consistent sorting # of symbols. If no FLAGS are needed then use: -# PROG: [nm objdump readelf addr2line] +# DUMPPROG: [nm objdump readelf addr2line] # instead. # Note: for objdump, we automatically replaces the standard section # names (.text, .data and .bss) by target ones if any (eg. rx-elf @@ -413,7 +413,7 @@ proc run_dump_tests { testcases {extra_options {}} } { # # error: REGEX # An error with message matching REGEX must be emitted for the test -# to pass. The PROG, addr2line, nm, objdump, and readelf options +# to pass. The DUMPPROG, addr2line, nm, objdump, and readelf options # have no meaning and need not supplied if this is present. # # warning: REGEX @@ -423,11 +423,11 @@ proc run_dump_tests { testcases {extra_options {}} } { # warning_output: FILE # FILE contains regexp lines to be matched against the diagnostic # output of the assembler. This does not preclude the use of -# PROG, addr2line, nm, objdump, or readelf. +# DUMPPROG, addr2line, nm, objdump, or readelf. # # error_output: FILE # Means the same as 'warning_output', but also indicates that the assembler -# is expected to exit unsuccessfully (therefore PROG, addr2line, nm, +# is expected to exit unsuccessfully (therefore DUMPPROG, addr2line, nm, # objdump, and readelf have no meaning and should not be supplied). # # section-subst: no @@ -466,7 +466,7 @@ proc run_dump_test { name {extra_options {}} } { set opts(nm) {} set opts(readelf) {} set opts(name) {} - set opts(PROG) {} + set opts(DUMPPROG) {} set opts(source) {} set opts(dump) {} set opts(warning_output) {} @@ -535,18 +535,18 @@ proc run_dump_test { name {extra_options {}} } { set opts(warning_output) $opts(error_output) } - set program "" + set dumpprogram "" # It's meaningless to require an output-testing method when we # expect an error. if { $opts(error) == "" && $opts(error_output) == "" } { - if {$opts(PROG) != ""} { - switch -- $opts(PROG) { - addr2line { set program addr2line } - objdump { set program objdump } - nm { set program nm } - readelf { set program readelf } + if {$opts(DUMPPROG) != ""} { + switch -- $opts(DUMPPROG) { + addr2line { set dumpprogram addr2line } + objdump { set dumpprogram objdump } + nm { set dumpprogram nm } + readelf { set dumpprogram readelf } default { - perror "unrecognized program option $opts(PROG) in $file.d" + perror "unrecognized DUMPPROG option $opts(DUMPPROG) in $file.d" unresolved $testname return } } @@ -554,17 +554,17 @@ proc run_dump_test { name {extra_options {}} } { # Guess which program to run, by seeing which option was specified. foreach p {objdump nm readelf addr2line} { if {$opts($p) != ""} { - if {$program != ""} { + if {$dumpprogram != ""} { perror "ambiguous dump program in $file.d" unresolved $testname return } else { - set program $p + set dumpprogram $p } } } } - if { $program == "" && $opts(warning) == "" } { + if { $dumpprogram == "" && $opts(warning) == "" } { perror "dump program unspecified in $file.d" unresolved $testname return @@ -670,7 +670,7 @@ proc run_dump_test { name {extra_options {}} } { && (($cmdret == 0) == ($opts(warning) != "")) } { # We have the expected output from gas. # Return if there's nothing more to do. - if { $opts(error) != "" || $program == "" } { + if { $opts(error) != "" || $dumpprogram == "" } { pass $testname return } @@ -714,12 +714,12 @@ proc run_dump_test { name {extra_options {}} } { } } - if { $program == "" } { + if { $dumpprogram == "" } { return } - set progopts1 $opts($program) - eval set progopts \$[string toupper $program]FLAGS - eval set binary \$[string toupper $program] + set progopts1 $opts($dumpprogram) + eval set progopts \$[string toupper $dumpprogram]FLAGS + eval set binary \$[string toupper $dumpprogram] if { ![is_remote host] && [which $binary] == 0 } { untested $testname @@ -729,7 +729,7 @@ proc run_dump_test { name {extra_options {}} } { # For objdump, automatically translate standard section names to the targets one, # if they are different. set sect_names [get_standard_section_names] - if { $sect_names != "" && $program == "objdump" && $opts(section-subst) == ""} { + if { $sect_names != "" && $dumpprogram == "objdump" && $opts(section-subst) == ""} { regsub -- "-j \\.text" $progopts1 "-j [lindex $sect_names 0]" progopts1 regsub -- "-j \\.data" $progopts1 "-j [lindex $sect_names 1]" progopts1 regsub -- "-j \\.bss" $progopts1 "-j [lindex $sect_names 2]" progopts1 @@ -751,7 +751,7 @@ proc run_dump_test { name {extra_options {}} } { } # Create the substition list only for objdump reference. - if { $sect_names != "" && $program == "objdump" } { + if { $sect_names != "" && $dumpprogram == "objdump" } { # Some testcases use ".text" while others use "\.text". set regexp_subst [list "\\\\?\\.text" [lindex $sect_names 0] \ "\\\\?\\.data" [lindex $sect_names 1] \ diff --git a/ld/ChangeLog b/ld/ChangeLog index e9d4d0f..82127d9 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,10 @@ 2018-09-15 Alan Modra <amodra@gmail.com> + * testsuite/lib/ld-lib.exp (run_dump_test): Replace PROG + with DUMPPROG. + +2018-09-15 Alan Modra <amodra@gmail.com> + * testsuite/ld-elf/interleave-0.d, * testsuite/ld-elf/interleave-4.d: Don't objcopy to srec, objdump instead. diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index c1ce8ee..edf6e93 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -502,7 +502,7 @@ proc ld_link_defsyms {} { # result is analyzed by an analyzer program specified below (which # may in turn *also* be objcopy). # -# PROG: PROGRAM-NAME +# DUMPPROG: PROGRAM-NAME # The name of the program to run to analyze the .o file produced # by the assembler or the linker output. This can be omitted; # run_dump_test will guess which program to run by seeing which of @@ -567,7 +567,7 @@ proc ld_link_defsyms {} { # # error: REGEX # An error with message matching REGEX must be emitted for the test -# to pass. The PROG, readelf, objdump, and nm options have +# to pass. The DUMPPROG, readelf, objdump, and nm options have # no meaning and need not be supplied if this is present. Multiple # "error" directives append to the expected linker error message. # @@ -648,7 +648,7 @@ proc run_dump_test { name {extra_options {}} } { set opts(nm) {} set opts(readelf) {} set opts(name) {} - set opts(PROG) {} + set opts(DUMPPROG) {} set opts(source) {} set opts(dump) {} set opts(error) {} @@ -815,35 +815,36 @@ proc run_dump_test { name {extra_options {}} } { } } - set program "" + set dumpprogram "" # It's meaningless to require an output-testing method when we # expect an error. if { $opts(error) == "" && $opts(error_output) == "" } { - if {$opts(PROG) != ""} { - switch -- $opts(PROG) { - objdump { set program objdump } - nm { set program nm } - readelf { set program readelf } - default - { perror "unrecognized program option $opts(PROG) in $file.d" - unresolved $testname - return } + if { $opts(DUMPPROG) != "" } { + switch -- $opts(DUMPPROG) { + objdump { set dumpprogram objdump } + nm { set dumpprogram nm } + readelf { set dumpprogram readelf } + default { + perror "unrecognized DUMPPROG option $opts(DUMPPROG) in $file.d" + unresolved $testname + return + } } } else { # Guess which program to run, by seeing which option was specified. foreach p {objdump nm readelf} { if {$opts($p) != ""} { - if {$program != ""} { + if {$dumpprogram != ""} { perror "ambiguous dump program in $file.d" unresolved $testname return } else { - set program $p + set dumpprogram $p } } } } - if { $program == "" \ + if { $dumpprogram == "" \ && $opts(map) == "" \ && $opts(warning) == "" \ && $opts(warning_output) == "" \ @@ -1056,7 +1057,7 @@ proc run_dump_test { name {extra_options {}} } { || (($check_ld(source) == "file") \ && (![regexp_diff "tmpdir/ld.messages" "$srcdir/$subdir/$check_ld(file)"]))) } { # We have the expected output from ld. - if { $check_ld(terminal) || $program == "" } { + if { $check_ld(terminal) || $dumpprogram == "" } { pass $testname return } @@ -1076,7 +1077,7 @@ proc run_dump_test { name {extra_options {}} } { pass "$testname (map file check)" } - if { $program == "" } then { + if { $dumpprogram == "" } then { return } } @@ -1090,9 +1091,9 @@ proc run_dump_test { name {extra_options {}} } { return } - set progopts1 $opts($program) - eval set progopts \$[string toupper $program]FLAGS - eval set binary \$[string toupper $program] + set progopts1 $opts($dumpprogram) + eval set progopts \$[string toupper $dumpprogram]FLAGS + eval set binary \$[string toupper $dumpprogram] if { ![is_remote host] && [which $binary] == 0 } { untested $testname |