aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2020-04-02 10:52:57 +0200
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2020-04-02 10:52:57 +0200
commitbb8974772177ff4c043bfc28305bba66e7badf36 (patch)
tree9c0c387a7c0d77576d030b202309b8cad2c18489 /gas/testsuite
parent59e28a9767bf237951839204ebc3e412bc27a175 (diff)
downloadgdb-bb8974772177ff4c043bfc28305bba66e7badf36.zip
gdb-bb8974772177ff4c043bfc28305bba66e7badf36.tar.gz
gdb-bb8974772177ff4c043bfc28305bba66e7badf36.tar.bz2
ld: Disable ifunc tests on Solaris
A couple of ld ifunc tests currently FAIL on 64-bit Solaris/x86: FAIL: ld-ifunc/ifunc-10-x86-64 FAIL: ld-ifunc/ifunc-11-x86-64 FAIL: ld-ifunc/ifunc-12-x86-64 FAIL: ld-ifunc/ifunc-13-x86-64 FAIL: ld-ifunc/ifunc-14a-x86-64 FAIL: ld-ifunc/ifunc-14b-x86-64 FAIL: ld-ifunc/ifunc-14c-x86-64 FAIL: ld-ifunc/ifunc-14d-x86-64 FAIL: ld-ifunc/ifunc-14e-x86-64 FAIL: ld-ifunc/ifunc-14f-x86-64 FAIL: ld-ifunc/ifunc-15-x86-64 FAIL: ld-ifunc/ifunc-17a-x86-64 FAIL: ld-ifunc/ifunc-17b-x86-64 FAIL: ld-ifunc/ifunc-2-local-x86-64-now FAIL: ld-ifunc/ifunc-2-local-x86-64 FAIL: ld-ifunc/ifunc-2-x86-64-now FAIL: ld-ifunc/ifunc-2-x86-64 FAIL: ld-ifunc/ifunc-20-x86-64 FAIL: ld-ifunc/pr17154-x86-64-now FAIL: ld-ifunc/pr17154-x86-64 For one, the actual error is weird: ./ld-new: target elf64-x86-64 not found failed with: <./ld-new: target elf64-x86-64 not found>, no expected output FAIL: ld-ifunc/ifunc-10-x86-64 although ld -V does report the elf_x86_64 emulation as supported: $ ./ld/ld-new -V GNU ld (GNU Binutils) 2.34.50.20200328 Supported emulations: elf_x86_64_sol2 elf_x86_64 [...] When using ld -m elf_x86_64_sol2 instead, one of the testcases links successfully. However, there's no point in pursuing this: Solaris does not support ifunc, as can be seen in <sys/elf.h>: /* * GNU/Linux specific symbol type not used by Solaris */ #define STT_GNU_IFUNC 10 and never will, given that it has symbol capabilities as solution to effectively the same problem: http://www.linker-aliens.org/blogs/rie/entry/symbol_capabilitie/ Therefore this patch disables ifunc testing on Solaris completely by removing Solaris from binutils/testsuite/lib/binutils-common.exp (supports_gnu_osabi). The ifunc part is justified above. SHF_GNU_MBIND is in the OS-specific range and conflicts with #define SHF_SUNW_REALLOC 0x01000000 /* internal: krtld realloc */ While the comment suggests this might be relocatable without too much problems, the description of mbind (no formal spec AFAICS, just the comment in the binutils patch submission) strongly suggests that this isn't relevant to Solaris at all. Indirectly, clearing supports_gnu_osabi on Solaris disables supports_gnu_unique. Again, Solaris <sys/elf.h> has /* * GNU/Linux specific binding not used by Solaris */ #define STB_GNU_UNIQUE 10 so this seems the right thing to do. Afterwards, one can remove the explicit mentions of *-*-solaris2* in quite a number of (but not all) the ld-ifunc dump file notarget lists. There's one fallout, though: two gas tests now XPASS because they are xfail'ed for !supports_gnu_osabi: XPASS: mbind sections 12 XPASS: mbind section contents 16 XPASS: mbind sections 16 XPASS: mbind section contents 16 To fix that, I've changed #xfail: ![supports_gnu_osabi] to notarget. Tested on x86_64-pc-solaris2.11, i386-pc-solaris2.11, x86_64-pc-linux-gnu, and i686-pc-linux-gnu. ld: * testsuite/ld-ifunc/ifunc-10-i386.d: Remove *-*-solaris2* from notarget. * ifunc-11-i386.d: Likewise. * ifunc-12-i386.d: Likewise. * ifunc-13-i386.d: Likewise. * ifunc-14a-i386.d: Likewise. * ifunc-14b-i386.d: Likewise. * ifunc-14c-i386.d: Likewise. * ifunc-14d-i386.d: Likewise. * ifunc-14e-i386.d: Likewise. * ifunc-14f-i386.d: Likewise. * ifunc-15-i386.d: Likewise. * ifunc-16-i386-now.d: Likewise. * ifunc-16-i386.d: Likewise. * ifunc-17a-i386.d: Likewise. * ifunc-17b-i386.d: Likewise. * ifunc-18a-i386.d: Likewise. * ifunc-18b-i386.d: Likewise. * ifunc-19a-i386.d: Likewise. * ifunc-19b-i386.d: Likewise. * ifunc-2-i386-now.d: Likewise. * ifunc-2-i386.d: Likewise. * ifunc-2-local-i386-now.d: Likewise. * ifunc-2-local-i386.d: Likewise. * ifunc-20-i386.d: Likewise. * ifunc-21-i386.d: Likewise. * ifunc-22-i386.d: Likewise. * ifunc-5a-i386.d: Likewise. * ifunc-5a-local-i386.d: Likewise. * ifunc-5b-i386.d: Likewise. * ifunc-5b-local-i386.d: Likewise. * ifunc-5r-local-i386.d: Likewise. * ifunc-6a-i386.d: Likewise. * ifunc-6b-i386.d: Likewise. * ifunc-7a-i386.d: Likewise. * ifunc-7b-i386.d: Likewise. * ifunc-8-i386.d: Likewise. * ifunc-9-i386.d: Likewise. * pr17154-i386-now.d: Likewise. * pr17154-i386.d: Likewise. * ifunc-23a-x86.d: Remove notarget. * ifunc-24a-x86.d: Likewise. * ifunc-25a-x86.d: Likewise. gas: * testsuite/gas/elf/section12a.d: Use notarget instead of xfail. * testsuite/gas/elf/section12b.d: Likewise. * testsuite/gas/elf/section16a.d: Likewise. * testsuite/gas/elf/section16b.d: Likewise. binutils: * testsuite/lib/binutils-common.exp (supports_gnu_osabi): Don't enable on *-*-solaris*.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/elf/section12a.d2
-rw-r--r--gas/testsuite/gas/elf/section12b.d2
-rw-r--r--gas/testsuite/gas/elf/section16a.d2
-rw-r--r--gas/testsuite/gas/elf/section16b.d2
4 files changed, 4 insertions, 4 deletions
diff --git a/gas/testsuite/gas/elf/section12a.d b/gas/testsuite/gas/elf/section12a.d
index 1580161..08ecbd2 100644
--- a/gas/testsuite/gas/elf/section12a.d
+++ b/gas/testsuite/gas/elf/section12a.d
@@ -3,7 +3,7 @@
#readelf: -Sg --wide
#name: mbind sections 12
# A number of targets do not support SHF_GNU_MBIND
-#xfail: ![supports_gnu_osabi]
+#notarget: ![supports_gnu_osabi]
#...
\[[ 0-9]+\] \.mbind\.data[ ]+PROGBITS[ ]+0+0 0+[0-9a-f]+ 0+1 00 WAD 0 0 1
diff --git a/gas/testsuite/gas/elf/section12b.d b/gas/testsuite/gas/elf/section12b.d
index 98a4b95..92dd3f7 100644
--- a/gas/testsuite/gas/elf/section12b.d
+++ b/gas/testsuite/gas/elf/section12b.d
@@ -6,7 +6,7 @@
# expected below.
#xfail: rx-*-*
# A number of targets do not support SHF_GNU_MBIND
-#xfail: ![supports_gnu_osabi]
+#notarget: ![supports_gnu_osabi]
#...
Contents of section .mbind.data:
diff --git a/gas/testsuite/gas/elf/section16a.d b/gas/testsuite/gas/elf/section16a.d
index 0d66475..e5a1a85 100644
--- a/gas/testsuite/gas/elf/section16a.d
+++ b/gas/testsuite/gas/elf/section16a.d
@@ -3,7 +3,7 @@
#readelf: -Sg --wide
#name: mbind sections 16
# A number of targets do not support SHF_GNU_MBIND
-#xfail: ![supports_gnu_osabi]
+#notarget: ![supports_gnu_osabi]
#...
\[[ 0-9]+\] \.mbind\.data[ ]+PROGBITS[ ]+0+0 0+[0-9a-f]+ 0+1 00 WAD 0 0 1
diff --git a/gas/testsuite/gas/elf/section16b.d b/gas/testsuite/gas/elf/section16b.d
index 9014fab..6e085c3 100644
--- a/gas/testsuite/gas/elf/section16b.d
+++ b/gas/testsuite/gas/elf/section16b.d
@@ -6,7 +6,7 @@
# expected below.
#xfail: rx-*-*
# A number of targets do not support SHF_GNU_MBIND
-#xfail: ![supports_gnu_osabi]
+#notarget: ![supports_gnu_osabi]
#...
Contents of section .mbind.data: