aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-arm
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-arm
parentd70fc6126f1f495c0c08c335fe4689dd32cf8471 (diff)
downloadgdb-3c3358ca1aab5d5ae59f4503e4781b4ebe245778.zip
gdb-3c3358ca1aab5d5ae59f4503e4781b4ebe245778.tar.gz
gdb-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-arm')
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp85
-rw-r--r--ld/testsuite/ld-arm/gc-hidden-1.d1
-rw-r--r--ld/testsuite/ld-arm/movw-shared-1.d1
-rw-r--r--ld/testsuite/ld-arm/movw-shared-2.d1
-rw-r--r--ld/testsuite/ld-arm/movw-shared-3.d1
-rw-r--r--ld/testsuite/ld-arm/movw-shared-4.d1
-rw-r--r--ld/testsuite/ld-arm/pie-bind-locally.d1
-rw-r--r--ld/testsuite/ld-arm/protected-data.d1
-rw-r--r--ld/testsuite/ld-arm/rel32-reject-pie.d1
-rw-r--r--ld/testsuite/ld-arm/rel32-reject.d1
-rw-r--r--ld/testsuite/ld-arm/thumb2-bl-undefweak.d1
-rw-r--r--ld/testsuite/ld-arm/thumb2-bl-undefweak1.d1
12 files changed, 80 insertions, 16 deletions
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 118aa64..b4ff044 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -72,10 +72,12 @@ if { ![is_elf_format] || ![istarget "arm*-*-*"] } {
# nm: Apply nm options on result. Compare with regex (last arg).
# readelf: Apply readelf options on result. Compare with regex (last arg).
-set armelftests_common_1 {
+set armelftests_common {
{"Group relocations" "-Ttext 0x8000 -Tdata 0x3000000 --section-start alpha=0xeef0 --section-start beta=0xffeef0" "" "" {group-relocs.s}
{{objdump -dr group-relocs.d}}
"group-relocs"}
+}
+set tmp {
{"Indirect cross-library function reference (set-up)"
"-shared" "" "" {arm-lib-plt-2a.s}
{}
@@ -84,6 +86,9 @@ set armelftests_common_1 {
"-shared tmpdir/arm-lib-plt-2a.so" "" "" {arm-lib-plt-2b.s}
{{objdump -dr arm-lib-plt-2.dd} {readelf --relocs arm-lib-plt-2.rd}}
"arm-lib-plt-2b.so"}
+}
+if [check_shared_lib_support] { append armelftests_common $tmp }
+set tmp {
{"Simple static application" "" "" "" {arm-static-app.s}
{{objdump -fdw arm-static-app.d} {objdump -rw arm-static-app.r}}
"arm-static-app"}
@@ -105,12 +110,21 @@ set armelftests_common_1 {
{"arm-rel31" "-static -T arm.ld" "" "" {arm-rel31.s}
{{objdump -s arm-rel31.d}}
"arm-rel31"}
+}
+append armelftests_common $tmp
+set tmp {
{"arm-rel32" "-shared -T arm-dyn.ld --hash-style=sysv" "" "" {arm-rel32.s}
{{objdump -Rsj.data arm-rel32.d}}
"arm-rel32"}
+}
+if [check_shared_lib_support] { append armelftests_common $tmp }
+set tmp {
{"arm-call" "--no-fix-arm1176 -static -T arm.ld" "" "-meabi=4" {arm-call1.s arm-call2.s}
{{objdump -d arm-call.d}}
"arm-call"}
+}
+append armelftests_common $tmp
+set tmp {
{"TLS shared library" "-shared -T arm-lib.ld --hash-style=sysv" ""
"" {tls-lib.s}
{{objdump -fdw tls-lib.d} {objdump -Rw tls-lib.r}}
@@ -123,38 +137,53 @@ set armelftests_common_1 {
"-shared -T arm-dyn.ld --hash-style=sysv" "" "" {tls-gdesc-got.s}
{{objdump "-fDR -j .got" tls-gdesc-got.d}}
"tls-lib2-got.so"}
+}
+if [check_shared_lib_support] { append armelftests_common $tmp }
+set tmp {
{"TLS gnu GD to IE relaxation"
- "-static -T arm-dyn.ld --hash-style=sysv" "" "" {tls-gdierelax.s}
+ "-static -T arm-dyn.ld" "" "" {tls-gdierelax.s}
{{objdump -fdw tls-gdierelax.d}}
"tls-app-rel-ie"}
+}
+append armelftests_common $tmp
+set tmp {
{"TLS gnu GD to IE shared relaxation"
"--no-fix-arm1176 -shared -T arm-dyn.ld --hash-style=sysv" ""
"" {tls-gdierelax2.s}
{{objdump -fdw tls-gdierelax2.d}}
"tls-app-rel-ie2"}
- {"TLS gnu GD to LE relaxation" "-T arm-dyn.ld --hash-style=sysv" ""
+}
+if [check_shared_lib_support] { append armelftests_common $tmp }
+set tmp {
+ {"TLS gnu GD to LE relaxation" "-T arm-dyn.ld" ""
"" {tls-gdlerelax.s}
{{objdump -fdw tls-gdlerelax.d}}
"tls-app-rel-le"}
+}
+append armelftests_common $tmp
+set tmp {
{"TLS mixed models shared lib"
"-shared -T arm-dyn.ld --hash-style=sysv" "" "" {tls-mixed.s}
{{objdump -Rw tls-mixed.r}}
"tls-mixed.so"}
+}
+if [check_shared_lib_support] { append armelftests_common $tmp }
+set tmp {
{"TLS descseq relaxation"
- "-T arm-dyn.ld --hash-style=sysv" "" "" {tls-descrelax.s}
+ "-T arm-dyn.ld" "" "" {tls-descrelax.s}
{{objdump -fdw tls-descrelax.d}}
"tls-descrelax"}
{"TLS descseq relaxation v7"
- "-T arm-dyn.ld --hash-style=sysv" "" "" {tls-descrelax-v7.s}
+ "-T arm-dyn.ld" "" "" {tls-descrelax-v7.s}
{{objdump -fdw tls-descrelax-v7.d}}
"tls-descrelax-v7"}
{"TLS descseq relaxation BE8"
- "-T arm-dyn.ld --hash-style=sysv -EB --be8" ""
+ "-T arm-dyn.ld -EB --be8" ""
"-mbig-endian" {tls-descrelax-be8.s}
{{objdump -fdw tls-descrelax-be8.d}}
"tls-descrelax-be8"}
{"TLS descseq relaxation BE32"
- "-T arm-dyn.ld --hash-style=sysv -EB" ""
+ "-T arm-dyn.ld -EB" ""
"-mbig-endian" {tls-descrelax-be32.s}
{{objdump -fdw tls-descrelax-be32.d}}
"tls-descrelax-be32"}
@@ -203,14 +232,16 @@ set armelftests_common_1 {
{{objdump -sj.data gc-unwind.d}}
"gc-unwind"}
}
+append armelftests_common $tmp
-set armelftests_common_2 {
+set tmp {
{"script-type" "-static -T script-type.ld" "" "" {script-type.s}
{{readelf -s script-type.sym}}
"script-type"}
}
+if ![istarget "arm*-*-netbsdelf"] { append armelftests_common $tmp }
-set armelftests_common_3 {
+set tmp {
{"callweak" "-static -T arm.ld" "" "" {callweak.s}
{{objdump -dr callweak.d}}
"callweak"}
@@ -220,6 +251,9 @@ set armelftests_common_3 {
{"Data only mapping symbols" "-T data-only-map.ld -Map map" "" "" {data-only-map.s}
{{objdump -dr data-only-map.d}}
"data-only-map"}
+}
+append armelftests_common $tmp
+set tmp {
{"Data only mapping symbols for merged sections" "-T rodata-merge-map.ld" "" "" {rodata-merge-map1.s rodata-merge-map2.s rodata-merge-map3.s}
{{readelf -s rodata-merge-map.sym}}
"rodata-merge-map"}
@@ -234,25 +268,40 @@ set armelftests_common_3 {
{"Simple non-PIC shared library (no PLT check)" "-shared" "" "" {arm-lib.s}
{{objdump -Rw arm-lib.r}}
"arm-lib.so"}
+}
+if [check_shared_lib_support] { append armelftests_common $tmp }
+set tmp {
{"EABI soft-float ET_EXEC ABI flag" "-T arm.ld" "" "-mfloat-abi=soft -meabi=5" {eabi-soft-float.s}
{{readelf -h eabi-soft-float.d}}
"eabi-soft-float"}
{"EABI hard-float ET_EXEC ABI flag" "-T arm.ld" "" "-mfloat-abi=hard -meabi=5" {eabi-hard-float.s}
{{readelf -h eabi-hard-float.d}}
"eabi-hard-float"}
+}
+append armelftests_common $tmp
+set tmp {
{"EABI hard-float ET_DYN ABI flag" "-shared" "" "-mfloat-abi=hard -meabi=5" {eabi-hard-float.s}
{{readelf -h eabi-hard-float.d}}
"eabi-hard-float.so"}
+}
+if [check_shared_lib_support] { append armelftests_common $tmp }
+set tmp {
{"EABI ABI flags wrong ABI version" "-T arm.ld" "" "-mfloat-abi=soft -meabi=4" {eabi-soft-float.s}
{{readelf -h eabi-soft-float-ABI4.d}}
"eabi-soft-float-no-flags"}
{"EABI ABI flags ld -r" "-r" "" "-mfloat-abi=soft -meabi=5" {eabi-soft-float.s}
{{readelf -h eabi-soft-float-r.d}}
"eabi-soft-float-r.o"}
+}
+append armelftests_common $tmp
+set tmp {
{"PC-relative in -shared" "-shared --hash-style=sysv" ""
"" {pcrel-shared.s}
{{readelf -dr pcrel-shared.rd}}
"pcrel-shared.so"}
+}
+if [check_shared_lib_support] { append armelftests_common $tmp }
+set tmp {
{"MOVS thumb1 relocations" "-static -T arm.ld" "" "" {thumb1-movs.s}
{{objdump -dw thumb1-movs.d}}
"thumb1-movs"}
@@ -270,13 +319,9 @@ set armelftests_common_3 {
{{objdump -dw branch-futures.d}}
"branch-futures"}
}
+append armelftests_common $tmp
-run_ld_link_tests $armelftests_common_1
-if { ![istarget "arm*-*-netbsdelf"] } {
- run_ld_link_tests $armelftests_common_2
-}
-run_ld_link_tests $armelftests_common_3
-
+run_ld_link_tests $armelftests_common
set armelftests_nonacl {
{"Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x401000" "" "" {thumb1-bl.s}
@@ -291,6 +336,8 @@ set armelftests_nonacl {
{"jump19" "-static -T arm.ld" "" "" {jump19.s}
{{objdump -dr jump19.d}}
"jump19"}
+}
+set tmp {
{"Thumb and -gc-sections"
"-shared -T arm-dyn.ld --hash-style=sysv" "" "" {gc-thumb-lib.s}
{}
@@ -298,7 +345,6 @@ set armelftests_nonacl {
{"Thumb and -gc-sections" "-pie -T arm.ld -gc-sections tmpdir/gc-thumb-lib.so" "" "" {gc-thumb.s}
{{readelf --relocs gc-thumb.d}}
"gc-thumb"}
-
{"Simple non-PIC shared library" "-shared" "" "" {arm-lib.s}
{{objdump -fdw arm-lib.d} {objdump -Rw arm-lib.r}}
"arm-lib.so"}
@@ -308,10 +354,16 @@ set armelftests_nonacl {
{"Simple dynamic application" "tmpdir/arm-lib.so" "" "" {arm-app.s}
{{objdump -fdw arm-app.d} {objdump -Rw arm-app.r}}
"arm-app"}
+}
+if [check_shared_lib_support] { append armelftests_nonacl $tmp }
+set tmp {
{"Simple static application without .rel.plt in linker script"
"-T arm-no-rel-plt.ld" "" "" {arm-static-app.s}
{{objdump -fdw arm-static-app.d} {objdump -rw arm-static-app.r}}
"arm-static-app-no-rel-plt"}
+}
+append armelftests_nonacl $tmp
+set tmp {
{"Simple dynamic application without .rel.plt in linker script"
"tmpdir/arm-lib.so -T arm-no-rel-plt.ld" "" "" {arm-app.s}
{{readelf -dr arm-no-rel-plt.r}}
@@ -358,6 +410,7 @@ set armelftests_nonacl {
{{objdump -fdw tls-lib-loc.d} {objdump -Rw tls-lib-loc.r}}
"tls-lib-loc.so"}
}
+if [check_shared_lib_support] { append armelftests_nonacl $tmp }
if { ![istarget "arm*-*-nacl*"] } {
run_ld_link_tests $armelftests_nonacl
diff --git a/ld/testsuite/ld-arm/gc-hidden-1.d b/ld/testsuite/ld-arm/gc-hidden-1.d
index f8cfabb..9e20d43 100644
--- a/ld/testsuite/ld-arm/gc-hidden-1.d
+++ b/ld/testsuite/ld-arm/gc-hidden-1.d
@@ -1,6 +1,7 @@
#source: main.s
#source: gcdfn.s
#source: hidfn.s
+#target: [check_shared_lib_support]
#ld: --gc-sections --shared --version-script hideall.ld
#objdump: -dRT
# This test is only valid on ELF based ports.
diff --git a/ld/testsuite/ld-arm/movw-shared-1.d b/ld/testsuite/ld-arm/movw-shared-1.d
index 5a05818..f67b372 100644
--- a/ld/testsuite/ld-arm/movw-shared-1.d
+++ b/ld/testsuite/ld-arm/movw-shared-1.d
@@ -1,4 +1,5 @@
#name: MOVW/MOVT shared libraries test 1
#source: movw-shared-1.s
+#target: [check_shared_lib_support]
#ld: -shared
#error: .*: relocation R_ARM_MOVW_ABS_NC against `a' can not be used when making a shared object; recompile with -fPIC
diff --git a/ld/testsuite/ld-arm/movw-shared-2.d b/ld/testsuite/ld-arm/movw-shared-2.d
index 08ceaf0..76f5d5c 100644
--- a/ld/testsuite/ld-arm/movw-shared-2.d
+++ b/ld/testsuite/ld-arm/movw-shared-2.d
@@ -1,4 +1,5 @@
#name: MOVW/MOVT shared libraries test 2
#source: movw-shared-2.s
+#target: [check_shared_lib_support]
#ld: -shared
#error: .*: relocation R_ARM_MOVT_ABS against `b' can not be used when making a shared object; recompile with -fPIC
diff --git a/ld/testsuite/ld-arm/movw-shared-3.d b/ld/testsuite/ld-arm/movw-shared-3.d
index 90b9cf1..7dafda3 100644
--- a/ld/testsuite/ld-arm/movw-shared-3.d
+++ b/ld/testsuite/ld-arm/movw-shared-3.d
@@ -1,4 +1,5 @@
#name: MOVW/MOVT shared libraries test 3
#source: movw-shared-3.s
+#target: [check_shared_lib_support]
#ld: -shared
#error: .*: relocation R_ARM_THM_MOVW_ABS_NC against `c' can not be used when making a shared object; recompile with -fPIC
diff --git a/ld/testsuite/ld-arm/movw-shared-4.d b/ld/testsuite/ld-arm/movw-shared-4.d
index cc7a418..fbfd92c 100644
--- a/ld/testsuite/ld-arm/movw-shared-4.d
+++ b/ld/testsuite/ld-arm/movw-shared-4.d
@@ -1,4 +1,5 @@
#name: MOVW/MOVT shared libraries test 4
#source: movw-shared-4.s
+#target: [check_shared_lib_support]
#ld: -shared
#error: .*: relocation R_ARM_THM_MOVT_ABS against `d' can not be used when making a shared object; recompile with -fPIC
diff --git a/ld/testsuite/ld-arm/pie-bind-locally.d b/ld/testsuite/ld-arm/pie-bind-locally.d
index 7ea031c..d90085b 100644
--- a/ld/testsuite/ld-arm/pie-bind-locally.d
+++ b/ld/testsuite/ld-arm/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-arm/protected-data.d b/ld/testsuite/ld-arm/protected-data.d
index 51c51c6..3f266de 100644
--- a/ld/testsuite/ld-arm/protected-data.d
+++ b/ld/testsuite/ld-arm/protected-data.d
@@ -1,3 +1,4 @@
+#target: [check_shared_lib_support]
#ld: -shared
#readelf: -r -W
#...
diff --git a/ld/testsuite/ld-arm/rel32-reject-pie.d b/ld/testsuite/ld-arm/rel32-reject-pie.d
index 475b324..8e1962b 100644
--- a/ld/testsuite/ld-arm/rel32-reject-pie.d
+++ b/ld/testsuite/ld-arm/rel32-reject-pie.d
@@ -1,3 +1,4 @@
#source: rel32-reject-pie.s
+#target: [check_shared_lib_support]
#ld: -pie
#error: .*relocation R_ARM_REL32.*can not.*PIE executable.*
diff --git a/ld/testsuite/ld-arm/rel32-reject.d b/ld/testsuite/ld-arm/rel32-reject.d
index c82fd4d..b7bd469 100644
--- a/ld/testsuite/ld-arm/rel32-reject.d
+++ b/ld/testsuite/ld-arm/rel32-reject.d
@@ -1,3 +1,4 @@
#source: rel32-reject.s
+#target: [check_shared_lib_support]
#ld: -shared
#error: .*relocation R_ARM_REL32.*can not.*shared object.*
diff --git a/ld/testsuite/ld-arm/thumb2-bl-undefweak.d b/ld/testsuite/ld-arm/thumb2-bl-undefweak.d
index c501aa2..af92bbd 100644
--- a/ld/testsuite/ld-arm/thumb2-bl-undefweak.d
+++ b/ld/testsuite/ld-arm/thumb2-bl-undefweak.d
@@ -1,5 +1,6 @@
#source: thumb2-bl-undefweak.s
#as:
+#target: [check_shared_lib_support]
#ld: -shared
#objdump: -dr
#...
diff --git a/ld/testsuite/ld-arm/thumb2-bl-undefweak1.d b/ld/testsuite/ld-arm/thumb2-bl-undefweak1.d
index 806f66c..87e0b8f 100644
--- a/ld/testsuite/ld-arm/thumb2-bl-undefweak1.d
+++ b/ld/testsuite/ld-arm/thumb2-bl-undefweak1.d
@@ -1,5 +1,6 @@
#source: thumb2-bl-undefweak1.s
#as:
+#target: [check_shared_lib_support]
#ld: -shared
#objdump: -dr
#...