run_dump_test replace PROG with DUMPPROG in gas and ld
authorAlan Modra <amodra@gmail.com>
Thu, 13 Sep 2018 09:25:30 +0000 (18:55 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 15 Sep 2018 06:54:18 +0000 (16:24 +0930)
To be compatible with the binutils version, that uses PROG for the
tool under test and DUMPPROG for the dump tool.

gas/
* 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.
ld/
* testsuite/lib/ld-lib.exp (run_dump_test): Replace PROG
with DUMPPROG.

35 files changed:
gas/ChangeLog
gas/testsuite/gas/mips/aent-2.d
gas/testsuite/gas/mips/aent-mdebug-2.d
gas/testsuite/gas/mips/attr-gnu-4-0.d
gas/testsuite/gas/mips/attr-gnu-4-1.d
gas/testsuite/gas/mips/attr-gnu-4-2.d
gas/testsuite/gas/mips/attr-gnu-4-3.d
gas/testsuite/gas/mips/attr-gnu-4-5.d
gas/testsuite/gas/mips/attr-gnu-4-6.d
gas/testsuite/gas/mips/attr-gnu-4-7.d
gas/testsuite/gas/mips/attr-none-double.d
gas/testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d
gas/testsuite/gas/mips/attr-none-o32-fp64.d
gas/testsuite/gas/mips/attr-none-o32-fpxx.d
gas/testsuite/gas/mips/attr-none-single-float.d
gas/testsuite/gas/mips/attr-none-soft-float.d
gas/testsuite/gas/mips/elf-rel27.d
gas/testsuite/gas/mips/loc-swap-2.d
gas/testsuite/gas/mips/loc-swap-3.d
gas/testsuite/gas/mips/loc-swap.d
gas/testsuite/gas/mips/micromips@loc-swap-2.d
gas/testsuite/gas/mips/micromips@loc-swap.d
gas/testsuite/gas/mips/micromips@stabs-symbol-type.d
gas/testsuite/gas/mips/mips16-intermix.d
gas/testsuite/gas/mips/mips16@loc-swap-2.d
gas/testsuite/gas/mips/mips16@loc-swap.d
gas/testsuite/gas/mips/mips16@stabs-symbol-type.d
gas/testsuite/gas/mips/mips16e@loc-swap.d
gas/testsuite/gas/mips/no-odd-spreg.d
gas/testsuite/gas/mips/odd-spreg.d
gas/testsuite/gas/mips/r6-attr-none-double.d
gas/testsuite/gas/mips/stabs-symbol-type.d
gas/testsuite/lib/gas-defs.exp
ld/ChangeLog
ld/testsuite/lib/ld-lib.exp

index 2f1ba9e4ab6b098b9ab79fda88d1c2c354373654..9a1a48b3c2c40f4e91fd074b5fa0db1ef686248a 100644 (file)
@@ -1,3 +1,39 @@
+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,
index 4115919850963f85a975a41e6e8942f29641c8bc..0a4a3133798b753fde38368248cf6f0a954ccb25 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -s
 #name: MIPS .aent directive 2
 #as: -32
index eea4115c449a3e778a1034f58f38b2607632d056..89d07c0a16ad7853d15d9958049cadb01672a3f6 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -s
 #name: MIPS .aent directive with ECOFF debug 2
 #as: -32 -mdebug
index 77280799703d5f64d754df141d21a3b7c4e98aa9..f3ebff3d344ef2264ae7cac78792816048176e65 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -A
 #name: MIPS gnu_attribute 4,0
 
index ee1bc49dd7d96dfcb7499e35c0f5067c5eaa1863..e94ea10388af8e04f5b124b39cf998b7567e1e90 100644 (file)
@@ -1,5 +1,5 @@
 #source: attr-gnu-4-1.s
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -A
 #name: MIPS gnu_attribute 4,1 (double precision)
 
index eb06a1f82b342316d9e28f8f44983fb184882459..6995ec22174b84cee49dc09b6760d156747eb05c 100644 (file)
@@ -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)
 
index ed0be23d08050289df4cce8021add28e68ec4be9..3f18c675c684dafe3c99745e330f310d6c749c48 100644 (file)
@@ -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)
 
index 8ae92d700ce834dba243f70c1981309a155d182b..2c6877229ad6af3b9db83c94fe3a4d71a63882b1 100644 (file)
@@ -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)
 
index cb83ac27b7054bc83d3575f99e4b4ee49d79d357..10627e83561daa72e5349b6267b8a8ed27b0ad0c 100644 (file)
@@ -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)
 
index c01904df163748886f1537051e37c561a32178e2..b7bbb3400b2ea82cccb0f739ac722fda3ba7783e 100644 (file)
@@ -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)
 
index 639bb5348fc3f4f573137a94c07d7ecfaa27f54d..1977e16bc7ed6a7caa39f9b93947322f5f9ab90e 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #source: empty.s
 #readelf: -A
 #name: MIPS infer fpabi (double-precision)
index 65e1517929254bec210f0ab44c454ebfa8e92058..dba02c03eba221e4336b1fb526c4ac0d4b3e723d 100644 (file)
@@ -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)
 
index 90c87988dbaa04e0941837bcec077abf1614d168..567cf43e7a80213310da287fb702506261816d8b 100644 (file)
@@ -1,6 +1,6 @@
 #as: -mfp64 -32
 #source: empty.s
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -A
 #name: MIPS infer fpabi (O32 fp64)
 
