aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-aarch64
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-11-07 11:00:26 +1030
committerAlan Modra <amodra@gmail.com>2019-11-07 11:55:28 +1030
commit3c3358ca1aab5d5ae59f4503e4781b4ebe245778 (patch)
tree907454666206b741a4a99fa5ee16405e3ed62a10 /ld/testsuite/ld-aarch64
parentd70fc6126f1f495c0c08c335fe4689dd32cf8471 (diff)
downloadbinutils-3c3358ca1aab5d5ae59f4503e4781b4ebe245778.zip
binutils-3c3358ca1aab5d5ae59f4503e4781b4ebe245778.tar.gz
binutils-3c3358ca1aab5d5ae59f4503e4781b4ebe245778.tar.bz2
aarch64 and arm testsuite fixes for targets lacking shared libs
* testsuite/ld-aarch64/aarch64-elf.exp: Run tests requiring pie or shared library support only when check_shared_lib_support. * testsuite/ld-aarch64/bti-pac-plt-1.d: Likewise. * testsuite/ld-aarch64/bti-pac-plt-2.d: Likewise. * testsuite/ld-aarch64/bti-plt-1.d: Likewise. * testsuite/ld-aarch64/bti-plt-2.d: Likewise. * testsuite/ld-aarch64/bti-plt-3.d: Likewise. * testsuite/ld-aarch64/bti-plt-4.d: Likewise. * testsuite/ld-aarch64/bti-plt-6.d: Likewise. * testsuite/ld-aarch64/bti-plt-7.d: Likewise. * testsuite/ld-aarch64/bti-warn.d: Likewise. * testsuite/ld-aarch64/dt_textrel.d: Likewise. * testsuite/ld-aarch64/emit-relocs-258-dyn-bad.d: Likewise. * testsuite/ld-aarch64/emit-relocs-259-dyn-bad.d: Likewise. * testsuite/ld-aarch64/emit-relocs-264-bad.d: Likewise. * testsuite/ld-aarch64/emit-relocs-266-bad.d: Likewise. * testsuite/ld-aarch64/emit-relocs-268-bad.d: Likewise. * testsuite/ld-aarch64/emit-relocs-269-bad.d: Likewise. * testsuite/ld-aarch64/emit-relocs-515-be.d: Likewise. * testsuite/ld-aarch64/emit-relocs-515.d: Likewise. * testsuite/ld-aarch64/emit-relocs-516-be.d: Likewise. * testsuite/ld-aarch64/emit-relocs-516.d: Likewise. * testsuite/ld-aarch64/farcall-b-plt.d: Likewise. * testsuite/ld-aarch64/farcall-bl-plt.d: Likewise. * testsuite/ld-aarch64/gc-plt-relocs.d: Likewise. * testsuite/ld-aarch64/gc-relocs-257-dyn.d: Likewise. * testsuite/ld-aarch64/ifunc-1-local.d: Likewise. * testsuite/ld-aarch64/ifunc-1.d: Likewise. * testsuite/ld-aarch64/ifunc-12.d: Likewise. * testsuite/ld-aarch64/ifunc-13.d: Likewise. * testsuite/ld-aarch64/ifunc-14a.d: Likewise. * testsuite/ld-aarch64/ifunc-14b.d: Likewise. * testsuite/ld-aarch64/ifunc-14c.d: Likewise. * testsuite/ld-aarch64/ifunc-14d.d: Likewise. * testsuite/ld-aarch64/ifunc-14e.d: Likewise. * testsuite/ld-aarch64/ifunc-14f.d: Likewise. * testsuite/ld-aarch64/ifunc-15.d: Likewise. * testsuite/ld-aarch64/ifunc-16.d: Likewise. * testsuite/ld-aarch64/ifunc-18a.d: Likewise. * testsuite/ld-aarch64/ifunc-18b.d: Likewise. * testsuite/ld-aarch64/ifunc-19a.d: Likewise. * testsuite/ld-aarch64/ifunc-19b.d: Likewise. * testsuite/ld-aarch64/ifunc-2-local.d: Likewise. * testsuite/ld-aarch64/ifunc-2.d: Likewise. * testsuite/ld-aarch64/ifunc-20.d: Likewise. * testsuite/ld-aarch64/ifunc-21.d: Likewise. * testsuite/ld-aarch64/ifunc-3a.d: Likewise. * testsuite/ld-aarch64/ifunc-3b.d: Likewise. * testsuite/ld-aarch64/ifunc-5b-local.d: Likewise. * testsuite/ld-aarch64/ifunc-5b.d: Likewise. * testsuite/ld-aarch64/ifunc-6b.d: Likewise. * testsuite/ld-aarch64/ifunc-7b.d: Likewise. * testsuite/ld-aarch64/ifunc-7c.d: Likewise. * testsuite/ld-aarch64/pac-plt-1.d: Likewise. * testsuite/ld-aarch64/pac-plt-2.d: Likewise. * testsuite/ld-aarch64/pcrel_pic_defined.d: Likewise. * testsuite/ld-aarch64/pcrel_pic_undefined.d: Likewise. * testsuite/ld-aarch64/pie-bind-locally.d: Likewise. * testsuite/ld-aarch64/plt_mapping_symbol.d: Likewise. * testsuite/ld-aarch64/pr20402.d: Likewise. * testsuite/ld-aarch64/pr22764.d: Likewise. * testsuite/ld-aarch64/property-bti-pac1.d: Likewise. * testsuite/ld-aarch64/protected-data.d: Likewise. * testsuite/ld-aarch64/rela-abs-relative-be.d: Likewise. * testsuite/ld-aarch64/rela-abs-relative-opt.d: Likewise. * testsuite/ld-aarch64/rela-abs-relative.d: Likewise. * testsuite/ld-aarch64/relasz.d: Likewise. * testsuite/ld-aarch64/relocs-1027-symbolic-func.d: Likewise. * testsuite/ld-aarch64/tls-desc-ie-ilp32.d: Likewise. * testsuite/ld-aarch64/tls-desc-ie.d: Likewise. * testsuite/ld-aarch64/tls-large-desc-be.d: Likewise. * testsuite/ld-aarch64/tls-large-desc.d: Likewise. * testsuite/ld-aarch64/tls-large-ie-be.d: Likewise. * testsuite/ld-aarch64/tls-large-ie.d: Likewise. * testsuite/ld-aarch64/tls-relax-gdesc-le-now.d: Likewise. * testsuite/ld-aarch64/tls-small-ld.d: Likewise. * testsuite/ld-aarch64/tls-tiny-desc.d: Likewise. * testsuite/ld-aarch64/tls-tiny-gd.d: Likewise. * testsuite/ld-aarch64/tls-tiny-ie.d: Likewise. * testsuite/ld-aarch64/tls-tiny-ld.d: Likewise. * testsuite/ld-aarch64/tlsle-symbol-offset.d: Likewise. * testsuite/ld-aarch64/tlsle.d: Likewise. * testsuite/ld-aarch64/variant_pcs-now.d: Likewise. * testsuite/ld-aarch64/variant_pcs-shared.d: Likewise. * testsuite/ld-arm/arm-elf.exp: Likewise. Remove --hash-style=sysv from static tests. Consolidate armelftests_common_* vars into one. * testsuite/ld-arm/gc-hidden-1.d: Require check_shared_lib_support. * testsuite/ld-arm/movw-shared-1.d: Likewise. * testsuite/ld-arm/movw-shared-2.d: Likewise. * testsuite/ld-arm/movw-shared-3.d: Likewise. * testsuite/ld-arm/movw-shared-4.d: Likewise. * testsuite/ld-arm/pie-bind-locally.d: Likewise. * testsuite/ld-arm/protected-data.d: Likewise. * testsuite/ld-arm/rel32-reject-pie.d: Likewise. * testsuite/ld-arm/rel32-reject.d: Likewise. * testsuite/ld-arm/thumb2-bl-undefweak.d: Likewise. * testsuite/ld-arm/thumb2-bl-undefweak1.d: Likewise.
Diffstat (limited to 'ld/testsuite/ld-aarch64')
-rw-r--r--ld/testsuite/ld-aarch64/aarch64-elf.exp7
-rw-r--r--ld/testsuite/ld-aarch64/bti-pac-plt-1.d1
-rw-r--r--ld/testsuite/ld-aarch64/bti-pac-plt-2.d1
-rw-r--r--ld/testsuite/ld-aarch64/bti-plt-1.d1
-rw-r--r--ld/testsuite/ld-aarch64/bti-plt-2.d1
-rw-r--r--ld/testsuite/ld-aarch64/bti-plt-3.d1
-rw-r--r--ld/testsuite/ld-aarch64/bti-plt-4.d1
-rw-r--r--ld/testsuite/ld-aarch64/bti-plt-6.d1
-rw-r--r--ld/testsuite/ld-aarch64/bti-plt-7.d1
-rw-r--r--ld/testsuite/ld-aarch64/bti-warn.d1
-rw-r--r--ld/testsuite/ld-aarch64/dt_textrel.d1
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-258-dyn-bad.d1
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-259-dyn-bad.d1
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-264-bad.d1
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-266-bad.d1
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-268-bad.d1
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-269-bad.d1
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-515-be.d1
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-515.d1
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-516-be.d1
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-516.d1
-rw-r--r--ld/testsuite/ld-aarch64/farcall-b-plt.d1
-rw-r--r--ld/testsuite/ld-aarch64/farcall-bl-plt.d1
-rw-r--r--ld/testsuite/ld-aarch64/gc-plt-relocs.d1
-rw-r--r--ld/testsuite/ld-aarch64/gc-relocs-257-dyn.d1
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-1-local.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-1.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-12.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-13.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-14a.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-14b.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-14c.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-14d.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-14e.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-14f.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-15.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-16.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-18a.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-18b.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-19a.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-19b.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-2-local.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-2.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-20.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-21.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-3a.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-3b.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-5b-local.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-5b.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-6b.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-7b.d2
-rw-r--r--ld/testsuite/ld-aarch64/ifunc-7c.d2
-rw-r--r--ld/testsuite/ld-aarch64/pac-plt-1.d1
-rw-r--r--ld/testsuite/ld-aarch64/pac-plt-2.d1
-rw-r--r--ld/testsuite/ld-aarch64/pcrel_pic_defined.d1
-rw-r--r--ld/testsuite/ld-aarch64/pcrel_pic_undefined.d1
-rw-r--r--ld/testsuite/ld-aarch64/pie-bind-locally.d1
-rw-r--r--ld/testsuite/ld-aarch64/plt_mapping_symbol.d3
-rw-r--r--ld/testsuite/ld-aarch64/pr20402.d1
-rw-r--r--ld/testsuite/ld-aarch64/pr22764.d1
-rw-r--r--ld/testsuite/ld-aarch64/property-bti-pac1.d2
-rw-r--r--ld/testsuite/ld-aarch64/protected-data.d1
-rw-r--r--ld/testsuite/ld-aarch64/rela-abs-relative-be.d2
-rw-r--r--ld/testsuite/ld-aarch64/rela-abs-relative-opt.d1
-rw-r--r--ld/testsuite/ld-aarch64/rela-abs-relative.d1
-rw-r--r--ld/testsuite/ld-aarch64/relasz.d1
-rw-r--r--ld/testsuite/ld-aarch64/relocs-1027-symbolic-func.d1
-rw-r--r--ld/testsuite/ld-aarch64/tls-desc-ie-ilp32.d1
-rw-r--r--ld/testsuite/ld-aarch64/tls-desc-ie.d1
-rw-r--r--ld/testsuite/ld-aarch64/tls-large-desc-be.d1
-rw-r--r--ld/testsuite/ld-aarch64/tls-large-desc.d1
-rw-r--r--ld/testsuite/ld-aarch64/tls-large-ie-be.d1
-rw-r--r--ld/testsuite/ld-aarch64/tls-large-ie.d1
-rw-r--r--ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d1
-rw-r--r--ld/testsuite/ld-aarch64/tls-small-ld.d1
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-desc.d1
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-gd.d1
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-ie.d1
-rw-r--r--ld/testsuite/ld-aarch64/tls-tiny-ld.d1
-rw-r--r--ld/testsuite/ld-aarch64/tlsle-symbol-offset.d1
-rw-r--r--ld/testsuite/ld-aarch64/tlsle.d1
-rw-r--r--ld/testsuite/ld-aarch64/variant_pcs-now.d1
-rw-r--r--ld/testsuite/ld-aarch64/variant_pcs-shared.d1
83 files changed, 89 insertions, 31 deletions
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index 631fde0..2b053d1 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -37,11 +37,14 @@ set aarch64elftests {
"--fix-cortex-a53-835769" "" "" {erratum835769.s}
{{objdump -dr erratum835769.d}}
"erratum835769"}
+}
+set tmp {
{"Erratum 835769 dump test -shared"
"--fix-cortex-a53-835769 -shared" "" "" {erratum835769.s}
{{objdump -dr erratum835769.d}}
"erratum835769"}
}
+if [check_shared_lib_support] { append aarch64elftests $tmp }
proc aarch64_choose_ilp32_emul {} {
if [istarget *linux*] then {
@@ -410,7 +413,9 @@ set aarch64elflinktests {
{} "libbti-plt-so.so"}
}
-run_ld_link_tests $aarch64elflinktests
+if [check_shared_lib_support] {
+ run_ld_link_tests $aarch64elflinktests
+}
run_dump_test "bti-plt-3"
run_dump_test "bti-plt-4"
diff --git a/ld/testsuite/ld-aarch64/bti-pac-plt-1.d b/ld/testsuite/ld-aarch64/bti-pac-plt-1.d
index e1c6eb7..495b304 100644
--- a/ld/testsuite/ld-aarch64/bti-pac-plt-1.d
+++ b/ld/testsuite/ld-aarch64/bti-pac-plt-1.d
@@ -1,4 +1,5 @@
#source: bti-plt-1.s
+#target: [check_shared_lib_support]
#as: -mabi=lp64
#ld: -shared -z force-bti -z pac-plt -T bti-plt.ld
#objdump: -dr -j .plt
diff --git a/ld/testsuite/ld-aarch64/bti-pac-plt-2.d b/ld/testsuite/ld-aarch64/bti-pac-plt-2.d
index 0c67615..ed39e21 100644
--- a/ld/testsuite/ld-aarch64/bti-pac-plt-2.d
+++ b/ld/testsuite/ld-aarch64/bti-pac-plt-2.d
@@ -1,4 +1,5 @@
#source: bti-plt-1.s
+#target: [check_shared_lib_support]
#as: -mabi=lp64
#ld: -z force-bti -z pac-plt -e _start -T bti-plt.ld -L./tmpdir -lbti-plt-so
#objdump: -dr -j .plt
diff --git a/ld/testsuite/ld-aarch64/bti-plt-1.d b/ld/testsuite/ld-aarch64/bti-plt-1.d
index f8414a0..9fd7c6b 100644
--- a/ld/testsuite/ld-aarch64/bti-plt-1.d
+++ b/ld/testsuite/ld-aarch64/bti-plt-1.d
@@ -1,5 +1,6 @@
#name: Check -z force-bti emits BTI PLT (shared)
#source: bti-plt-1.s
+#target: [check_shared_lib_support]
#as: -mabi=lp64
#ld: -shared -z force-bti -T bti-plt.ld
#objdump: -dr -j .plt
diff --git a/ld/testsuite/ld-aarch64/bti-plt-2.d b/ld/testsuite/ld-aarch64/bti-plt-2.d
index f1c90b9..c34ab47 100644
--- a/ld/testsuite/ld-aarch64/bti-plt-2.d
+++ b/ld/testsuite/ld-aarch64/bti-plt-2.d
@@ -1,6 +1,7 @@
#name: Check -z force-bti emits BTI feature (shared)
#source: bti-plt-1.s
#source: bti-plt-2.s
+#target: [check_shared_lib_support]
#as: -mabi=lp64
#ld: -shared -z force-bti -T bti-plt.ld
#readelf: -n
diff --git a/ld/testsuite/ld-aarch64/bti-plt-3.d b/ld/testsuite/ld-aarch64/bti-plt-3.d
index 82f08a9..c82878e 100644
--- a/ld/testsuite/ld-aarch64/bti-plt-3.d
+++ b/ld/testsuite/ld-aarch64/bti-plt-3.d
@@ -1,5 +1,6 @@
#name: Check -z force-bti emits BTI PLT (exec)
#source: bti-plt-1.s
+#target: [check_shared_lib_support]
#as: -mabi=lp64
#ld: -z force-bti -e _start -T bti-plt.ld -L./tmpdir -lbti-plt-so
#objdump: -dr -j .plt
diff --git a/ld/testsuite/ld-aarch64/bti-plt-4.d b/ld/testsuite/ld-aarch64/bti-plt-4.d
index 496e124..04d3c7d 100644
--- a/ld/testsuite/ld-aarch64/bti-plt-4.d
+++ b/ld/testsuite/ld-aarch64/bti-plt-4.d
@@ -1,5 +1,6 @@
#name: Check -z force-bti emits BTI feature (exec)
#source: bti-plt-1.s
+#target: [check_shared_lib_support]
#as: -mabi=lp64
#ld: -z force-bti -e _start -T bti-plt.ld -L./tmpdir -lbti-plt-so
#readelf: -n
diff --git a/ld/testsuite/ld-aarch64/bti-plt-6.d b/ld/testsuite/ld-aarch64/bti-plt-6.d
index efb368b..df5c063 100644
--- a/ld/testsuite/ld-aarch64/bti-plt-6.d
+++ b/ld/testsuite/ld-aarch64/bti-plt-6.d
@@ -1,6 +1,7 @@
#name: Warn with one missing GNU NOTE BTI input
#source: property-bti-pac2.s
#source: property-bti-pac1.s
+#target: [check_shared_lib_support]
#as: -mabi=lp64 -defsym __property_pac__=1
#ld: -shared -z force-bti
#warning: .*property-bti-pac2.*: warning: BTI turned on by -z force-bti.*$
diff --git a/ld/testsuite/ld-aarch64/bti-plt-7.d b/ld/testsuite/ld-aarch64/bti-plt-7.d
index e3e84c3..4d23290 100644
--- a/ld/testsuite/ld-aarch64/bti-plt-7.d
+++ b/ld/testsuite/ld-aarch64/bti-plt-7.d
@@ -1,6 +1,7 @@
#name: Warn when neither inputs has GNU NOTE BTI
#source: property-bti-pac2.s
#source: plt_mapping_symbol.s
+#target: [check_shared_lib_support]
#as: -mabi=lp64
#ld: -shared -z force-bti
#warning: .*plt_mapping_symbol.*: warning: BTI turned on by -z force-bti.*
diff --git a/ld/testsuite/ld-aarch64/bti-warn.d b/ld/testsuite/ld-aarch64/bti-warn.d
index 0e3954d..d10cd10 100644
--- a/ld/testsuite/ld-aarch64/bti-warn.d
+++ b/ld/testsuite/ld-aarch64/bti-warn.d
@@ -1,6 +1,7 @@
#name: Warn when both have GNU prop but neither BTI
#source: property-bti-pac2.s
#source: bti-plt-1.s
+#target: [check_shared_lib_support]
#as: -mabi=lp64 --defsym __guard_property_bti__=1 --defsym __property_pac__=1
#ld: -shared -z force-bti
#warning: .*property-bti-pac2.*: warning: BTI turned on by -z force-bti.*
diff --git a/ld/testsuite/ld-aarch64/dt_textrel.d b/ld/testsuite/ld-aarch64/dt_textrel.d
index e28d164..356fea8 100644
--- a/ld/testsuite/ld-aarch64/dt_textrel.d
+++ b/ld/testsuite/ld-aarch64/dt_textrel.d
@@ -1,4 +1,5 @@
#source: dt_textrel.s
+#target: [check_shared_lib_support]
#ld: -shared
#readelf: -d
#...
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-258-dyn-bad.d b/ld/testsuite/ld-aarch64/emit-relocs-258-dyn-bad.d
index 4de6e55..54a8dce 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-258-dyn-bad.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-258-dyn-bad.d
@@ -1,4 +1,5 @@
#name: LP64 R_AARCH64_ABS32 shared library test
#source: emit-relocs-258.s
+#target: [check_shared_lib_support]
#ld: -shared
#error: .*: relocation R_AARCH64_ABS32 against `dummy' can not be used when making a shared object
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-259-dyn-bad.d b/ld/testsuite/ld-aarch64/emit-relocs-259-dyn-bad.d
index f133e89..eaa2498 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-259-dyn-bad.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-259-dyn-bad.d
@@ -1,4 +1,5 @@
#name: R_AARCH64_ABS16 shared library test
#source: emit-relocs-259.s
+#target: [check_shared_lib_support]
#ld: -shared
#error: .*: relocation R_AARCH64_ABS16 against `dummy' can not be used when making a shared object
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-264-bad.d b/ld/testsuite/ld-aarch64/emit-relocs-264-bad.d
index 22718ca..26e16e1 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-264-bad.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-264-bad.d
@@ -1,3 +1,4 @@
#source: emit-relocs-264.s
+#target: [check_shared_lib_support]
#ld: -T relocs.ld --defsym tempy=0x11000 --defsym tempy2=0x45000 --defsym tempy3=0x1234 -e0 -shared
#error: .*relocation R_AARCH64_MOVW_UABS_G0_NC.*can not.*shared object.*fPIC
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-266-bad.d b/ld/testsuite/ld-aarch64/emit-relocs-266-bad.d
index 886494d..b27ab4c 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-266-bad.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-266-bad.d
@@ -1,3 +1,4 @@
#source: emit-relocs-266.s
+#target: [check_shared_lib_support]
#ld: -T relocs.ld --defsym tempy=0x11000 --defsym tempy2=0x45000 --defsym tempy3=0x1234 -e0 -shared
#error: .*relocation R_AARCH64_MOVW_UABS_G1_NC.*can not.*shared object.*fPIC
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-268-bad.d b/ld/testsuite/ld-aarch64/emit-relocs-268-bad.d
index ea97541..bdc4a7d 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-268-bad.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-268-bad.d
@@ -1,3 +1,4 @@
#source: emit-relocs-268.s
+#target: [check_shared_lib_support]
#ld: -T relocs.ld --defsym tempy=0x11000 --defsym tempy2=0x45000 --defsym tempy3=0x1234 -e0 -shared
#error: .*relocation R_AARCH64_MOVW_UABS_G2_NC.*can not.*shared object.*fPIC
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-269-bad.d b/ld/testsuite/ld-aarch64/emit-relocs-269-bad.d
index 9292855..b201fc7 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-269-bad.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-269-bad.d
@@ -1,3 +1,4 @@
#source: emit-relocs-269.s
+#target: [check_shared_lib_support]
#ld: -T relocs.ld --defsym tempy=0x11000 --defsym tempy2=0x45000 --defsym tempy3=0x1234 -e0 -shared
#error: .*relocation R_AARCH64_MOVW_UABS_G3.*can not.*shared object.*fPIC
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-515-be.d b/ld/testsuite/ld-aarch64/emit-relocs-515-be.d
index 82d5bd6..7de1fb0 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-515-be.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-515-be.d
@@ -1,4 +1,5 @@
#source: emit-relocs-515.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#notarget: aarch64-*-*
#objdump: -dr
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-515.d b/ld/testsuite/ld-aarch64/emit-relocs-515.d
index 9d84bf1..535f5f5 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-515.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-515.d
@@ -1,4 +1,5 @@
#source: emit-relocs-515.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#notarget: aarch64_be-*-*
#objdump: -dr
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-516-be.d b/ld/testsuite/ld-aarch64/emit-relocs-516-be.d
index 23332b0..5a0b05c 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-516-be.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-516-be.d
@@ -1,4 +1,5 @@
#source: emit-relocs-516.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#notarget: aarch64-*-*
#objdump: -dr
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-516.d b/ld/testsuite/ld-aarch64/emit-relocs-516.d
index e2ad1d6..72b3631 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-516.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-516.d
@@ -1,4 +1,5 @@
#source: emit-relocs-516.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#notarget: aarch64_be-*-*
#objdump: -dr
diff --git a/ld/testsuite/ld-aarch64/farcall-b-plt.d b/ld/testsuite/ld-aarch64/farcall-b-plt.d
index e20b9c3..90dc243 100644
--- a/ld/testsuite/ld-aarch64/farcall-b-plt.d
+++ b/ld/testsuite/ld-aarch64/farcall-b-plt.d
@@ -1,5 +1,6 @@
#name: aarch64-farcall-b-plt
#source: farcall-b-plt.s
+#target: [check_shared_lib_support]
#as:
#ld: -shared
#objdump: -dr
diff --git a/ld/testsuite/ld-aarch64/farcall-bl-plt.d b/ld/testsuite/ld-aarch64/farcall-bl-plt.d
index 7c3de4a..a8d78d3 100644
--- a/ld/testsuite/ld-aarch64/farcall-bl-plt.d
+++ b/ld/testsuite/ld-aarch64/farcall-bl-plt.d
@@ -1,5 +1,6 @@
#name: aarch64-farcall-bl-plt
#source: farcall-bl-plt.s
+#target: [check_shared_lib_support]
#as:
#ld: -shared
#objdump: -dr
diff --git a/ld/testsuite/ld-aarch64/gc-plt-relocs.d b/ld/testsuite/ld-aarch64/gc-plt-relocs.d
index 07c92dd..5c9b5fe 100644
--- a/ld/testsuite/ld-aarch64/gc-plt-relocs.d
+++ b/ld/testsuite/ld-aarch64/gc-plt-relocs.d
@@ -2,6 +2,7 @@
#source: gc-plt-main.s
#source: gc-plt-hidden.s
#source: gc-plt2.s
+#target: [check_shared_lib_support]
#ld: --gc-sections -T aarch64.ld --shared --hash-style=sysv
#objdump: -dT
diff --git a/ld/testsuite/ld-aarch64/gc-relocs-257-dyn.d b/ld/testsuite/ld-aarch64/gc-relocs-257-dyn.d
index f1f7eb6..56fcfa4 100644
--- a/ld/testsuite/ld-aarch64/gc-relocs-257-dyn.d
+++ b/ld/testsuite/ld-aarch64/gc-relocs-257-dyn.d
@@ -1,5 +1,6 @@
#source: gc-start.s
#source: gc-relocs-257.s
+#target: [check_shared_lib_support]
#ld: --defsym tempy=0x11012 --defsym tempy2=0x45034 --defsym tempy3=0x1234 -T aarch64.ld -shared --gc-sections
#objdump: -R -d
diff --git a/ld/testsuite/ld-aarch64/ifunc-1-local.d b/ld/testsuite/ld-aarch64/ifunc-1-local.d
index 1783637..0d4a92c 100644
--- a/ld/testsuite/ld-aarch64/ifunc-1-local.d
+++ b/ld/testsuite/ld-aarch64/ifunc-1-local.d
@@ -1,6 +1,6 @@
+#target: [check_shared_lib_support]
#ld: -shared --hash-style=sysv
#objdump: -dw
-#target: aarch64*-*-*
#...
0+(110|180|1a0) <(__GI_)?foo>:
diff --git a/ld/testsuite/ld-aarch64/ifunc-1.d b/ld/testsuite/ld-aarch64/ifunc-1.d
index 0274ac0..0f7a3fa 100644
--- a/ld/testsuite/ld-aarch64/ifunc-1.d
+++ b/ld/testsuite/ld-aarch64/ifunc-1.d
@@ -1,6 +1,6 @@
+#target: [check_shared_lib_support]
#ld: -shared --hash-style=sysv
#objdump: -dw
-#target: aarch64*-*-*
#...
0+(130|1a0|1c8) <foo>:
diff --git a/ld/testsuite/ld-aarch64/ifunc-12.d b/ld/testsuite/ld-aarch64/ifunc-12.d
index 8fa8ce0..7d01e76 100644
--- a/ld/testsuite/ld-aarch64/ifunc-12.d
+++ b/ld/testsuite/ld-aarch64/ifunc-12.d
@@ -1,5 +1,5 @@
+#target: [check_shared_lib_support]
#ld: -shared -e bar --gc-sections
#readelf: -r --wide
-#target: aarch64*-*-*
There are no relocations in this file.
diff --git a/ld/testsuite/ld-aarch64/ifunc-13.d b/ld/testsuite/ld-aarch64/ifunc-13.d
index 75ba03f..7c0b7ac 100644
--- a/ld/testsuite/ld-aarch64/ifunc-13.d
+++ b/ld/testsuite/ld-aarch64/ifunc-13.d
@@ -1,8 +1,8 @@
#source: ifunc-13a.s
#source: ifunc-13b.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -r --wide
-#target: aarch64*-*-*
Relocation section '.rela.ifunc' at offset 0x[0-9a-f]+ contains 1 entry:
[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-aarch64/ifunc-14a.d b/ld/testsuite/ld-aarch64/ifunc-14a.d
index ff580d0..959b495 100644
--- a/ld/testsuite/ld-aarch64/ifunc-14a.d
+++ b/ld/testsuite/ld-aarch64/ifunc-14a.d
@@ -1,8 +1,8 @@
#source: ifunc-14a.s
#source: ifunc-14b.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -d
-#target: aarch64*-*-*
#failif
#...
diff --git a/ld/testsuite/ld-aarch64/ifunc-14b.d b/ld/testsuite/ld-aarch64/ifunc-14b.d
index 52ed2b4..ac4db0b 100644
--- a/ld/testsuite/ld-aarch64/ifunc-14b.d
+++ b/ld/testsuite/ld-aarch64/ifunc-14b.d
@@ -1,8 +1,8 @@
#source: ifunc-14b.s
#source: ifunc-14a.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -d
-#target: aarch64*-*-*
#failif
#...
diff --git a/ld/testsuite/ld-aarch64/ifunc-14c.d b/ld/testsuite/ld-aarch64/ifunc-14c.d
index a83126f..0618a22 100644
--- a/ld/testsuite/ld-aarch64/ifunc-14c.d
+++ b/ld/testsuite/ld-aarch64/ifunc-14c.d
@@ -1,8 +1,8 @@
#source: ifunc-14a.s
#source: ifunc-14b.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -r --wide
-#target: aarch64*-*-*
#failif
#...
diff --git a/ld/testsuite/ld-aarch64/ifunc-14d.d b/ld/testsuite/ld-aarch64/ifunc-14d.d
index 4ae88d2..0aa505c 100644
--- a/ld/testsuite/ld-aarch64/ifunc-14d.d
+++ b/ld/testsuite/ld-aarch64/ifunc-14d.d
@@ -1,8 +1,8 @@
#source: ifunc-14b.s
#source: ifunc-14a.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -r --wide
-#target: aarch64*-*-*
#failif
#...
diff --git a/ld/testsuite/ld-aarch64/ifunc-14e.d b/ld/testsuite/ld-aarch64/ifunc-14e.d
index 62de35e..0224bd0 100644
--- a/ld/testsuite/ld-aarch64/ifunc-14e.d
+++ b/ld/testsuite/ld-aarch64/ifunc-14e.d
@@ -1,9 +1,9 @@
#source: ifunc-14a.s
#source: ifunc-14c.s
#source: ifunc-14b.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -r --wide
-#target: aarch64*-*-*
#failif
#...
diff --git a/ld/testsuite/ld-aarch64/ifunc-14f.d b/ld/testsuite/ld-aarch64/ifunc-14f.d
index ab8bdbf..f4b4a64 100644
--- a/ld/testsuite/ld-aarch64/ifunc-14f.d
+++ b/ld/testsuite/ld-aarch64/ifunc-14f.d
@@ -1,9 +1,9 @@
#source: ifunc-14a.s
#source: ifunc-14b.s
#source: ifunc-14c.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -r --wide
-#target: aarch64*-*-*
#failif
#...
diff --git a/ld/testsuite/ld-aarch64/ifunc-15.d b/ld/testsuite/ld-aarch64/ifunc-15.d
index 66bb988..43ae8c5 100644
--- a/ld/testsuite/ld-aarch64/ifunc-15.d
+++ b/ld/testsuite/ld-aarch64/ifunc-15.d
@@ -1,7 +1,7 @@
#source: ifunc-15.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -r --wide
-#target: aarch64*-*-*
Relocation section '.rela.got' at offset 0x[0-9a-f]+ contains 1 entry:
[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-aarch64/ifunc-16.d b/ld/testsuite/ld-aarch64/ifunc-16.d
index 9a20b61..eb49cfb 100644
--- a/ld/testsuite/ld-aarch64/ifunc-16.d
+++ b/ld/testsuite/ld-aarch64/ifunc-16.d
@@ -1,7 +1,7 @@
#source: ifunc-16.s
+#target: [check_shared_lib_support]
#ld: -shared
#readelf: -r --wide
-#target: aarch64*-*-*
Relocation section '.rela.plt' at .*
[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-aarch64/ifunc-18a.d b/ld/testsuite/ld-aarch64/ifunc-18a.d
index 3db91d3..0dcb09e 100644
--- a/ld/testsuite/ld-aarch64/ifunc-18a.d
+++ b/ld/testsuite/ld-aarch64/ifunc-18a.d
@@ -1,8 +1,8 @@
#source: ifunc-18a.s
#source: ifunc-18b.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -r --wide
-#target: aarch64*-*-*
Relocation section '.rela.ifunc' at .*
[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-aarch64/ifunc-18b.d b/ld/testsuite/ld-aarch64/ifunc-18b.d
index b27f526..8694298 100644
--- a/ld/testsuite/ld-aarch64/ifunc-18b.d
+++ b/ld/testsuite/ld-aarch64/ifunc-18b.d
@@ -1,8 +1,8 @@
#source: ifunc-18b.s
#source: ifunc-18a.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -r --wide
-#target: aarch64*-*-*
Relocation section '.rela.ifunc' at .*
[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-aarch64/ifunc-19a.d b/ld/testsuite/ld-aarch64/ifunc-19a.d
index dd82b24..c68dfd8 100644
--- a/ld/testsuite/ld-aarch64/ifunc-19a.d
+++ b/ld/testsuite/ld-aarch64/ifunc-19a.d
@@ -1,8 +1,8 @@
#source: ifunc-19a.s
#source: ifunc-19b.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -r --wide
-#target: aarch64*-*-*
Relocation section '.rela.ifunc' at .*
[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-aarch64/ifunc-19b.d b/ld/testsuite/ld-aarch64/ifunc-19b.d
index 1e0819c..6d66351 100644
--- a/ld/testsuite/ld-aarch64/ifunc-19b.d
+++ b/ld/testsuite/ld-aarch64/ifunc-19b.d
@@ -1,8 +1,8 @@
#source: ifunc-19b.s
#source: ifunc-19a.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -r --wide
-#target: aarch64*-*-*
Relocation section '.rela.ifunc' at .*
[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-aarch64/ifunc-2-local.d b/ld/testsuite/ld-aarch64/ifunc-2-local.d
index a3d9e15..c4054e7 100644
--- a/ld/testsuite/ld-aarch64/ifunc-2-local.d
+++ b/ld/testsuite/ld-aarch64/ifunc-2-local.d
@@ -1,6 +1,6 @@
+#target: [check_shared_lib_support]
#ld: -shared --hash-style=sysv
#objdump: -dw
-#target: aarch64*-*-*
#...
0+(110|180|1a0) <__GI_foo>:
diff --git a/ld/testsuite/ld-aarch64/ifunc-2.d b/ld/testsuite/ld-aarch64/ifunc-2.d
index eb6fa0c..ed8d47d 100644
--- a/ld/testsuite/ld-aarch64/ifunc-2.d
+++ b/ld/testsuite/ld-aarch64/ifunc-2.d
@@ -1,6 +1,6 @@
+#target: [check_shared_lib_support]
#ld: -shared --hash-style=sysv
#objdump: -dw
-#target: aarch64*-*-*
#...
0+(130|1a0|1c8) <foo>:
diff --git a/ld/testsuite/ld-aarch64/ifunc-20.d b/ld/testsuite/ld-aarch64/ifunc-20.d
index 603ba07..f00dea0 100644
--- a/ld/testsuite/ld-aarch64/ifunc-20.d
+++ b/ld/testsuite/ld-aarch64/ifunc-20.d
@@ -1,7 +1,7 @@
#source: ifunc-20.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -r --wide
-#target: aarch64*-*-*
Relocation section '.rela.ifunc' at offset 0x[0-9a-f]+ contains 1 entry:
[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-aarch64/ifunc-21.d b/ld/testsuite/ld-aarch64/ifunc-21.d
index a16186b..28115d2 100644
--- a/ld/testsuite/ld-aarch64/ifunc-21.d
+++ b/ld/testsuite/ld-aarch64/ifunc-21.d
@@ -1,7 +1,7 @@
#source: ifunc-21.s
+#target: [check_shared_lib_support]
#ld: -shared --hash-style=sysv -z nocombreloc
#objdump: -d -s -j .got.plt -j .text
-#target: aarch64*-*-*
# Ensure the .got.plt slot used is correct
diff --git a/ld/testsuite/ld-aarch64/ifunc-3a.d b/ld/testsuite/ld-aarch64/ifunc-3a.d
index 4919d96..4643647 100644
--- a/ld/testsuite/ld-aarch64/ifunc-3a.d
+++ b/ld/testsuite/ld-aarch64/ifunc-3a.d
@@ -1,7 +1,7 @@
#source: ifunc-3.s
+#target: [check_shared_lib_support]
#ld: -shared --hash-style=sysv
#objdump: -dw
-#target: aarch64*-*-*
#...
0+(150|1d0|1e8) <__GI_foo>:
diff --git a/ld/testsuite/ld-aarch64/ifunc-3b.d b/ld/testsuite/ld-aarch64/ifunc-3b.d
index 7e177a6..2d2ec41 100644
--- a/ld/testsuite/ld-aarch64/ifunc-3b.d
+++ b/ld/testsuite/ld-aarch64/ifunc-3b.d
@@ -1,7 +1,7 @@
#source: ifunc-3.s
+#target: [check_shared_lib_support]
#ld: -shared
#readelf: -r --wide
-#target: aarch64*-*-*
#...
[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_[_0-9A-Z]+_IRELATIVE[ ]*[0-9a-f]*
diff --git a/ld/testsuite/ld-aarch64/ifunc-5b-local.d b/ld/testsuite/ld-aarch64/ifunc-5b-local.d
index 1a7cab7..c69d05b 100644
--- a/ld/testsuite/ld-aarch64/ifunc-5b-local.d
+++ b/ld/testsuite/ld-aarch64/ifunc-5b-local.d
@@ -1,7 +1,7 @@
#source: ifunc-5-local.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -r --wide
-#target: aarch64*-*-*
Relocation section '.rela.plt' at .*
[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-aarch64/ifunc-5b.d b/ld/testsuite/ld-aarch64/ifunc-5b.d
index 03a7837..58beca2 100644
--- a/ld/testsuite/ld-aarch64/ifunc-5b.d
+++ b/ld/testsuite/ld-aarch64/ifunc-5b.d
@@ -1,7 +1,7 @@
#source: ifunc-5.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -r --wide
-#target: aarch64*-*-*
Relocation section '.rela.got' at .*
[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-aarch64/ifunc-6b.d b/ld/testsuite/ld-aarch64/ifunc-6b.d
index d7248e8..a8ff819 100644
--- a/ld/testsuite/ld-aarch64/ifunc-6b.d
+++ b/ld/testsuite/ld-aarch64/ifunc-6b.d
@@ -1,7 +1,7 @@
#source: ifunc-6.s
+#target: [check_shared_lib_support]
#ld: -shared -z nocombreloc
#readelf: -r --wide
-#target: aarch64*-*-*
Relocation section '.rela.got' at .*
[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-aarch64/ifunc-7b.d b/ld/testsuite/ld-aarch64/ifunc-7b.d
index ff1e73e..aa871e9 100644
--- a/ld/testsuite/ld-aarch64/ifunc-7b.d
+++ b/ld/testsuite/ld-aarch64/ifunc-7b.d
@@ -1,7 +1,7 @@
#source: ifunc-7.s
#ld: -shared
+#target: [check_shared_lib_support]
#readelf: -r --wide
-#target: aarch64*-*-*
Relocation section '.rela.plt' at .*
[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-aarch64/ifunc-7c.d b/ld/testsuite/ld-aarch64/ifunc-7c.d
index e56322a..e526fea 100644
--- a/ld/testsuite/ld-aarch64/ifunc-7c.d
+++ b/ld/testsuite/ld-aarch64/ifunc-7c.d
@@ -1,7 +1,7 @@
#source: ifunc-7.s
+#target: [check_shared_lib_support]
#ld: -shared
#objdump: -dr -j .text
-#target: aarch64*-*-*
# Check if adrp and ldr have been relocated correctly.
diff --git a/ld/testsuite/ld-aarch64/pac-plt-1.d b/ld/testsuite/ld-aarch64/pac-plt-1.d
index 06278ef..ac94670 100644
--- a/ld/testsuite/ld-aarch64/pac-plt-1.d
+++ b/ld/testsuite/ld-aarch64/pac-plt-1.d
@@ -1,4 +1,5 @@
#source: bti-plt-1.s
+#target: [check_shared_lib_support]
#as: -mabi=lp64 --defsym __guard_property_bti__=1
#ld: -shared -z pac-plt -T bti-plt.ld
#objdump: -dr -j .plt
diff --git a/ld/testsuite/ld-aarch64/pac-plt-2.d b/ld/testsuite/ld-aarch64/pac-plt-2.d
index b5cf43d..611bf8b 100644
--- a/ld/testsuite/ld-aarch64/pac-plt-2.d
+++ b/ld/testsuite/ld-aarch64/pac-plt-2.d
@@ -1,4 +1,5 @@
#source: tls-desc-ie.s
+#target: [check_shared_lib_support]
#ld: -shared -z pac-plt -T bti-plt.ld
#objdump: -dr -j .plt
#...
diff --git a/ld/testsuite/ld-aarch64/pcrel_pic_defined.d b/ld/testsuite/ld-aarch64/pcrel_pic_defined.d
index a611e31..26b70a6a 100644
--- a/ld/testsuite/ld-aarch64/pcrel_pic_defined.d
+++ b/ld/testsuite/ld-aarch64/pcrel_pic_defined.d
@@ -1,5 +1,6 @@
#name: PC-Rel relocation against defined
#source: pcrel.s
+#target: [check_shared_lib_support]
#ld: -shared -e0 -defsym global_a=0x1000 -defsym global_b=0x2000
#error: .*: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `global_a.*bind externally.*fPIC.*
#error: .*: dangerous relocation: unsupported relocation
diff --git a/ld/testsuite/ld-aarch64/pcrel_pic_undefined.d b/ld/testsuite/ld-aarch64/pcrel_pic_undefined.d
index b5d6372..fd8ddb3 100644
--- a/ld/testsuite/ld-aarch64/pcrel_pic_undefined.d
+++ b/ld/testsuite/ld-aarch64/pcrel_pic_undefined.d
@@ -1,5 +1,6 @@
#name: PC-Rel relocation against undefined
#source: pcrel.s
+#target: [check_shared_lib_support]
#ld: -shared -e0 -defsym global_b=0x2000
#error: .*: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `global_a.*bind externally.*fPIC.*
#error: .*: dangerous relocation: unsupported relocation
diff --git a/ld/testsuite/ld-aarch64/pie-bind-locally.d b/ld/testsuite/ld-aarch64/pie-bind-locally.d
index 3689543..a8a27fbb 100644
--- a/ld/testsuite/ld-aarch64/pie-bind-locally.d
+++ b/ld/testsuite/ld-aarch64/pie-bind-locally.d
@@ -1,5 +1,6 @@
#source: pie-bind-locally-a.s
#source: pie-bind-locally-b.s
+#target: [check_shared_lib_support]
#ld: -pie
#readelf: -Wr
diff --git a/ld/testsuite/ld-aarch64/plt_mapping_symbol.d b/ld/testsuite/ld-aarch64/plt_mapping_symbol.d
index 3b86cff..f1ffd07 100644
--- a/ld/testsuite/ld-aarch64/plt_mapping_symbol.d
+++ b/ld/testsuite/ld-aarch64/plt_mapping_symbol.d
@@ -1,7 +1,8 @@
+#name: AArch64 mapping symbol for plt section test.
#source: plt_mapping_symbol.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#objdump: --syms --special-syms
-#name: AArch64 mapping symbol for plt section test.
#...
SYMBOL TABLE:
diff --git a/ld/testsuite/ld-aarch64/pr20402.d b/ld/testsuite/ld-aarch64/pr20402.d
index 9cfeeb7..0c7ca17 100644
--- a/ld/testsuite/ld-aarch64/pr20402.d
+++ b/ld/testsuite/ld-aarch64/pr20402.d
@@ -1,3 +1,4 @@
+#target: [check_shared_lib_support]
#ld: -pie -defsym foo=0x1 -defsym bar=0x2
#readelf: -r
diff --git a/ld/testsuite/ld-aarch64/pr22764.d b/ld/testsuite/ld-aarch64/pr22764.d
index 997519f..4830d22 100644
--- a/ld/testsuite/ld-aarch64/pr22764.d
+++ b/ld/testsuite/ld-aarch64/pr22764.d
@@ -1,4 +1,5 @@
#source: pr22764.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -defsym sym_abs1=0x1 -defsym sym_abs2=0x2 -defsym sym_abs3=0x3 -e0 --emit-relocs
#notarget: aarch64_be-*-*
#objdump: -dr
diff --git a/ld/testsuite/ld-aarch64/property-bti-pac1.d b/ld/testsuite/ld-aarch64/property-bti-pac1.d
index 3acb850..59fa695 100644
--- a/ld/testsuite/ld-aarch64/property-bti-pac1.d
+++ b/ld/testsuite/ld-aarch64/property-bti-pac1.d
@@ -1,9 +1,9 @@
#name: GNU Property (single input, combine section)
#source: property-bti-pac1.s
+#alltargets: [check_shared_lib_support] *linux*
#as: -march=armv8.5-a -defsym __mult__=0
#ld: -shared
#readelf: -n
-#target: *linux*
Displaying notes found in: .note.gnu.property
[ ]+Owner[ ]+Data size[ ]+Description
diff --git a/ld/testsuite/ld-aarch64/protected-data.d b/ld/testsuite/ld-aarch64/protected-data.d
index df106dc..5dabf04 100644
--- a/ld/testsuite/ld-aarch64/protected-data.d
+++ b/ld/testsuite/ld-aarch64/protected-data.d
@@ -1,3 +1,4 @@
+#target: [check_shared_lib_support]
#ld: -shared
#readelf: -r -W
#...
diff --git a/ld/testsuite/ld-aarch64/rela-abs-relative-be.d b/ld/testsuite/ld-aarch64/rela-abs-relative-be.d
index 88ba58d..333122a 100644
--- a/ld/testsuite/ld-aarch64/rela-abs-relative-be.d
+++ b/ld/testsuite/ld-aarch64/rela-abs-relative-be.d
@@ -1,7 +1,7 @@
#name: rela-abs-relative (big endian)
#source: rela-abs-relative.s
+#alltargets: [check_shared_lib_support] aarch64_be-*-*
#ld: -shared -Ttext-segment=0x100000 -Tdata=0x200000 -Trelocs.ld
-#target: aarch64_be-*-*
#objdump: -dR -j .data
#...
diff --git a/ld/testsuite/ld-aarch64/rela-abs-relative-opt.d b/ld/testsuite/ld-aarch64/rela-abs-relative-opt.d
index a1e5ca0..7d76758 100644
--- a/ld/testsuite/ld-aarch64/rela-abs-relative-opt.d
+++ b/ld/testsuite/ld-aarch64/rela-abs-relative-opt.d
@@ -1,5 +1,6 @@
#name: rela-abs-relative --no-apply-dynamic-relocs
#source: rela-abs-relative.s
+#target: [check_shared_lib_support]
#ld: -shared -Ttext-segment=0x100000 -Tdata=0x200000 -Trelocs.ld --no-apply-dynamic-relocs
#notarget: aarch64_be-*-*
#objdump: -dR -j .data
diff --git a/ld/testsuite/ld-aarch64/rela-abs-relative.d b/ld/testsuite/ld-aarch64/rela-abs-relative.d
index aba876b..0d43bfc 100644
--- a/ld/testsuite/ld-aarch64/rela-abs-relative.d
+++ b/ld/testsuite/ld-aarch64/rela-abs-relative.d
@@ -1,5 +1,6 @@
#name: rela-abs-relative
#source: rela-abs-relative.s
+#target: [check_shared_lib_support]
#ld: -shared -Ttext-segment=0x100000 -Tdata=0x200000 -Trelocs.ld
#notarget: aarch64_be-*-*
#objdump: -dR -j .data
diff --git a/ld/testsuite/ld-aarch64/relasz.d b/ld/testsuite/ld-aarch64/relasz.d
index 28fe83a..47f5de4 100644
--- a/ld/testsuite/ld-aarch64/relasz.d
+++ b/ld/testsuite/ld-aarch64/relasz.d
@@ -1,4 +1,5 @@
#source: relasz.s
+#target: [check_shared_lib_support]
#ld: -shared --hash-style=sysv -Taarch64.ld
#readelf: -d
# Check that the RELASZ section has the correct size even if we are
diff --git a/ld/testsuite/ld-aarch64/relocs-1027-symbolic-func.d b/ld/testsuite/ld-aarch64/relocs-1027-symbolic-func.d
index 19b81f3..c3dd57c 100644
--- a/ld/testsuite/ld-aarch64/relocs-1027-symbolic-func.d
+++ b/ld/testsuite/ld-aarch64/relocs-1027-symbolic-func.d
@@ -1,4 +1,5 @@
#source: relocs-1027-symbolic-func.s
+#target: [check_shared_lib_support]
#ld: -shared -Bsymbolic-functions
#readelf: -r --wide
#...
diff --git a/ld/testsuite/ld-aarch64/tls-desc-ie-ilp32.d b/ld/testsuite/ld-aarch64/tls-desc-ie-ilp32.d
index 40680a6..2cf42dc 100644
--- a/ld/testsuite/ld-aarch64/tls-desc-ie-ilp32.d
+++ b/ld/testsuite/ld-aarch64/tls-desc-ie-ilp32.d
@@ -1,4 +1,5 @@
#source: tls-desc-ie.s
+#target: [check_shared_lib_support]
#as: -mabi=ilp32
#ld: -shared -m [aarch64_choose_ilp32_emul] -T relocs-ilp32.ld -e0
#objdump: -dr
diff --git a/ld/testsuite/ld-aarch64/tls-desc-ie.d b/ld/testsuite/ld-aarch64/tls-desc-ie.d
index 1b1b927..be6eb1c 100644
--- a/ld/testsuite/ld-aarch64/tls-desc-ie.d
+++ b/ld/testsuite/ld-aarch64/tls-desc-ie.d
@@ -1,4 +1,5 @@
#source: tls-desc-ie.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#objdump: -dr
#...
diff --git a/ld/testsuite/ld-aarch64/tls-large-desc-be.d b/ld/testsuite/ld-aarch64/tls-large-desc-be.d
index 217794c..433b2b0 100644
--- a/ld/testsuite/ld-aarch64/tls-large-desc-be.d
+++ b/ld/testsuite/ld-aarch64/tls-large-desc-be.d
@@ -1,4 +1,5 @@
#source: tls-large-desc.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#notarget: aarch64-*-*
#objdump: -dr
diff --git a/ld/testsuite/ld-aarch64/tls-large-desc.d b/ld/testsuite/ld-aarch64/tls-large-desc.d
index 9fa6dcc..f63cb9b 100644
--- a/ld/testsuite/ld-aarch64/tls-large-desc.d
+++ b/ld/testsuite/ld-aarch64/tls-large-desc.d
@@ -1,4 +1,5 @@
#source: tls-large-desc.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#notarget: aarch64_be-*-*
#objdump: -dr
diff --git a/ld/testsuite/ld-aarch64/tls-large-ie-be.d b/ld/testsuite/ld-aarch64/tls-large-ie-be.d
index 64a4384..5ef724b 100644
--- a/ld/testsuite/ld-aarch64/tls-large-ie-be.d
+++ b/ld/testsuite/ld-aarch64/tls-large-ie-be.d
@@ -1,4 +1,5 @@
#source: tls-large-ie.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#notarget: aarch64-*-*
#objdump: -dr
diff --git a/ld/testsuite/ld-aarch64/tls-large-ie.d b/ld/testsuite/ld-aarch64/tls-large-ie.d
index 98606d6..55bb7a4 100644
--- a/ld/testsuite/ld-aarch64/tls-large-ie.d
+++ b/ld/testsuite/ld-aarch64/tls-large-ie.d
@@ -1,4 +1,5 @@
#source: tls-large-ie.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#notarget: aarch64_be-*-*
#objdump: -dr
diff --git a/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d b/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d
index f1565e9..8b6dcef 100644
--- a/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d
+++ b/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d
@@ -1,4 +1,5 @@
#source: tls-relax-gdesc-le.s
+#target: [check_shared_lib_support]
#ld: -shared -z now
#readelf: -dr
#...
diff --git a/ld/testsuite/ld-aarch64/tls-small-ld.d b/ld/testsuite/ld-aarch64/tls-small-ld.d
index dce10af..e39f888 100644
--- a/ld/testsuite/ld-aarch64/tls-small-ld.d
+++ b/ld/testsuite/ld-aarch64/tls-small-ld.d
@@ -1,4 +1,5 @@
#source: tls-small-ld.s
+#target: [check_shared_lib_support]
#ld: -T relocs.ld -shared --hash-style=sysv
#readelf: -Wr
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-desc.d b/ld/testsuite/ld-aarch64/tls-tiny-desc.d
index c17c448..6eb81ea 100644
--- a/ld/testsuite/ld-aarch64/tls-tiny-desc.d
+++ b/ld/testsuite/ld-aarch64/tls-tiny-desc.d
@@ -1,4 +1,5 @@
#source: tls-tiny-desc.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#objdump: -dr
#...
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-gd.d b/ld/testsuite/ld-aarch64/tls-tiny-gd.d
index 9133492..36d0879 100644
--- a/ld/testsuite/ld-aarch64/tls-tiny-gd.d
+++ b/ld/testsuite/ld-aarch64/tls-tiny-gd.d
@@ -1,4 +1,5 @@
#source: tls-tiny-gd.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#objdump: -dr
#...
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-ie.d b/ld/testsuite/ld-aarch64/tls-tiny-ie.d
index 849e73d..5f1e6da 100644
--- a/ld/testsuite/ld-aarch64/tls-tiny-ie.d
+++ b/ld/testsuite/ld-aarch64/tls-tiny-ie.d
@@ -1,4 +1,5 @@
#source: tls-tiny-ie.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#objdump: -dr
#...
diff --git a/ld/testsuite/ld-aarch64/tls-tiny-ld.d b/ld/testsuite/ld-aarch64/tls-tiny-ld.d
index a9eb0a5..0a31ed9 100644
--- a/ld/testsuite/ld-aarch64/tls-tiny-ld.d
+++ b/ld/testsuite/ld-aarch64/tls-tiny-ld.d
@@ -1,4 +1,5 @@
#source: tls-tiny-ld.s
+#target: [check_shared_lib_support]
#ld: -T relocs.ld -shared --hash-style=sysv
#readelf: -Wr
diff --git a/ld/testsuite/ld-aarch64/tlsle-symbol-offset.d b/ld/testsuite/ld-aarch64/tlsle-symbol-offset.d
index cf61691..f1c6abf 100644
--- a/ld/testsuite/ld-aarch64/tlsle-symbol-offset.d
+++ b/ld/testsuite/ld-aarch64/tlsle-symbol-offset.d
@@ -1,4 +1,5 @@
#source: tlsle-symbol-offset.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#objdump: -dr
#...
diff --git a/ld/testsuite/ld-aarch64/tlsle.d b/ld/testsuite/ld-aarch64/tlsle.d
index c74f662..2340c9b 100644
--- a/ld/testsuite/ld-aarch64/tlsle.d
+++ b/ld/testsuite/ld-aarch64/tlsle.d
@@ -1,4 +1,5 @@
#source: tlsle.s
+#target: [check_shared_lib_support]
#ld: -shared -T relocs.ld -e0
#objdump: -dr
diff --git a/ld/testsuite/ld-aarch64/variant_pcs-now.d b/ld/testsuite/ld-aarch64/variant_pcs-now.d
index c3f48fe..7ee9d8e 100644
--- a/ld/testsuite/ld-aarch64/variant_pcs-now.d
+++ b/ld/testsuite/ld-aarch64/variant_pcs-now.d
@@ -1,5 +1,6 @@
#source: variant_pcs-1.s
#source: variant_pcs-2.s
+#target: [check_shared_lib_support]
#ld: -shared --hash-style=sysv -T variant_pcs.ld -z now
#readelf: -rsW
diff --git a/ld/testsuite/ld-aarch64/variant_pcs-shared.d b/ld/testsuite/ld-aarch64/variant_pcs-shared.d
index bdcc2c8..15e548a 100644
--- a/ld/testsuite/ld-aarch64/variant_pcs-shared.d
+++ b/ld/testsuite/ld-aarch64/variant_pcs-shared.d
@@ -1,5 +1,6 @@
#source: variant_pcs-1.s
#source: variant_pcs-2.s
+#target: [check_shared_lib_support]
#ld: -shared --hash-style=sysv -T variant_pcs.ld
#readelf: -rsW