+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,
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -s
#name: MIPS .aent directive 2
#as: -32
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -s
#name: MIPS .aent directive with ECOFF debug 2
#as: -32 -mdebug
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -A
#name: MIPS gnu_attribute 4,0
#source: attr-gnu-4-1.s
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -A
#name: MIPS gnu_attribute 4,1 (double precision)
#source: attr-gnu-4-2.s
#as: -msingle-float
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -A
#name: MIPS gnu_attribute 4,2 (single precision)
#as: -msoft-float
#source: attr-gnu-4-3.s
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -A
#name: MIPS gnu_attribute 4,3 (-msoft-float)
#as: -32 -mfpxx
#source: attr-gnu-4-5.s
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -A
#name: MIPS gnu_attribute 4,5 (-mfpxx)
#as: -32
#source: attr-gnu-4-6.s
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -A
#name: MIPS gnu_attribute 4,6 (-mfp64)
#as: -32
#source: attr-gnu-4-7.s
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -A
#name: MIPS gnu_attribute 4,7 (-mfp64 -mno-odd-spreg)
-#PROG: readelf
+#DUMPPROG: readelf
#source: empty.s
#readelf: -A
#name: MIPS infer fpabi (double-precision)
#as: -mfp64 -mno-odd-spreg -32
#source: empty.s
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -A
#name: MIPS infer fpabi (O32 fp64 nooddspreg)
#as: -mfp64 -32
#source: empty.s
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -A
#name: MIPS infer fpabi (O32 fp64)
#as: -mfpxx -32
#source: empty.s
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -A
#name: MIPS infer fpabi (O32 fpxx)
#as: -msingle-float
-#PROG: readelf
+#DUMPPROG: readelf
#source: empty.s
#readelf: -A
#name: MIPS infer fpabi (single-precision)
#as: -msoft-float
-#PROG: readelf
+#DUMPPROG: readelf
#source: empty.s
#readelf: -A
#name: MIPS infer fpabi (soft-precision)
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -Wr
#name: MIPS ELF reloc 27
#as: -32
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -wl
#name: MIPS DWARF-2 location information with branch swapping (2)
#as: -32
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -wl
#as: -32
#name: MIPS DWARF-2 location information with branch swapping (3)
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -wl
#name: MIPS DWARF-2 location information with branch swapping
#as: -32
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -wl
#name: MIPS DWARF-2 location information with branch swapping (2)
#as: -32
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -wl
#name: MIPS DWARF-2 location information with branch swapping
#as: -32
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -s
#name: MIPS .stab symbol type
#as: -32
-#PROG: nm
+#DUMPPROG: nm
#as: -mips32r2 -32
#name: MIPS16 intermix
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -wl
#name: MIPS DWARF-2 location information with branch swapping (2)
#as: -32
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -wl
#name: MIPS DWARF-2 location information with branch swapping
#as: -32
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -s
#name: MIPS .stab symbol type
#as: -32
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -wl
#name: MIPS DWARF-2 location information with branch swapping
#as: -32
-#PROG: readelf
+#DUMPPROG: readelf
#source: empty.s
#as: -32 -mno-odd-spreg
#readelf: -A
-#PROG: readelf
+#DUMPPROG: readelf
#source: empty.s
#as: -32 -modd-spreg
#readelf: -A
-#PROG: readelf
+#DUMPPROG: readelf
#source: empty.s
#readelf: -A
#name: MIPS infer fpabi (double-precision)
-#PROG: readelf
+#DUMPPROG: readelf
#readelf: -s
#name: MIPS .stab symbol type
#as: -32
# 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
#
# 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
# 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
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) {}
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 }
}
# 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
&& (($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
}
}
}
- 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
# 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
}
# 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] \
+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,
# 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
#
# 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.
#
set opts(nm) {}
set opts(readelf) {}
set opts(name) {}
- set opts(PROG) {}
+ set opts(DUMPPROG) {}
set opts(source) {}
set opts(dump) {}
set opts(error) {}
}
}
- 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) == "" \
|| (($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
}
pass "$testname (map file check)"
}
- if { $program == "" } then {
+ if { $dumpprogram == "" } then {
return
}
}
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