aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite/lib
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-09-17 08:51:24 +0930
committerAlan Modra <amodra@gmail.com>2018-09-17 23:17:14 +0930
commit0b1352e04caa6b562a532354dc48f775e6a1135b (patch)
treebe1ef773ed5fa56cb443f2e44307e738e1143485 /binutils/testsuite/lib
parent8c9604b6a2c553bc1edc6d80b934b99112292e58 (diff)
downloadgdb-0b1352e04caa6b562a532354dc48f775e6a1135b.zip
gdb-0b1352e04caa6b562a532354dc48f775e6a1135b.tar.gz
gdb-0b1352e04caa6b562a532354dc48f775e6a1135b.tar.bz2
A few hppa testcase tidies
binutils/ * testsuite/lib/binutils-common.exp (is_som_format): New proc. (run_dump_test): Correct target test for alternate .comm syntax. (get_standard_section_names): Handle som format. * testsuite/lib/utils-lib.exp (default_binutils_assemble_flags): Correct target test for alternate .comm syntax. gas/ * testsuite/gas/all/gas.exp (redef3): Don't xfail for hppa. (octa): Run for hppa. * testsuite/gas/elf/elf.exp (common1, common2): Likewise. * testsuite/gas/elf/symver.d: Delete notarget. ld/ * testsuite/ld-elf/comm-data5.d: Remove notarget for hppa. * testsuite/ld-scripts/defined6.d: Likewise.
Diffstat (limited to 'binutils/testsuite/lib')
-rw-r--r--binutils/testsuite/lib/binutils-common.exp22
-rw-r--r--binutils/testsuite/lib/utils-lib.exp4
2 files changed, 21 insertions, 5 deletions
diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index 4aa5c7c..08d57ae 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -105,6 +105,19 @@ proc is_pecoff_format {} {
return 1
}
+proc is_som_format {} {
+ if { ![istarget hppa*-*-*] || [istarget hppa*64*-*-*] } {
+ return 0;
+ }
+ if { [istarget *-*-osf*] \
+ || [istarget {*-*-h[ip]ux*}] \
+ || [istarget *-*-mpeix*] \
+ || [istarget *-*-bsd*] } {
+ return 1;
+ }
+ return 0;
+}
+
# True if the object format is known to be 64-bit ELF.
#
proc is_elf64 { binary_file } {
@@ -945,7 +958,9 @@ proc run_dump_test { name {extra_options {}} } {
set cmdret 1
}
} else {
- if { [istarget "hppa*-*-*"] && ![istarget "*-*-linux*" ] } {
+ if { [istarget "hppa*-*-*"] \
+ && ![istarget "*-*-linux*"] \
+ && ![istarget "*-*-netbsd*" ] } {
set cmd "sed -e 's/^\[ \]*\.comm \\(\[^,\]*\\),\\(.*\\)/\\1 .comm \\2/' < $sourcefile > tmpdir/asm.s"
send_log "$cmd\n"
set cmdret [remote_exec host [concat sh -c [list "$cmd"]]]
@@ -1328,9 +1343,8 @@ 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\\\$" }
+ if { [istarget "alpha*-*-*vms*"] || [is_som_format] } {
+ return { {\$CODE\$} {\$DATA\$} {\$BSS\$} }
}
return
}
diff --git a/binutils/testsuite/lib/utils-lib.exp b/binutils/testsuite/lib/utils-lib.exp
index 45c1f03..ace30e6 100644
--- a/binutils/testsuite/lib/utils-lib.exp
+++ b/binutils/testsuite/lib/utils-lib.exp
@@ -117,7 +117,9 @@ proc default_binutils_assemble_flags { source object asflags } {
# This is a hack in that it won't scale well if other targets need
# similar transformations to assemble. We'll generalize the hack
# if/when other targets need similar handling.
- if { [istarget "hppa*-*-*"] && ![istarget "*-*-linux*" ] } then {
+ if { [istarget "hppa*-*-*"] \
+ && ![istarget "*-*-linux*"] \
+ && ![istarget "*-*-netbsd*" ] } {
set sed_file $srcdir/config/hppa.sed
send_log "sed -f $sed_file < $source > asm.s\n"
verbose "sed -f $sed_file < $source > asm.s"