index 86d6aa4f2692c97e78332957ae06e357483b7451..28bab75e13b89c5a6104f4cd4b468a7a08645c85 100644 (file)
@@ -1,6 +1,6 @@
 #as: -mfpxx -32
 #source: empty.s
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -A
 #name: MIPS infer fpabi (O32 fpxx)
 
index 9c03a5111c59fdcfac6c64a826e0ff4649162403..abef34ace752e798c36f7a09a04f840db40b657d 100644 (file)
@@ -1,5 +1,5 @@
 #as: -msingle-float
-#PROG: readelf
+#DUMPPROG: readelf
 #source: empty.s
 #readelf: -A
 #name: MIPS infer fpabi (single-precision)
index 0b4cf7a11bf36f737fa2b4687c7d2cc8610e60e5..078fde5df908fbde23ade471f4df74650e061f8b 100644 (file)
@@ -1,5 +1,5 @@
 #as: -msoft-float
-#PROG: readelf
+#DUMPPROG: readelf
 #source: empty.s
 #readelf: -A
 #name: MIPS infer fpabi (soft-precision)
index b3a0648769faabc59a2e419e6951335e379633ad..6a2018384c365075db4e64dab0f5b55054344ec1 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -Wr
 #name: MIPS ELF reloc 27
 #as: -32
index 204b93d5451483fd20bc20dd47dda93d606ec48c..8eb2c1c76e7dc967b78074a9fcbdb164314519cb 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -wl
 #name: MIPS DWARF-2 location information with branch swapping (2)
 #as: -32
index 0610a443f7deeae559765a064cf9f4b36371bb07..595493c8ad0d2f3579d27a265719f43a0313838b 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -wl
 #as: -32
 #name: MIPS DWARF-2 location information with branch swapping (3)
index 48e13ef03a13dcd3de88929e251d3c54160b0224..ef44136c4484284b910bae7f7b3976ce0967d111 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -wl
 #name: MIPS DWARF-2 location information with branch swapping
 #as: -32
index ad96744bef9e0db7dc2eac3ef426e23d8ed20417..7f19ad58b9b69bef50324af710932cb4a2d3e6c4 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -wl
 #name: MIPS DWARF-2 location information with branch swapping (2)
 #as: -32
index a7f07e57bdfe007524348935402393d8e7f84702..972cf5667b373c08eea7102d215cc282d486aa1b 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -wl
 #name: MIPS DWARF-2 location information with branch swapping
 #as: -32
index c93efe5b8f7b85f4138b43293b83dbaa758d061c..2f33129c8d49037ee2e07eff39b74a94846fcec0 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -s
 #name: MIPS .stab symbol type
 #as: -32
index 0242d9c2b61e019f4b992a8def5fdf5b8276712e..4606ce268927811164a1e4b732eca48b0f31d301 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: nm
+#DUMPPROG: nm
 #as: -mips32r2 -32
 #name: MIPS16 intermix
 
index 85beeacf283dc8c8ba432adc1035125dbcab1699..8fd71e5ae7c69b64fa5b60d1a15476d315bc40d1 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -wl
 #name: MIPS DWARF-2 location information with branch swapping (2)
 #as: -32
index cdac1ae8e2122e66564f9a6221be97531479729e..0327e98410b79df4df2dbd329bb5d993709a8b30 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -wl
 #name: MIPS DWARF-2 location information with branch swapping
 #as: -32
index b37aa1ebc00cad50a4eb563c911b458f9d7d9145..04a6cce749b601b557ddaa7e9eb520928302d236 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -s
 #name: MIPS .stab symbol type
 #as: -32
index 973745f0f66ac5a98f2102cbd0c8434be3948481..03d08a2dd65ce471b1a7291c58c75a5f682f62c7 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -wl
 #name: MIPS DWARF-2 location information with branch swapping
 #as: -32
index f33e3a6a422d47e0aad6282c4aa3077e2b7c894c..244938c8ee01026ee36a7a91c4d035ff84197470 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #source: empty.s
 #as: -32 -mno-odd-spreg
 #readelf: -A
index 7f80c2c1bba56c0156cf1a55a2f92e4d58e44231..951c011fb4767ca5c5e518d5d5cd110a28397465 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #source: empty.s
 #as: -32 -modd-spreg
 #readelf: -A
index 2a9fd367185245100804b9655333e49b74687c8c..e9cca558ecd866be7b7d7315e9b703ef9c0f89d1 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #source: empty.s
 #readelf: -A
 #name: MIPS infer fpabi (double-precision)
index 4f8501d952f23f05b1df5eea3b2412655bce6ff2..450ac1f541e9fc9ab6e81d7c67b05ea91eb2f2df 100644 (file)
@@ -1,4 +1,4 @@
-#PROG: readelf
+#DUMPPROG: readelf
 #readelf: -s
 #name: MIPS .stab symbol type
 #as: -32
index 2d7d38eca79805f2df428ef226f18f2d631ddded..fe361357c3f1ff1fa09e90c2d55e91c75ac57de9 100644 (file)
@@ -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] \
index e9d4d0f08cf1827e2f5d3252b14b01ab1eea0784..82127d9dd412133170a7708ae540dae81720d863 100644 (file)
@@ -1,3 +1,8 @@
+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,
index c1ce8ee2f05359dc266d58a11c1ed76d6b1c7821..edf6e93de54268327a65b3f2c8cd01616f44296f 100644 (file)
@@ -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