aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite/lib
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-06-22 14:42:26 +0100
committerNick Clifton <nickc@redhat.com>2016-06-22 14:42:26 +0100
commit96037eb0b8c22e0b080863362bee4a4f6fc476ed (patch)
tree4d69ede78b95060a6a049cfeca9668b676fb61a6 /binutils/testsuite/lib
parent6b1edb94fedc7103b4929354d27304d0bd756f49 (diff)
downloadgdb-96037eb0b8c22e0b080863362bee4a4f6fc476ed.zip
gdb-96037eb0b8c22e0b080863362bee4a4f6fc476ed.tar.gz
gdb-96037eb0b8c22e0b080863362bee4a4f6fc476ed.tar.bz2
Fix various binutils testsuite failures.
* testsuite/binutils-all/ar.exp: Skip tests for Alpha target. Skip bfdtest1 tests for tic30 target. * testsuite/binutils-all/arm/objdump.exp: Skip for aout arm target. * testsuite/binutils-all/compress.exp: Expect some tests to fail on the nds32. * testsuite/binutils-all/copy-3.d: Skip for go32 targets. * testsuite/binutils-all/copy-4.d: Skip for AIX and linuxecoff targets. * testsuite/binutils-all/nm.exp: Treat beos based targets as ELF targets. * testsuite/binutils-all/objcopy.exp: Only run reverse bytes tests if the bintest.o file was created. Use the get_standard_section_names proc to get the name of the data section. * testsuite/binutils-all/objdump.exp: Update regexps to allow for RX section names. * testsuite/binutils-all/readelf.exp: Use get_standard_section_names proc to get the name of the data section. * testsuite/binutils-all/readelf.r: Allow for non standard text section names. * testsuite/binutils-all/readelf.s: Update regexps for tilepro. * testsuite/binutils-all/size.exp: Allow for non standard section names. * testsuite/binutils-all/update-section.exp: Expect comapre 1vs4 to fail on mips targets. * testsuite/lib/utils-lib.exp (default_binutils_run): Use get_standard_section_names proc. (run_dump_test): Likewise. (proc get_standard_section_names): New proc.
Diffstat (limited to 'binutils/testsuite/lib')
-rw-r--r--binutils/testsuite/lib/utils-lib.exp31
1 files changed, 31 insertions, 0 deletions
diff --git a/binutils/testsuite/lib/utils-lib.exp b/binutils/testsuite/lib/utils-lib.exp
index 790708a..6d2de5d 100644
--- a/binutils/testsuite/lib/utils-lib.exp
+++ b/binutils/testsuite/lib/utils-lib.exp
@@ -66,6 +66,15 @@ proc default_binutils_run { prog progargs } {
}
}
+ # 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 != "" && [string match "*objdump" $prog] } {
+ regsub -- "-j \\.text" $progargs "-j [lindex $sect_names 0]" progargs
+ regsub -- "-j \\.data" $progargs "-j [lindex $sect_names 1]" progargs
+ regsub -- "-j \\.bss" $progargs "-j [lindex $sect_names 2]" progargs
+ }
+
send_log "$prog $progargs\n"
verbose "$prog $progargs"
@@ -487,6 +496,15 @@ proc run_dump_test { name {extra_options {}} } {
return
}
+ # 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 != "" && $dumpprogram == "objdump"} {
+ 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
+ }
+
verbose "running $binary $progopts $progopts1" 3
set cmd "$binary $progopts $progopts1 ${copyfile}.o"
@@ -563,3 +581,16 @@ proc verbose_eval { expr { level 1 } } {
global verbose
if $verbose>$level then { eval verbose "$expr" $level }
}
+
+# Internal procedure: return the names of the standard sections
+#
+proc get_standard_section_names {} {
+ if [istarget "rx-*-*"] {
+ return { "P" "D_1" "B_1" }
+ }
+ if [istarget "alpha*-*-*vms*"] {
+ # Double quote: for TCL and for sh.
+ return { "\\\$CODE\\\$" "\\\$DATA\\\$" "\\\$BSS\\\$" }
+ }
+ return
+}