From: Alan Modra Date: Thu, 6 Feb 2020 00:53:43 +0000 (+1030) Subject: Enable ld-ifunc tests for more targets X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb4e012ca040df594ed16d23e1a565754b686c6f;p=binutils-gdb.git Enable ld-ifunc tests for more targets Also fix some ix86 fails. * testsuite/ld-ifunc/ifunc.exp: Enable for more targets, specifying targets that don't support ifunc rather than ones that do. (contains_irelative_reloc): Match R_PARISC_IPLT. * testsuite/ld-ifunc/lib.c: Don't use .set in asm. * testsuite/ld-ifunc/ifunc-23-x86.s, * testsuite/ld-ifunc/ifunc-24-x86.s, * testsuite/ld-ifunc/ifunc-25-x86.s, * testsuite/ld-ifunc/ifunc-4-local-x86.s, * testsuite/ld-ifunc/ifunc-4-x86.s: Define _main. * testsuite/ld-ifunc/ifunc-10-i386.d, * testsuite/ld-ifunc/ifunc-11-i386.d, * testsuite/ld-ifunc/ifunc-12-i386.d, * testsuite/ld-ifunc/ifunc-13-i386.d, * testsuite/ld-ifunc/ifunc-14a-i386.d, * testsuite/ld-ifunc/ifunc-14b-i386.d, * testsuite/ld-ifunc/ifunc-14c-i386.d, * testsuite/ld-ifunc/ifunc-14d-i386.d, * testsuite/ld-ifunc/ifunc-14e-i386.d, * testsuite/ld-ifunc/ifunc-14f-i386.d, * testsuite/ld-ifunc/ifunc-15-i386.d, * testsuite/ld-ifunc/ifunc-16-i386-now.d, * testsuite/ld-ifunc/ifunc-16-i386.d, * testsuite/ld-ifunc/ifunc-17a-i386.d, * testsuite/ld-ifunc/ifunc-17b-i386.d, * testsuite/ld-ifunc/ifunc-18a-i386.d, * testsuite/ld-ifunc/ifunc-18b-i386.d, * testsuite/ld-ifunc/ifunc-19a-i386.d, * testsuite/ld-ifunc/ifunc-19b-i386.d, * testsuite/ld-ifunc/ifunc-2-i386-now.d, * testsuite/ld-ifunc/ifunc-2-i386.d, * testsuite/ld-ifunc/ifunc-2-local-i386-now.d, * testsuite/ld-ifunc/ifunc-2-local-i386.d, * testsuite/ld-ifunc/ifunc-20-i386.d, * testsuite/ld-ifunc/ifunc-21-i386.d, * testsuite/ld-ifunc/ifunc-22-i386.d, * testsuite/ld-ifunc/ifunc-26.d, * testsuite/ld-ifunc/ifunc-5a-i386.d, * testsuite/ld-ifunc/ifunc-5a-local-i386.d, * testsuite/ld-ifunc/ifunc-5b-i386.d, * testsuite/ld-ifunc/ifunc-5b-local-i386.d, * testsuite/ld-ifunc/ifunc-5r-local-i386.d, * testsuite/ld-ifunc/ifunc-6a-i386.d, * testsuite/ld-ifunc/ifunc-6b-i386.d, * testsuite/ld-ifunc/ifunc-7a-i386.d, * testsuite/ld-ifunc/ifunc-7b-i386.d, * testsuite/ld-ifunc/ifunc-8-i386.d, * testsuite/ld-ifunc/ifunc-9-i386.d, * testsuite/ld-ifunc/pr17154-i386-now.d, * testsuite/ld-ifunc/pr17154-i386.d: xfail lynxos, nto, and solaris. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 21f51c98b2e..29630cbab5b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,55 @@ +2020-02-06 Alan Modra + + * testsuite/ld-ifunc/ifunc.exp: Enable for more targets, specifying + targets that don't support ifunc rather than ones that do. + (contains_irelative_reloc): Match R_PARISC_IPLT. + * testsuite/ld-ifunc/lib.c: Don't use .set in asm. + * testsuite/ld-ifunc/ifunc-23-x86.s, + * testsuite/ld-ifunc/ifunc-24-x86.s, + * testsuite/ld-ifunc/ifunc-25-x86.s, + * testsuite/ld-ifunc/ifunc-4-local-x86.s, + * testsuite/ld-ifunc/ifunc-4-x86.s: Define _main. + * testsuite/ld-ifunc/ifunc-10-i386.d, + * testsuite/ld-ifunc/ifunc-11-i386.d, + * testsuite/ld-ifunc/ifunc-12-i386.d, + * testsuite/ld-ifunc/ifunc-13-i386.d, + * testsuite/ld-ifunc/ifunc-14a-i386.d, + * testsuite/ld-ifunc/ifunc-14b-i386.d, + * testsuite/ld-ifunc/ifunc-14c-i386.d, + * testsuite/ld-ifunc/ifunc-14d-i386.d, + * testsuite/ld-ifunc/ifunc-14e-i386.d, + * testsuite/ld-ifunc/ifunc-14f-i386.d, + * testsuite/ld-ifunc/ifunc-15-i386.d, + * testsuite/ld-ifunc/ifunc-16-i386-now.d, + * testsuite/ld-ifunc/ifunc-16-i386.d, + * testsuite/ld-ifunc/ifunc-17a-i386.d, + * testsuite/ld-ifunc/ifunc-17b-i386.d, + * testsuite/ld-ifunc/ifunc-18a-i386.d, + * testsuite/ld-ifunc/ifunc-18b-i386.d, + * testsuite/ld-ifunc/ifunc-19a-i386.d, + * testsuite/ld-ifunc/ifunc-19b-i386.d, + * testsuite/ld-ifunc/ifunc-2-i386-now.d, + * testsuite/ld-ifunc/ifunc-2-i386.d, + * testsuite/ld-ifunc/ifunc-2-local-i386-now.d, + * testsuite/ld-ifunc/ifunc-2-local-i386.d, + * testsuite/ld-ifunc/ifunc-20-i386.d, + * testsuite/ld-ifunc/ifunc-21-i386.d, + * testsuite/ld-ifunc/ifunc-22-i386.d, + * testsuite/ld-ifunc/ifunc-26.d, + * testsuite/ld-ifunc/ifunc-5a-i386.d, + * testsuite/ld-ifunc/ifunc-5a-local-i386.d, + * testsuite/ld-ifunc/ifunc-5b-i386.d, + * testsuite/ld-ifunc/ifunc-5b-local-i386.d, + * testsuite/ld-ifunc/ifunc-5r-local-i386.d, + * testsuite/ld-ifunc/ifunc-6a-i386.d, + * testsuite/ld-ifunc/ifunc-6b-i386.d, + * testsuite/ld-ifunc/ifunc-7a-i386.d, + * testsuite/ld-ifunc/ifunc-7b-i386.d, + * testsuite/ld-ifunc/ifunc-8-i386.d, + * testsuite/ld-ifunc/ifunc-9-i386.d, + * testsuite/ld-ifunc/pr17154-i386-now.d, + * testsuite/ld-ifunc/pr17154-i386.d: xfail lynxos, nto, and solaris. + 2020-02-06 Alan Modra * testsuite/lib/ld-lib.exp (is_generic): Delete. diff --git a/ld/testsuite/ld-ifunc/ifunc-10-i386.d b/ld/testsuite/ld-ifunc/ifunc-10-i386.d index f769db13de2..b72545acfec 100644 --- a/ld/testsuite/ld-ifunc/ifunc-10-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-10-i386.d @@ -2,6 +2,6 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* There are no relocations in this file. diff --git a/ld/testsuite/ld-ifunc/ifunc-11-i386.d b/ld/testsuite/ld-ifunc/ifunc-11-i386.d index f769db13de2..b72545acfec 100644 --- a/ld/testsuite/ld-ifunc/ifunc-11-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-11-i386.d @@ -2,6 +2,6 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* There are no relocations in this file. diff --git a/ld/testsuite/ld-ifunc/ifunc-12-i386.d b/ld/testsuite/ld-ifunc/ifunc-12-i386.d index fb868aec364..cd41f5bfb9c 100644 --- a/ld/testsuite/ld-ifunc/ifunc-12-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-12-i386.d @@ -2,6 +2,6 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* There are no relocations in this file. diff --git a/ld/testsuite/ld-ifunc/ifunc-13-i386.d b/ld/testsuite/ld-ifunc/ifunc-13-i386.d index 79a64d9910d..1f6bd959f6f 100644 --- a/ld/testsuite/ld-ifunc/ifunc-13-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-13-i386.d @@ -4,7 +4,7 @@ #as: --32 -mrelax-relocations=yes #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.ifunc' at offset 0x[0-9a-f]+ contains 1 entry: [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-14a-i386.d b/ld/testsuite/ld-ifunc/ifunc-14a-i386.d index 988f5f3a9a0..93a583462be 100644 --- a/ld/testsuite/ld-ifunc/ifunc-14a-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-14a-i386.d @@ -4,7 +4,7 @@ #as: --32 #readelf: -d --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* #failif #... diff --git a/ld/testsuite/ld-ifunc/ifunc-14b-i386.d b/ld/testsuite/ld-ifunc/ifunc-14b-i386.d index 42b7ce6d911..213dc8096b1 100644 --- a/ld/testsuite/ld-ifunc/ifunc-14b-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-14b-i386.d @@ -4,7 +4,7 @@ #as: --32 #readelf: -d --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* #failif #... diff --git a/ld/testsuite/ld-ifunc/ifunc-14c-i386.d b/ld/testsuite/ld-ifunc/ifunc-14c-i386.d index 137b3e9b026..29960ed06cc 100644 --- a/ld/testsuite/ld-ifunc/ifunc-14c-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-14c-i386.d @@ -4,7 +4,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* #failif #... diff --git a/ld/testsuite/ld-ifunc/ifunc-14d-i386.d b/ld/testsuite/ld-ifunc/ifunc-14d-i386.d index 094defc9330..a355d36d6e1 100644 --- a/ld/testsuite/ld-ifunc/ifunc-14d-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-14d-i386.d @@ -4,7 +4,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* #failif #... diff --git a/ld/testsuite/ld-ifunc/ifunc-14e-i386.d b/ld/testsuite/ld-ifunc/ifunc-14e-i386.d index eec7ab655dd..c47ff3e5de4 100644 --- a/ld/testsuite/ld-ifunc/ifunc-14e-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-14e-i386.d @@ -5,7 +5,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* #failif #... diff --git a/ld/testsuite/ld-ifunc/ifunc-14f-i386.d b/ld/testsuite/ld-ifunc/ifunc-14f-i386.d index 826ddd34024..9f92a715acd 100644 --- a/ld/testsuite/ld-ifunc/ifunc-14f-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-14f-i386.d @@ -5,7 +5,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* #failif #... diff --git a/ld/testsuite/ld-ifunc/ifunc-15-i386.d b/ld/testsuite/ld-ifunc/ifunc-15-i386.d index 0c062fd3c65..bac4afe4ad2 100644 --- a/ld/testsuite/ld-ifunc/ifunc-15-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-15-i386.d @@ -3,7 +3,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.got' at offset 0x[0-9a-f]+ contains 1 entry: [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-16-i386-now.d b/ld/testsuite/ld-ifunc/ifunc-16-i386-now.d index ee0e5fdea5e..879976b5a89 100644 --- a/ld/testsuite/ld-ifunc/ifunc-16-i386-now.d +++ b/ld/testsuite/ld-ifunc/ifunc-16-i386-now.d @@ -3,7 +3,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.plt' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-16-i386.d b/ld/testsuite/ld-ifunc/ifunc-16-i386.d index bc80fa1ec2d..8e0c06908ca 100644 --- a/ld/testsuite/ld-ifunc/ifunc-16-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-16-i386.d @@ -3,7 +3,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.plt' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-17a-i386.d b/ld/testsuite/ld-ifunc/ifunc-17a-i386.d index 0c7ff488f24..1ff40c26a59 100644 --- a/ld/testsuite/ld-ifunc/ifunc-17a-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-17a-i386.d @@ -4,7 +4,7 @@ #as: --32 #readelf: -s --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* #... +[0-9]+: +[0-9a-f]+ +4 +OBJECT +GLOBAL +DEFAULT +[1-9] foo diff --git a/ld/testsuite/ld-ifunc/ifunc-17b-i386.d b/ld/testsuite/ld-ifunc/ifunc-17b-i386.d index 5704cf143fb..1d54a90c0e0 100644 --- a/ld/testsuite/ld-ifunc/ifunc-17b-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-17b-i386.d @@ -4,7 +4,7 @@ #as: --32 #readelf: -s --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* #... +[0-9]+: +[0-9a-f]+ +4 +OBJECT +GLOBAL +DEFAULT +[1-9] foo diff --git a/ld/testsuite/ld-ifunc/ifunc-18a-i386.d b/ld/testsuite/ld-ifunc/ifunc-18a-i386.d index 348b9f92b5d..e79d136b0e2 100644 --- a/ld/testsuite/ld-ifunc/ifunc-18a-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-18a-i386.d @@ -4,7 +4,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.ifunc' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-18b-i386.d b/ld/testsuite/ld-ifunc/ifunc-18b-i386.d index 59dfad4193e..a7d295bf061 100644 --- a/ld/testsuite/ld-ifunc/ifunc-18b-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-18b-i386.d @@ -4,7 +4,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.ifunc' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-19a-i386.d b/ld/testsuite/ld-ifunc/ifunc-19a-i386.d index a2c131e5971..e2d19178c73 100644 --- a/ld/testsuite/ld-ifunc/ifunc-19a-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-19a-i386.d @@ -4,7 +4,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.ifunc' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-19b-i386.d b/ld/testsuite/ld-ifunc/ifunc-19b-i386.d index 2ca56a2865a..29f590052c6 100644 --- a/ld/testsuite/ld-ifunc/ifunc-19b-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-19b-i386.d @@ -4,7 +4,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.ifunc' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-2-i386-now.d b/ld/testsuite/ld-ifunc/ifunc-2-i386-now.d index 028093b1c31..533cd78b3ac 100644 --- a/ld/testsuite/ld-ifunc/ifunc-2-i386-now.d +++ b/ld/testsuite/ld-ifunc/ifunc-2-i386-now.d @@ -3,7 +3,7 @@ #as: --32 #objdump: -dw #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* .*: +file format .* diff --git a/ld/testsuite/ld-ifunc/ifunc-2-i386.d b/ld/testsuite/ld-ifunc/ifunc-2-i386.d index fb1ad4eeb9b..3cf1ef0e12c 100644 --- a/ld/testsuite/ld-ifunc/ifunc-2-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-2-i386.d @@ -2,7 +2,7 @@ #as: --32 #objdump: -dw #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* #... [ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-f]+<\*ABS\*@plt> diff --git a/ld/testsuite/ld-ifunc/ifunc-2-local-i386-now.d b/ld/testsuite/ld-ifunc/ifunc-2-local-i386-now.d index 4899171b682..b11324c87f0 100644 --- a/ld/testsuite/ld-ifunc/ifunc-2-local-i386-now.d +++ b/ld/testsuite/ld-ifunc/ifunc-2-local-i386-now.d @@ -3,7 +3,7 @@ #as: --32 #objdump: -dw #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* .*: +file format .* diff --git a/ld/testsuite/ld-ifunc/ifunc-2-local-i386.d b/ld/testsuite/ld-ifunc/ifunc-2-local-i386.d index fb1ad4eeb9b..3cf1ef0e12c 100644 --- a/ld/testsuite/ld-ifunc/ifunc-2-local-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-2-local-i386.d @@ -2,7 +2,7 @@ #as: --32 #objdump: -dw #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* #... [ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-f]+<\*ABS\*@plt> diff --git a/ld/testsuite/ld-ifunc/ifunc-20-i386.d b/ld/testsuite/ld-ifunc/ifunc-20-i386.d index c501b04cbe0..5c138564c46 100644 --- a/ld/testsuite/ld-ifunc/ifunc-20-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-20-i386.d @@ -3,7 +3,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.ifunc' at offset 0x[0-9a-f]+ contains 1 entry: [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-21-i386.d b/ld/testsuite/ld-ifunc/ifunc-21-i386.d index 9e8759af673..12ab848fe6a 100644 --- a/ld/testsuite/ld-ifunc/ifunc-21-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-21-i386.d @@ -2,7 +2,7 @@ #as: --32 -mrelax-relocations=yes #objdump: -dw #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* .*: +file format .* diff --git a/ld/testsuite/ld-ifunc/ifunc-22-i386.d b/ld/testsuite/ld-ifunc/ifunc-22-i386.d index 9e8759af673..12ab848fe6a 100644 --- a/ld/testsuite/ld-ifunc/ifunc-22-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-22-i386.d @@ -2,7 +2,7 @@ #as: --32 -mrelax-relocations=yes #objdump: -dw #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* .*: +file format .* diff --git a/ld/testsuite/ld-ifunc/ifunc-23-x86.s b/ld/testsuite/ld-ifunc/ifunc-23-x86.s index 69c227909bb..00b60c5a5af 100644 --- a/ld/testsuite/ld-ifunc/ifunc-23-x86.s +++ b/ld/testsuite/ld-ifunc/ifunc-23-x86.s @@ -6,5 +6,7 @@ _start: ret .globl __start __start: + .global _main +_main: .data .dc.a foo diff --git a/ld/testsuite/ld-ifunc/ifunc-24-x86.s b/ld/testsuite/ld-ifunc/ifunc-24-x86.s index 967cdf6fc9a..723db4b1371 100644 --- a/ld/testsuite/ld-ifunc/ifunc-24-x86.s +++ b/ld/testsuite/ld-ifunc/ifunc-24-x86.s @@ -7,5 +7,7 @@ _start: call foo@PLT .globl __start __start: + .global _main +_main: .data .dc.a foo diff --git a/ld/testsuite/ld-ifunc/ifunc-25-x86.s b/ld/testsuite/ld-ifunc/ifunc-25-x86.s index 0549cbfa940..452592c6270 100644 --- a/ld/testsuite/ld-ifunc/ifunc-25-x86.s +++ b/ld/testsuite/ld-ifunc/ifunc-25-x86.s @@ -8,5 +8,7 @@ _start: call foo@PLT .globl __start __start: + .global _main +_main: .data .dc.a foo diff --git a/ld/testsuite/ld-ifunc/ifunc-26.d b/ld/testsuite/ld-ifunc/ifunc-26.d index 3b1e9f167ac..05e380a87af 100644 --- a/ld/testsuite/ld-ifunc/ifunc-26.d +++ b/ld/testsuite/ld-ifunc/ifunc-26.d @@ -1,7 +1,8 @@ #ld: -shared #readelf: -h +#xfail: alpha-*-* ELF Header: #... - OS/ABI: UNIX - GNU + +OS/ABI: +UNIX - (GNU|FreeBSD) #pass diff --git a/ld/testsuite/ld-ifunc/ifunc-4-local-x86.s b/ld/testsuite/ld-ifunc/ifunc-4-local-x86.s index 4f72d7fb057..819610ea58a 100644 --- a/ld/testsuite/ld-ifunc/ifunc-4-local-x86.s +++ b/ld/testsuite/ld-ifunc/ifunc-4-local-x86.s @@ -13,6 +13,8 @@ _start: .type __start,"function" .global __start __start: - .type __start,"function" + .type _main,"function" + .global _main +_main: call foo movl $foo,%eax diff --git a/ld/testsuite/ld-ifunc/ifunc-4-x86.s b/ld/testsuite/ld-ifunc/ifunc-4-x86.s index 1c7e07e70cf..7d02f5caeb2 100644 --- a/ld/testsuite/ld-ifunc/ifunc-4-x86.s +++ b/ld/testsuite/ld-ifunc/ifunc-4-x86.s @@ -14,6 +14,8 @@ _start: .type __start,"function" .global __start __start: - .type __start,"function" + .type _main,"function" + .global _main +_main: call foo movl $foo,%eax diff --git a/ld/testsuite/ld-ifunc/ifunc-5a-i386.d b/ld/testsuite/ld-ifunc/ifunc-5a-i386.d index 51e4632e46f..3fd52a6c6d6 100644 --- a/ld/testsuite/ld-ifunc/ifunc-5a-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-5a-i386.d @@ -3,7 +3,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.plt' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-5a-local-i386.d b/ld/testsuite/ld-ifunc/ifunc-5a-local-i386.d index 3df5f6b11be..979d5b98030 100644 --- a/ld/testsuite/ld-ifunc/ifunc-5a-local-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-5a-local-i386.d @@ -3,7 +3,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.plt' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-5b-i386.d b/ld/testsuite/ld-ifunc/ifunc-5b-i386.d index f47a1957d2f..3d9aa277c11 100644 --- a/ld/testsuite/ld-ifunc/ifunc-5b-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-5b-i386.d @@ -3,7 +3,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.got' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-5b-local-i386.d b/ld/testsuite/ld-ifunc/ifunc-5b-local-i386.d index be8db75c830..0af572c9fe8 100644 --- a/ld/testsuite/ld-ifunc/ifunc-5b-local-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-5b-local-i386.d @@ -3,7 +3,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.plt' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-5r-local-i386.d b/ld/testsuite/ld-ifunc/ifunc-5r-local-i386.d index 6e7a8b3c72e..3eccf932bf0 100644 --- a/ld/testsuite/ld-ifunc/ifunc-5r-local-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-5r-local-i386.d @@ -3,7 +3,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.text' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-6a-i386.d b/ld/testsuite/ld-ifunc/ifunc-6a-i386.d index c4fa10e2799..3dc853adcf4 100644 --- a/ld/testsuite/ld-ifunc/ifunc-6a-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-6a-i386.d @@ -3,7 +3,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.plt' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-6b-i386.d b/ld/testsuite/ld-ifunc/ifunc-6b-i386.d index 6ed595b3b07..5809f089058 100644 --- a/ld/testsuite/ld-ifunc/ifunc-6b-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-6b-i386.d @@ -3,7 +3,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.got' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-7a-i386.d b/ld/testsuite/ld-ifunc/ifunc-7a-i386.d index fda1fb9aa76..dfe3028d4ee 100644 --- a/ld/testsuite/ld-ifunc/ifunc-7a-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-7a-i386.d @@ -3,7 +3,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.plt' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-7b-i386.d b/ld/testsuite/ld-ifunc/ifunc-7b-i386.d index 66f5a629abc..427fa2b6c3a 100644 --- a/ld/testsuite/ld-ifunc/ifunc-7b-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-7b-i386.d @@ -3,7 +3,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.plt' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-8-i386.d b/ld/testsuite/ld-ifunc/ifunc-8-i386.d index 3730a4fd9c2..0930c2cb039 100644 --- a/ld/testsuite/ld-ifunc/ifunc-8-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-8-i386.d @@ -4,7 +4,7 @@ #as: --32 #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.plt' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc-9-i386.d b/ld/testsuite/ld-ifunc/ifunc-9-i386.d index adf84715d0d..dba1ac1f16a 100644 --- a/ld/testsuite/ld-ifunc/ifunc-9-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-9-i386.d @@ -3,7 +3,7 @@ #ld: -m elf_i386 --export-dynamic #readelf: -r --wide #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* Relocation section '.rel.plt' at .* [ ]+Offset[ ]+Info[ ]+Type[ ]+.* diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp index 4e9e83bbc38..384ded0507e 100644 --- a/ld/testsuite/ld-ifunc/ifunc.exp +++ b/ld/testsuite/ld-ifunc/ifunc.exp @@ -23,18 +23,27 @@ # Written by Nick Clifton -# IFUNC support has only been implemented for the ix86, x86_64, powerpc, -# aarch64, sparc, and S/390 so far. -if {!(([istarget "i?86-*-*"] - || [istarget "x86_64-*-*"] - || [istarget "powerpc*-*-*"] - || [istarget "aarch64*-*-*"] - || [istarget "sparc*-*-*"] - || [istarget "s390*-*-*"]) - && ([istarget "*-*-elf*"] - || [istarget "*-*-nacl*"] - || [istarget "*-*-linux*"] - || [istarget "*-*-gnu*"])) } { +if { ![is_elf_format] || ![supports_gnu_osabi] + || [istarget arc*-*-*] + || [istarget am33*-*-*] + || [istarget bfin-*-*] + || [istarget cris*-*-*] + || [istarget frv-*-*] + || [istarget lm32-*-*] + || [istarget m32r-*-*] + || [istarget m68k-*-*] + || [istarget microblaze-*-*] + || [istarget mips*-*-*] + || [istarget mn10300-*-*] + || [istarget nds32*-*-*] + || [istarget nios2-*-*] + || [istarget or1k-*-*] + || [istarget riscv*-*-*] + || [istarget score*-*-*] + || [istarget sh*-*-*] + || [istarget tic6x-*-*] + || [istarget tile*-*-*] + || [istarget vax-*-*] } { verbose "IFUNC tests not run - target does not support IFUNC" return } @@ -139,7 +148,7 @@ proc contains_irelative_reloc { binary_file } { # 080496f4 0000002a R_386_IRELATIVE - if { ![regexp "\[0-9a-f\]+\[ \]+\[0-9a-f\]+\[ \]+R_\[_0-9A-Z\]+_IREL(|ATIVE)\[ \]*\[0-9a-f\]*\n" [file_contents readelf.out]] } { + if { ![regexp "\[0-9a-f\]+\[ \]+\[0-9a-f\]+\[ \]+R_(\[_0-9A-Z\]+_IREL(|ATIVE)|PARISC_IPLT)\[ \]*\[0-9a-f\]*\n" [file_contents readelf.out]] } { return 0 } diff --git a/ld/testsuite/ld-ifunc/lib.c b/ld/testsuite/ld-ifunc/lib.c index 393dabf2969..4b24c23f9fa 100644 --- a/ld/testsuite/ld-ifunc/lib.c +++ b/ld/testsuite/ld-ifunc/lib.c @@ -20,7 +20,7 @@ extern __typeof (library_func2) library_func2 __asm__ ("__GI_library_func2"); __asm__(".global __GI_library_func2"); __asm__(".hidden __GI_library_func2"); -__asm__(".set __GI_library_func2, library_func2"); +__asm__("__GI_library_func2 = library_func2"); int library_func (int x) diff --git a/ld/testsuite/ld-ifunc/pr17154-i386-now.d b/ld/testsuite/ld-ifunc/pr17154-i386-now.d index 7f8c6bb84e3..74d653c4e2d 100644 --- a/ld/testsuite/ld-ifunc/pr17154-i386-now.d +++ b/ld/testsuite/ld-ifunc/pr17154-i386-now.d @@ -3,7 +3,7 @@ #as: --32 #objdump: -dw #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* .*: +file format .* diff --git a/ld/testsuite/ld-ifunc/pr17154-i386.d b/ld/testsuite/ld-ifunc/pr17154-i386.d index 6d7c9a63453..6fc8fbeb66b 100644 --- a/ld/testsuite/ld-ifunc/pr17154-i386.d +++ b/ld/testsuite/ld-ifunc/pr17154-i386.d @@ -3,7 +3,7 @@ #as: --32 #objdump: -dw #target: x86_64-*-* i?86-*-* -#notarget: x86_64-*-nacl* i?86-*-nacl* +#notarget: *-*-lynxos *-*-nacl* *-*-nto* *-*-solaris2* #... 0+180 <.*>: