A few hppa testcase tidies
authorAlan Modra <amodra@gmail.com>
Sun, 16 Sep 2018 23:21:24 +0000 (08:51 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 17 Sep 2018 13:47:14 +0000 (23:17 +0930)
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.

binutils/ChangeLog
binutils/testsuite/lib/binutils-common.exp
binutils/testsuite/lib/utils-lib.exp
gas/ChangeLog
gas/testsuite/gas/all/gas.exp
gas/testsuite/gas/elf/elf.exp
gas/testsuite/gas/elf/symver.d
ld/ChangeLog
ld/testsuite/ld-elf/comm-data5.d
ld/testsuite/ld-scripts/defined6.d

index 0de8686..ee6defc 100644 (file)
@@ -1,5 +1,13 @@
 2018-09-17  Alan Modra  <amodra@gmail.com>
 
+       * 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.
+
+2018-09-17  Alan Modra  <amodra@gmail.com>
+
        * testsuite/binutils-all/strip-13mips64.s: Add section flags
        for reloc section.
        * testsuite/binutils-all/strip-13rel.s: Likewise.
index 4aa5c7c..08d57ae 100644 (file)
@@ -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
 }
index 45c1f03..ace30e6 100644 (file)
@@ -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"
index 0fbe6fa..3772875 100644 (file)
@@ -1,3 +1,10 @@
+2018-09-17  Alan Modra  <amodra@gmail.com>
+
+       * 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.
+
 2018-09-17  Nick Clifton  <nickc@redhat.com>
 
        * testuite/gas/elf/group0a.d: Add extra details to the test
index 029795b..b658da3 100644 (file)
@@ -170,8 +170,6 @@ case $target_triplet in {
        setup_xfail "riscv*-*-*" "rx-*-*" "vax*-*-*" "xgate*-*-*" "z8k-*-*"
        # rs6000-aix disallows redefinition via .comm.
        setup_xfail "*-*-aix*"
-       # SOM uses a different syntax for .comm
-       setup_xfail "hppa*-*-hpux*"
        # These targets fail redef3 because section contents for the
        # word referencing the .comm sym is not zero and/or its reloc
        # has a non-zero addend.  Relaxing the test would hide real
@@ -414,17 +412,7 @@ if { ![istarget "powerpc*-*-*"] && ![istarget "rs6000*-*-*"] && ![istarget "s390
 }
 
 run_dump_test quad
-
-# som doesn't use .data section.
-case $target_triplet in {
-    { hppa*64*-*-* } {
-       run_dump_test octa
-    }
-    { hppa*-*-hpux* } { }
-    default {
-       run_dump_test octa
-    }
-}
+run_dump_test octa
 
 # .set works differently on some targets.
 case $target_triplet in {
index 44f26c3..9715ac8 100644 (file)
@@ -252,10 +252,11 @@ if { [is_elf_format] } then {
 
     run_dump_test "missing-build-notes"
     
+    run_dump_test "common1"
+    run_dump_test "common2"
+
     # hpux has a non-standard common directive.
     if { ![istarget "*-*-hpux*"] } then {
-       run_dump_test "common1"
-       run_dump_test "common2"
        run_dump_test "common3a"
        run_dump_test "common3b"
        run_dump_test "common4a"
index 3d180c7..7fcc62a 100644 (file)
@@ -1,6 +1,5 @@
 #objdump: --syms
 #name: ELF symbol versioning
-#notarget: hppa64*-*-hpux*
 #
 # The #... and #pass are there to match extra symbols inserted by
 # some toolchains, eg the mips-elf port will add .reginfo and .ptrd
index 27e4c1b..d0e7559 100644 (file)
@@ -1,3 +1,8 @@
+2018-09-17  Alan Modra  <amodra@gmail.com>
+
+       * testsuite/ld-elf/comm-data5.d: Remove notarget for hppa.
+       * testsuite/ld-scripts/defined6.d: Likewise.
+
 2018-09-17  Nick Clifton  <nickc@redhat.com>
 
        * testuite/ld/ld-elf/audit.exp: Differentiate the names of the
index 36c09ba..18b287d 100644 (file)
@@ -1,7 +1,6 @@
 #source: comm-data5.s
 #ld: 
 #readelf: -r
-#notarget: hppa64*-*-hpux*
 #xfail: frv-*-*linux*
 
 There are no relocations in this file.
index c8ea863..8837f3b 100644 (file)
@@ -1,8 +1,6 @@
 #source: defined6.s
 #ld: -T defined6.t
 #nm: -B
-#notarget: hppa*-hpux*
-# hppa64-hpux has a different .comm
 
 # Check that DEFINED works with various symbol types
 #...