[lynxos] gdbserver hangs when killing inferior from GDB
[deliverable/binutils-gdb.git] / ld / testsuite / ld-arm / arm-elf.exp
CommitLineData
2e73b915 1# Expect script for various ARM ELF tests.
b90efa5b 2# Copyright (C) 2002-2015 Free Software Foundation, Inc.
2e73b915 3#
f96b4a7b
NC
4# This file is part of the GNU Binutils.
5#
6# This program is free software; you can redistribute it and/or modify
2e73b915 7# it under the terms of the GNU General Public License as published by
f96b4a7b 8# the Free Software Foundation; either version 3 of the License, or
2e73b915
DJ
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
f96b4a7b
NC
18# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19# MA 02110-1301, USA.
2e73b915
DJ
20#
21
00a97672
RS
22if {[istarget "arm-*-vxworks"]} {
23 set armvxworkstests {
897aea50 24 {"VxWorks shared library test 1" "-shared -Tvxworks1.ld" ""
00a97672
RS
25 "" {vxworks1-lib.s}
26 {{readelf --relocs vxworks1-lib.rd} {objdump -dr vxworks1-lib.dd}
e68ed250 27 {readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}}
00a97672
RS
28 "libvxworks1.so"}
29 {"VxWorks executable test 1 (dynamic)" \
897aea50 30 "tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic" ""
00a97672
RS
31 "" {vxworks1.s}
32 {{readelf --relocs vxworks1.rd} {objdump -dr vxworks1.dd}}
33 "vxworks1"}
34 {"VxWorks executable test 2 (dynamic)" \
897aea50 35 "-Tvxworks1.ld -q --force-dynamic" ""
00a97672
RS
36 "" {vxworks2.s}
37 {{readelf --segments vxworks2.sd}}
38 "vxworks2"}
39 {"VxWorks executable test 2 (static)"
897aea50 40 "-Tvxworks1.ld" ""
00a97672
RS
41 "" {vxworks2.s}
42 {{readelf --segments vxworks2-static.sd}}
43 "vxworks2"}
44 }
45 run_ld_link_tests $armvxworkstests
46 run_dump_test "vxworks1-static"
7df428b1 47 run_dump_test "emit-relocs1-vxworks"
00a97672
RS
48}
49
266b05cf
DJ
50if { [istarget "arm*-*-symbianelf*"] } {
51 run_dump_test "symbian-seg1"
52}
53
2e73b915
DJ
54# Exclude non-ARM-ELF targets.
55
56if { ![is_elf_format] || ![istarget "arm*-*-*"] } {
57 return
58}
59
4e67d4ca 60# List contains test-items with 3 items followed by 2 lists and one more item:
897aea50
MR
61# 0:name 1:ld early options 2:ld late options 3:assembler options
62# 4:filenames of assembler files 5: action and options. 6: name of output file
2e73b915
DJ
63
64# Actions:
65# objdump: Apply objdump options on result. Compare with regex (last arg).
66# nm: Apply nm options on result. Compare with regex (last arg).
67# readelf: Apply readelf options on result. Compare with regex (last arg).
68
b38cadfb 69set armelftests_common {
31a91d61 70 {"Group relocations" "-Ttext 0x8000 -Tdata 0x3000000 --section-start alpha=0xeef0 --section-start beta=0xffeef0" "" "" {group-relocs.s}
c9ee9c4c 71 {{objdump -dr group-relocs.d}}
4962c51a 72 "group-relocs"}
f6e32f6d 73 {"Indirect cross-library function reference (set-up)"
897aea50 74 "-shared" "" "" {arm-lib-plt-2a.s}
f6e32f6d
RS
75 {}
76 "arm-lib-plt-2a.so"}
77 {"Indirect cross-library function reference"
897aea50 78 "-shared tmpdir/arm-lib-plt-2a.so" "" "" {arm-lib-plt-2b.s}
f6e32f6d
RS
79 {{objdump -dr arm-lib-plt-2.dd} {readelf --relocs arm-lib-plt-2.rd}}
80 "arm-lib-plt-2b.so"}
897aea50 81 {"Simple static application" "" "" "" {arm-static-app.s}
0885b73e
DJ
82 {{objdump -fdw arm-static-app.d} {objdump -rw arm-static-app.r}}
83 "arm-static-app"}
897aea50 84 {"target1-abs" "-static --target1-abs -T arm.ld" "" "" {arm-target1.s}
3674e28a
PB
85 {{objdump -s arm-target1-abs.d}}
86 "arm-target1-abs"}
897aea50 87 {"target1-rel" "-static --target1-rel -T arm.ld" "" "" {arm-target1.s}
3674e28a
PB
88 {{objdump -s arm-target1-rel.d}}
89 "arm-target1-rel"}
897aea50 90 {"target2-rel" "-static --target2=rel -T arm.ld" "" "" {arm-target2.s}
3674e28a
PB
91 {{objdump -s arm-target2-rel.d}}
92 "arm-target2-rel"}
897aea50 93 {"target2-abs" "-static --target2=abs -T arm.ld" "" "" {arm-target2.s}
eeac373a
PB
94 {{objdump -s arm-target2-abs.d}}
95 "arm-target2-abs"}
897aea50 96 {"target2-got-rel" "-static --target2=got-rel -T arm.ld" "" "" {arm-target2.s}
3674e28a
PB
97 {{objdump -s arm-target2-got-rel.d}}
98 "arm-target2-got-rel"}
897aea50 99 {"arm-rel31" "-static -T arm.ld" "" "" {arm-rel31.s}
3674e28a
PB
100 {{objdump -s arm-rel31.d}}
101 "arm-rel31"}
897aea50 102 {"arm-rel32" "-shared -T arm-dyn.ld" "" "" {arm-rel32.s}
da17376b
RS
103 {{objdump -Rsj.data arm-rel32.d}}
104 "arm-rel32"}
897aea50 105 {"arm-call" "--no-fix-arm1176 -static -T arm.ld" "" "-meabi=4" {arm-call1.s arm-call2.s}
39b41c9c
PB
106 {{objdump -d arm-call.d}}
107 "arm-call"}
897aea50 108 {"TLS shared library" "-shared -T arm-lib.ld" "" "" {tls-lib.s}
ba93b8ac
DJ
109 {{objdump -fdw tls-lib.d} {objdump -Rw tls-lib.r}}
110 "tls-lib.so"}
897aea50 111 {"TLS dynamic application" "-T arm-dyn.ld tmpdir/tls-lib.so" "" "" {tls-app.s}
ba93b8ac
DJ
112 {{objdump -fdw tls-app.d} {objdump -Rw tls-app.r}}
113 "tls-app"}
897aea50 114 {"TLS gnu shared library got" "-shared -T arm-dyn.ld" "" "" {tls-gdesc-got.s}
0855e32b
NS
115 {{objdump "-fDR -j .got" tls-gdesc-got.d}}
116 "tls-lib2-got.so"}
897aea50 117 {"TLS gnu GD to IE relaxation" "-static -T arm-dyn.ld" "" "" {tls-gdierelax.s}
0855e32b
NS
118 {{objdump -fdw tls-gdierelax.d}}
119 "tls-app-rel-ie"}
897aea50 120 {"TLS gnu GD to IE shared relaxation" "--no-fix-arm1176 -shared -T arm-dyn.ld" "" "" {tls-gdierelax2.s}
0855e32b
NS
121 {{objdump -fdw tls-gdierelax2.d}}
122 "tls-app-rel-ie2"}
897aea50 123 {"TLS gnu GD to LE relaxation" "-T arm-dyn.ld" "" "" {tls-gdlerelax.s}
0855e32b
NS
124 {{objdump -fdw tls-gdlerelax.d}}
125 "tls-app-rel-le"}
897aea50 126 {"TLS mixed models shared lib" "-shared -T arm-dyn.ld" "" "" {tls-mixed.s}
0855e32b
NS
127 {{objdump -Rw tls-mixed.r}}
128 "tls-mixed.so"}
897aea50 129 {"TLS descseq relaxation" "-T arm-dyn.ld" "" "" {tls-descrelax.s}
0855e32b
NS
130 {{objdump -fdw tls-descrelax.d}}
131 "tls-descrelax"}
897aea50 132 {"TLS descseq relaxation v7" "-T arm-dyn.ld" "" "" {tls-descrelax-v7.s}
0855e32b
NS
133 {{objdump -fdw tls-descrelax-v7.d}}
134 "tls-descrelax-v7"}
897aea50 135 {"TLS descseq relaxation BE8" "-T arm-dyn.ld -EB --be8" "" "-mbig-endian" {tls-descrelax-be8.s}
0855e32b
NS
136 {{objdump -fdw tls-descrelax-be8.d}}
137 "tls-descrelax-be8"}
897aea50 138 {"TLS descseq relaxation BE32" "-T arm-dyn.ld -EB" "" "-mbig-endian" {tls-descrelax-be32.s}
0855e32b
NS
139 {{objdump -fdw tls-descrelax-be32.d}}
140 "tls-descrelax-be32"}
3064e1ff
JB
141 {"TLS local PIC symbol static link" "-T arm.ld" "" "" {tls-local-static.s}
142 {{objdump -fdw tls-local-static.d}}
143 "tls-local-static"}
897aea50 144 {"MOVW/MOVT" "-static -T arm.ld" "" "" {arm-movwt.s}
b6895b4f
PB
145 {{objdump -dw arm-movwt.d}}
146 "arm-movwt"}
897aea50 147 {"BE8 Mapping Symbols" "-static -T arm.ld -EB --be8" "" "-EB" {arm-be8.s}
7b60c20e 148 {{objdump -d arm-be8.d}}
b0796911 149 "arm-be8"}
b785d0e1 150 {"VFP11 denorm erratum fix, scalar operation"
897aea50 151 "-EL --vfp11-denorm-fix=scalar -Ttext=0x8000" "" "-EL -mfpu=vfpxd" {vfp11-fix-scalar.s}
b785d0e1
JB
152 {{objdump -dr vfp11-fix-scalar.d}}
153 "vfp11-fix-scalar"}
154 {"VFP11 denorm erratum fix, vector operation"
897aea50 155 "-EB --vfp11-denorm-fix=vector -Ttext=0x8000" "" "-EB -mfpu=vfpxd" {vfp11-fix-vector.s}
b785d0e1
JB
156 {{objdump -dr vfp11-fix-vector.d}}
157 "vfp11-fix-vector"}
158 {"VFP11 denorm erratum fix, embedded code-like data"
897aea50 159 "-EL --vfp11-denorm-fix=scalar -Ttext=0x8000" "" "-EL -mfpu=vfpxd" {vfp11-fix-none.s}
b785d0e1
JB
160 {{objdump -dr vfp11-fix-none.d}}
161 "vfp11-fix-none"}
a504d23a
LA
162 {"STM32L4XX erratum fix LDM"
163 "-EL --fix-stm32l4xx-629360 -Ttext=0x8000" "" "-EL -mcpu=cortex-m4 -mfpu=fpv4-sp-d16" {stm32l4xx-fix-ldm.s}
164 {{objdump -dr stm32l4xx-fix-ldm.d}}
165 "stm32l4xx-fix-ldm"}
166 {"STM32L4XX erratum fix VLDM"
167 "-EL --fix-stm32l4xx-629360 -Ttext=0x8000" "" "-EL -mcpu=cortex-m4 -mfpu=fpv4-sp-d16" {stm32l4xx-fix-vldm.s}
168 {{objdump -dr stm32l4xx-fix-vldm.d}}
169 "stm32l4xx-fix-vldm"}
170 {"STM32L4XX erratum fix ALL"
171 "-EL --fix-stm32l4xx-629360=all -Ttext=0x8000" "" "-EL -mcpu=cortex-m4 -mfpu=fpv4-sp-d16" {stm32l4xx-fix-all.s}
172 {{objdump -dr stm32l4xx-fix-all.d}}
173 "stm32l4xx-fix-vldm-all"}
174 {"STM32L4XX erratum fix in IT context"
175 "-EL --fix-stm32l4xx-629360 -Ttext=0x8000" "" "-EL -mcpu=cortex-m4 -mfpu=fpv4-sp-d16" {stm32l4xx-fix-it-block.s}
176 {{objdump -dr stm32l4xx-fix-it-block.d}}
177 "stm32l4xx-fix-it-block"}
897aea50 178 {"Unwinding and -gc-sections" "-gc-sections" "" "" {gc-unwind.s}
6a5bb875
PB
179 {{objdump -sj.data gc-unwind.d}}
180 "gc-unwind"}
897aea50 181 {"script-type" "-static -T script-type.ld" "" "" {script-type.s}
1338dd10
PB
182 {{readelf -s script-type.sym}}
183 "script-type"}
897aea50 184 {"callweak" "-static -T arm.ld" "" "" {callweak.s}
da5938a2
NC
185 {{objdump -dr callweak.d}}
186 "callweak"}
897aea50 187 {"Relocation boundaries" "-defsym x=0 -defsym y=0 -defsym _start=0" "" "" {reloc-boundaries.s}
4e67d4ca
DG
188 {{objdump -s reloc-boundaries.d}}
189 "reloc-boundaries"}
897aea50 190 {"Data only mapping symbols" "-T data-only-map.ld -Map map" "" "" {data-only-map.s}
33811162
DG
191 {{objdump -dr data-only-map.d}}
192 "data-only-map"}
897aea50 193 {"Data only mapping symbols for merged sections" "-T rodata-merge-map.ld" "" "" {rodata-merge-map1.s rodata-merge-map2.s rodata-merge-map3.s}
7d500b83
CL
194 {{readelf -s rodata-merge-map.sym}}
195 "rodata-merge-map"}
897aea50 196 {"GOT relocations in executables (setup)" "-shared" ""
b436d854
RS
197 "" {exec-got-1a.s}
198 {}
199 "exec-got-1.so"}
897aea50 200 {"GOT relocations in executables" "tmpdir/exec-got-1.so" ""
b436d854
RS
201 "" {exec-got-1b.s}
202 {{readelf --relocs exec-got-1.d}}
203 "exec-got-1"}
897aea50 204 {"Simple non-PIC shared library (no PLT check)" "-shared" "" "" {arm-lib.s}
dc60a238
RM
205 {{objdump -Rw arm-lib.r}}
206 "arm-lib.so"}
897aea50 207 {"EABI soft-float ET_EXEC ABI flag" "-T arm.ld" "" "-mfloat-abi=soft -meabi=5" {eabi-soft-float.s}
3bfcb652
NC
208 {{readelf -h eabi-soft-float.d}}
209 "eabi-soft-float"}
897aea50 210 {"EABI hard-float ET_EXEC ABI flag" "-T arm.ld" "" "-mfloat-abi=hard -meabi=5" {eabi-hard-float.s}
3bfcb652
NC
211 {{readelf -h eabi-hard-float.d}}
212 "eabi-hard-float"}
897aea50 213 {"EABI hard-float ET_DYN ABI flag" "-shared" "" "-mfloat-abi=hard -meabi=5" {eabi-hard-float.s}
3bfcb652
NC
214 {{readelf -h eabi-hard-float.d}}
215 "eabi-hard-float.so"}
897aea50 216 {"EABI ABI flags wrong ABI version" "-T arm.ld" "" "-mfloat-abi=soft -meabi=4" {eabi-soft-float.s}
3bfcb652
NC
217 {{readelf -h eabi-soft-float-ABI4.d}}
218 "eabi-soft-float-no-flags"}
897aea50 219 {"EABI ABI flags ld -r" "-r" "" "-mfloat-abi=soft -meabi=5" {eabi-soft-float.s}
3bfcb652
NC
220 {{readelf -h eabi-soft-float-r.d}}
221 "eabi-soft-float-r.o"}
469a3493
RM
222 {"PC-relative in -shared" "-shared" ""
223 "" {pcrel-shared.s}
224 {{readelf -dr pcrel-shared.rd}}
225 "pcrel-shared.so"}
72d98d16
MG
226 {"MOVS thumb1 relocations" "-static -T arm.ld" "" "" {thumb1-movs.s}
227 {{objdump -dw thumb1-movs.d}}
228 "thumb1-movs"}
229 {"ADDS thumb1 relocations" "-static -T arm.ld" "" "" {thumb1-adds.s}
230 {{objdump -dw thumb1-adds.d}}
231 "thumb1-adds"}
b38cadfb
NC
232}
233
234set armelftests_nonacl {
7a89b94e
NC
235 {"Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x401000" "" "" {thumb1-bl.s}
236 {{objdump -dr thumb1-bl.d}}
237 "thumb1-bl"}
238 {"Thumb entry point" "-T arm.ld" "" "" {thumb-entry.s}
239 {{readelf -h thumb-entry.d}}
240 "thumb-entry"}
241 {"thumb-rel32" "-static -T arm.ld" "" "" {thumb-rel32.s}
242 {{objdump -s thumb-rel32.d}}
243 "thumb-rel32"}
244 {"jump19" "-static -T arm.ld" "" "" {jump19.s}
245 {{objdump -dr jump19.d}}
246 "jump19"}
247 {"Thumb and -gc-sections" "-shared -T arm-dyn.ld" "" "" {gc-thumb-lib.s}
248 {}
249 "gc-thumb-lib.so"}
250 {"Thumb and -gc-sections" "-pie -T arm.ld -gc-sections tmpdir/gc-thumb-lib.so" "" "" {gc-thumb.s}
251 {{readelf --relocs gc-thumb.d}}
252 "gc-thumb"}
7a89b94e 253
897aea50 254 {"Simple non-PIC shared library" "-shared" "" "" {arm-lib.s}
b38cadfb
NC
255 {{objdump -fdw arm-lib.d} {objdump -Rw arm-lib.r}}
256 "arm-lib.so"}
897aea50 257 {"Simple PIC shared library" "-shared" "" "" {arm-lib-plt32.s}
b38cadfb
NC
258 {{objdump -fdw arm-lib-plt32.d} {objdump -Rw arm-lib-plt32.r}}
259 "arm-lib-plt32.so"}
897aea50 260 {"Simple dynamic application" "tmpdir/arm-lib.so" "" "" {arm-app.s}
b38cadfb
NC
261 {{objdump -fdw arm-app.d} {objdump -Rw arm-app.r}}
262 "arm-app"}
05456594 263 {"Simple static application without .rel.plt in linker script"
897aea50 264 "-T arm-no-rel-plt.ld" "" "" {arm-static-app.s}
05456594
NC
265 {{objdump -fdw arm-static-app.d} {objdump -rw arm-static-app.r}}
266 "arm-static-app"}
267 {"Simple dynamic application without .rel.plt in linker script"
897aea50 268 "tmpdir/arm-lib.so -T arm-no-rel-plt.ld" "" "" {arm-app.s}
05456594
NC
269 {{ld arm-no-rel-plt.out}}
270 "arm-app"}
897aea50 271 {"Non-pcrel function reference" "tmpdir/arm-lib.so" "" "" {arm-app-abs32.s}
b38cadfb
NC
272 {{objdump -fdw arm-app-abs32.d} {objdump -Rw arm-app-abs32.r}}
273 "arm-app-abs32"}
897aea50 274 {"Thumb shared library with ARM entry points" "-shared -T arm-lib.ld" "" "-mthumb-interwork"
b38cadfb
NC
275 {mixed-lib.s}
276 {{objdump -fdw armthumb-lib.d} {readelf -Ds armthumb-lib.sym}}
277 "armthumb-lib.so"}
897aea50 278 {"Mixed ARM/Thumb shared library" "-shared -T arm-lib.ld -use-blx" "" ""
b38cadfb
NC
279 {mixed-lib.s}
280 {{objdump -fdw mixed-lib.d} {objdump -Rw mixed-lib.r}
281 {readelf -Ds mixed-lib.sym}}
282 "mixed-lib.so"}
897aea50 283 {"Mixed ARM/Thumb dynamic application" "tmpdir/mixed-lib.so -T arm-dyn.ld" "" ""
b38cadfb
NC
284 {mixed-app.s}
285 {{objdump -fdw mixed-app.d} {objdump -Rw mixed-app.r}
286 {readelf -Ds mixed-app.sym}}
287 "mixed-app"}
897aea50 288 {"Mixed ARM/Thumb arch5 dynamic application" "tmpdir/mixed-lib.so -T arm-dyn.ld --use-blx" "" ""
b38cadfb
NC
289 {mixed-app.s}
290 {{objdump -fdw mixed-app-v5.d} {objdump -Rw mixed-app.r}
291 {readelf -Ds mixed-app.sym}}
292 "mixed-app-v5"}
897aea50 293 {"Using Thumb lib by another lib" "-shared tmpdir/mixed-lib.so" "" "" {use-thumb-lib.s}
f0fcbe51
RM
294 {{readelf -Ds use-thumb-lib.sym}}
295 "use-thumb-lib.so"}
897aea50 296 {"TLS gnu shared library inlined trampoline" "--no-fix-arm1176 -shared -T arm-dyn.ld" "" "" {tls-descseq.s}
b38cadfb
NC
297 {{objdump -fdw tls-descseq.d} {objdump -Rw tls-descseq.r}}
298 "tls-lib2inline.so"}
897aea50 299 {"TLS shared library gdesc local" "--no-fix-arm1176 -shared -T arm-dyn.ld" "" "" {tls-lib-loc.s}
b38cadfb
NC
300 {{objdump -fdw tls-lib-loc.d} {objdump -Rw tls-lib-loc.r}}
301 "tls-lib-loc.so"}
ac4c9b04
MG
302 {"PF_R not present when one noread section" "-static -T arm.ld" "" "" {thumb1-noread-present-one-section.s}
303 {{readelf -l thumb1-noread-present-one-section.d}}
304 "thumb1-noread-present-one-section"}
305 {"PF_R not present when two noread sections" "-static -T arm.ld" "" "" {thumb1-noread-present-two-section.s}
306 {{readelf -l thumb1-noread-present-two-section.d}}
307 "thumb1-noread-present-two-section"}
308 {"PF_R present when mixing noread section with read section" "-static -T arm.ld" "" "" {thumb1-noread-not-present-mixing-two-section.s}
309 {{readelf -l thumb1-noread-not-present-mixing-two-section.d}}
310 "thumb1-noread-not-present-mixing-two-section"}
311 {"Match SHF_ARM_NOREAD with INPUT_SECTION_FLAGS directive" "-static -T arm_noread.ld" "" "" {thumb1-input-section-flag-match.s}
312 {{readelf -l thumb1-input-section-flag-match.d}}
313 "thumb1-noread-not-present-mixing-two-section"}
1a51c1a4
NC
314}
315
b38cadfb
NC
316run_ld_link_tests $armelftests_common
317if { ![istarget "arm*-*-nacl*"] } {
318 run_ld_link_tests $armelftests_nonacl
319}
320
1a51c1a4 321run_dump_test "group-relocs-alu-bad"
31a91d61 322run_dump_test "group-relocs-alu-bad-2"
1a51c1a4 323run_dump_test "group-relocs-ldr-bad"
31a91d61 324run_dump_test "group-relocs-ldr-bad-2"
1a51c1a4 325run_dump_test "group-relocs-ldrs-bad"
31a91d61 326run_dump_test "group-relocs-ldrs-bad-2"
1a51c1a4 327run_dump_test "group-relocs-ldc-bad"
31a91d61 328run_dump_test "group-relocs-ldc-bad-2"
19540007 329run_dump_test "thumb2-bl-undefweak"
82b5c97a 330run_dump_test "thumb2-bl-undefweak1"
1a51c1a4 331run_dump_test "emit-relocs1"
96c23d59
JM
332run_dump_test "movw-shared-1"
333run_dump_test "movw-shared-2"
334run_dump_test "movw-shared-3"
335run_dump_test "movw-shared-4"
52db4ec2
JW
336run_dump_test "rel32-reject"
337run_dump_test "rel32-reject-pie"
1a51c1a4
NC
338
339# Exclude non-ARM-EABI targets.
340
0085488a 341if { ![istarget "arm*-*-*eabi*"] && ![istarget "arm*-*-nacl*"] } {
c2b4a39d
CL
342 # Special variants of these tests, as a different farcall stub is
343 # generated for a non-ARM-EABI target: indeed in such a case,
344 # there are no attributes to indicate that blx can be used.
345
346 set arm_noeabi_tests {
897aea50 347 {"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" "" {thumb2-bl-as-thumb1-bad.s}
c2b4a39d
CL
348 {{objdump -d thumb2-bl-as-thumb1-bad-noeabi.d}}
349 "thumb2-bl-as-thumb1-bad"}
897aea50 350 {"Thumb-2 BL bad" "-Ttext 0x1000 --section-start .foo=0x100100c" "" "" {thumb2-bl-bad.s}
c2b4a39d
CL
351 {{objdump -d thumb2-bl-bad-noeabi.d}}
352 "thumb2-bl-bad"}
353 }
354 run_ld_link_tests $arm_noeabi_tests
355
1a51c1a4
NC
356 return
357}
358
7a89b94e
NC
359# Farcalls stubs are fully supported for ARM-EABI only.
360# This list is massaged below into run_ld_link_tests standard format.
361# The source list is almost that same format. The one difference is
362# that each "action" (elements of element 5) might have four elements
363# instead of three; in that case, the fourth element is the name of
364# the dump file to use for arm*-*nacl* targets instead of the canonical
365# dump file (the third element).
b38cadfb 366set armeabitests_common {
897aea50 367 {"EABI attribute merging" "-r" "" "" {attr-merge.s attr-merge.s}
1a51c1a4
NC
368 {{readelf -A attr-merge.attr}}
369 "attr-merge"}
897aea50 370 {"EABI attribute merging 2" "-r" "" "" {attr-merge-2a.s attr-merge-2b.s}
1a51c1a4
NC
371 {{readelf -A attr-merge-2.attr}}
372 "attr-merge-2"}
897aea50 373 {"EABI attribute merging 3" "-r" "" "" {attr-merge-3a.s attr-merge-3b.s}
d237ce74
AS
374 {{readelf -A attr-merge-3.attr}}
375 "attr-merge-3"}
897aea50 376 {"EABI attribute merging 4" "-r" "" "" {attr-merge-4a.s attr-merge-4b.s}
d237ce74
AS
377 {{readelf -A attr-merge-4.attr}}
378 "attr-merge-4"}
897aea50 379 {"EABI attribute merging 5" "-r" "" "" {attr-merge-5.s attr-merge-5.s}
d237ce74
AS
380 {{readelf -A attr-merge-5.attr}}
381 "attr-merge-5"}
897aea50 382 {"EABI attribute merging 6" "-r" "" "" {attr-merge-6a.s attr-merge-6b.s}
cd21e546
MGD
383 {{readelf -A attr-merge-6.attr}}
384 "attr-merge-6"}
897aea50 385 {"EABI attribute merging 6 reversed" "-r" "" "" {attr-merge-6b.s attr-merge-6a.s}
cd21e546
MGD
386 {{readelf -A attr-merge-6.attr}}
387 "attr-merge-6r"}
897aea50 388 {"EABI attribute merging 7" "-r" "" "" {attr-merge-7a.s attr-merge-7b.s}
cd21e546
MGD
389 {{readelf -A attr-merge-7.attr}}
390 "attr-merge-7"}
897aea50 391 {"EABI attribute arch merging 1" "-r" "" "" {arch-v6k.s arch-v6t2.s}
d237ce74
AS
392 {{readelf -A attr-merge-arch-1.attr}}
393 "attr-merge-arch-1"}
897aea50 394 {"EABI attribute arch merging 1 reversed" "-r" "" "" {arch-v6t2.s arch-v6k.s}
d237ce74
AS
395 {{readelf -A attr-merge-arch-1.attr}}
396 "attr-merge-arch-1r"}
897aea50 397 {"EABI attribute arch merging 2" "-r" "" "" {arch-v6k.s arch-v6.s}
d237ce74
AS
398 {{readelf -A attr-merge-arch-2.attr}}
399 "attr-merge-arch-2"}
897aea50 400 {"EABI attribute arch merging 2 reversed" "-r" "" "" {arch-v6.s arch-v6k.s}
d237ce74
AS
401 {{readelf -A attr-merge-arch-2.attr}}
402 "attr-merge-arch-2r"}
897aea50 403 {"MOVW/MOVT and merged sections" "-T arm.ld" "" "" {movw-merge.s}
da5938a2
NC
404 {{objdump -dw movw-merge.d}}
405 "movw-merge"}
897aea50 406 {"MOVW/MOVT against shared libraries" "tmpdir/arm-lib.so" "" "" {arm-app-movw.s}
da5938a2
NC
407 {{objdump -Rw arm-app.r}}
408 "arm-app-movw"}
906e58ca 409
897aea50 410 {"ARM-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001020" "" "" {farcall-arm-arm.s}
7a89b94e 411 {{objdump -d farcall-arm-arm.d farcall-arm-nacl.d}}
da5938a2 412 "farcall-arm-arm"}
897aea50 413 {"ARM-ARM farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001020 --pic-veneer" "" "" {farcall-arm-arm.s}
7a89b94e 414 {{objdump -d farcall-arm-arm-pic-veneer.d farcall-arm-nacl-pic.d}}
da5938a2 415 "farcall-arm-arm-pic-veneer"}
897aea50 416 {"ARM-ARM farcall (BE8)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB --be8" "" "-EB" {farcall-arm-arm.s}
7a89b94e 417 {{objdump -d farcall-arm-arm.d farcall-arm-nacl.d}}
da5938a2 418 "farcall-arm-arm-be8"}
897aea50 419 {"ARM-ARM farcall (BE)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB" "" "-EB" {farcall-arm-arm.s}
7a89b94e 420 {{objdump -d farcall-arm-arm.d farcall-arm-nacl.d}}
2531fd8e 421 "farcall-arm-arm-be"}
906e58ca 422
897aea50 423 {"Long branch with mixed text and data" "-T arm.ld" "" "" {farcall-data.s}
7a89b94e 424 {{objdump -dr farcall-data.d farcall-data-nacl.d}}
b38cadfb 425 "farcall-data"}
6a2619f9
WN
426 {"callweak-2" "-static -T arm.ld" "" "" {callweak-2.s}
427 {{objdump -dr callweak-2.d}}
428 "callweak-2"}
429 {"abs call" "-T arm.ld" "" "" {abs-call-1.s}
430 {{objdump -d abs-call-1.d}}
431 "abs-call-1"}
b38cadfb
NC
432}
433
434set armeabitests_nonacl {
897aea50 435 {"ARM-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "" "" {farcall-arm-thumb.s}
da5938a2
NC
436 {{objdump -d farcall-arm-thumb.d}}
437 "farcall-arm-thumb"}
897aea50 438 {"ARM-Thumb farcall with BLX" "--no-fix-arm1176 -Ttext 0x1000 --section-start .foo=0x2001014" "" "-march=armv5t" {farcall-arm-thumb.s}
da5938a2
NC
439 {{objdump -d farcall-arm-thumb-blx.d}}
440 "farcall-arm-thumb-blx"}
897aea50 441 {"ARM-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" "" {farcall-arm-thumb.s}
da5938a2
NC
442 {{objdump -d farcall-arm-thumb-pic-veneer.d}}
443 "farcall-arm-thumb-pic-veneer"}
897aea50 444 {"ARM-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" "-march=armv5t" {farcall-arm-thumb.s}
da5938a2
NC
445 {{objdump -d farcall-arm-thumb-blx-pic-veneer.d}}
446 "farcall-arm-thumb-blx-pic-veneer"}
906e58ca 447
897aea50 448 {"Thumb-Thumb farcall with BLX" "--no-fix-arm1176 -Ttext 0x1000 --section-start .foo=0x2001014" "" "-march=armv5t" {farcall-thumb-thumb.s}
da5938a2
NC
449 {{objdump -d farcall-thumb-thumb-blx.d}}
450 "farcall-thumb-thumb-blx"}
897aea50 451 {"Thumb-Thumb farcall M profile" "-Ttext 0x1000 --section-start .foo=0x2001014" "" "-march=armv7-m" {farcall-thumb-thumb.s}
da5938a2
NC
452 {{objdump -d farcall-thumb-thumb-m.d}}
453 "farcall-thumb-thumb-m"}
897aea50 454 {"Thumb-Thumb farcall v6-M" "-Ttext 0x1000 --section-start .foo=0x2001014" "" "-march=armv6-m" {farcall-thumb-thumb.s}
41ed1ee7
DJ
455 {{objdump -d farcall-thumb-thumb-m.d}}
456 "farcall-thumb-thumb-v6-m"}
897aea50 457 {"Thumb-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "" "-march=armv4t" {farcall-thumb-thumb.s}
c2b4a39d
CL
458 {{objdump -d farcall-thumb-thumb.d}}
459 "farcall-thumb-thumb"}
897aea50 460 {"Thumb-Thumb farcall with BLX (PIC veneer)" "--no-fix-arm1176 -Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" "-march=armv5t" {farcall-thumb-thumb.s}
da5938a2
NC
461 {{objdump -d farcall-thumb-thumb-blx-pic-veneer.d}}
462 "farcall-thumb-thumb-blx-pic-veneer"}
897aea50 463 {"Thumb-Thumb farcall M profile (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" "-march=armv7-m" {farcall-thumb-thumb.s}
ebe24dd4
CL
464 {{objdump -d farcall-thumb-thumb-m-pic-veneer.d}}
465 "farcall-thumb-thumb-m-pic-veneer"}
897aea50 466 {"Thumb-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" "-march=armv4t" {farcall-thumb-thumb.s}
ebe24dd4
CL
467 {{objdump -d farcall-thumb-thumb-pic-veneer.d}}
468 "farcall-thumb-thumb-pic-veneer"}
906e58ca 469
897aea50 470 {"Thumb-ARM farcall" "-Ttext 0x1c01010 --section-start .foo=0x2001014" "" "-W" {farcall-thumb-arm.s}
da5938a2
NC
471 {{objdump -d farcall-thumb-arm.d}}
472 "farcall-thumb-arm"}
897aea50 473 {"Thumb-ARM farcall (BE8)" "-Ttext 0x1c01010 --section-start .foo=0x2001014 -EB --be8" "" "-W -EB" {farcall-thumb-arm.s}
b8f9ee44 474 {{objdump -d farcall-thumb-arm.d}}
2531fd8e 475 "farcall-thumb-arm-be8"}
897aea50 476 {"Thumb-ARM farcall (BE)" "-Ttext 0x1c01010 --section-start .foo=0x2001014 -EB" "" "-W -EB" {farcall-thumb-arm.s}
07d72278 477 {{objdump -d farcall-thumb-arm.d}}
2531fd8e 478 "farcall-thumb-arm-be"}
897aea50 479 {"Thumb-ARM (short) call" "-Ttext 0x1000 --section-start .foo=0x0002014" "" "-W" {farcall-thumb-arm-short.s}
c820be07
NC
480 {{objdump -d farcall-thumb-arm-short.d}}
481 "farcall-thumb-arm-short"}
897aea50 482 {"Thumb-ARM farcall with BLX" "--no-fix-arm1176 -Ttext 0x1c01010 --section-start .foo=0x2001014" "" "-W -march=armv5t" {farcall-thumb-arm.s}
da5938a2
NC
483 {{objdump -d farcall-thumb-arm-blx.d}}
484 "farcall-thumb-arm-blx"}
897aea50 485 {"Thumb-ARM farcall with BLX (PIC veneer)" "--no-fix-arm1176 -Ttext 0x1c01010 --section-start .foo=0x2001014 --pic-veneer" "" "-W -march=armv5t" {farcall-thumb-arm.s}
da5938a2
NC
486 {{objdump -d farcall-thumb-arm-blx-pic-veneer.d}}
487 "farcall-thumb-arm-blx-pic-veneer"}
897aea50 488 {"Thumb-ARM farcall (PIC veneer)" "-Ttext 0x1c01010 --section-start .foo=0x2001014 --pic-veneer" "" "-W" {farcall-thumb-arm.s}
ebe24dd4
CL
489 {{objdump -d farcall-thumb-arm-pic-veneer.d}}
490 "farcall-thumb-arm-pic-veneer"}
da5938a2 491
c5423981
TG
492 {"Thumb-ARM farcall cond" "-Ttext 0x8000 --section-start .foo=0x118000" "" "-W" {farcall-cond-thumb-arm.s}
493 {{objdump -d farcall-cond-thumb-arm.d}}
494 "farcall-cond-thumb-arm"}
495 {"Thumb-ARM farcall cond (BE8)" "-Ttext 0x8000 --section-start .foo=0x118000 -EB --be8" "" "-W -EB" {farcall-cond-thumb-arm.s}
496 {{objdump -d farcall-cond-thumb-arm.d}}
497 "farcall-cond-thumb-arm-be8"}
498 {"Thumb-ARM farcall cond (BE)" "-Ttext 0x8000 --section-start .foo=0x118000 -EB" "" "-W -EB" {farcall-cond-thumb-arm.s}
499 {{objdump -d farcall-cond-thumb-arm.d}}
500 "farcall-cond-thumb-arm-be"}
501
7a89b94e
NC
502 {"Multiple farcalls" "-Ttext 0x1000 --section-start .foo=0x2002020" "" "" {farcall-mix.s}
503 {{objdump -d farcall-mix.d}}
504 "farcall-mix"}
505 {"Multiple farcalls from several sections" "-Ttext 0x1000 --section-start .mytext=0x2000 --section-start .foo=0x2003020" "" "" {farcall-mix2.s}
506 {{objdump -d farcall-mix2.d}}
507 "farcall-mix2"}
508
897aea50 509 {"Mixed ARM/Thumb dynamic application with farcalls" "tmpdir/mixed-lib.so -T arm-dyn.ld --section-start .far_arm=0x2100000 --section-start .far_thumb=0x2200000" "" ""
5fa9e92f
CL
510 {farcall-mixed-app.s}
511 {{objdump -fdw farcall-mixed-app.d} {objdump -Rw farcall-mixed-app.r}
512 {readelf -Ds farcall-mixed-app.sym}}
513 "farcall-mixed-app"}
897aea50 514 {"Mixed ARM/Thumb arch5 dynamic application with farcalls" "tmpdir/mixed-lib.so -T arm-dyn.ld --use-blx --section-start .far_arm=0x2100000 --section-start .far_thumb=0x2200000" "" ""
5fa9e92f
CL
515 {farcall-mixed-app.s}
516 {{objdump -fdw farcall-mixed-app-v5.d} {objdump -Rw farcall-mixed-app.r}
517 {readelf -Ds farcall-mixed-app.sym}}
518 "farcall-mixed-app-v5"}
69c5861e 519
897aea50 520 {"Mixed ARM/Thumb shared library with long branches (v4t)" "-shared -T arm-lib.ld" "" "-march=armv4t"
fe33d2fa
CL
521 {farcall-mixed-lib1.s farcall-mixed-lib2.s}
522 {{objdump -fdw farcall-mixed-lib-v4t.d}}
523 "farcall-mixed-lib.so"}
524
897aea50 525 {"Mixed ARM/Thumb shared library with long branches (v5t)" "--no-fix-arm1176 -shared -T arm-lib.ld" "" "-march=armv5t"
69c5861e
CL
526 {farcall-mixed-lib1.s farcall-mixed-lib2.s}
527 {{objdump -fdw farcall-mixed-lib.d}}
528 "farcall-mixed-lib.so"}
529
7a89b94e
NC
530 {"Thumb-2-as-Thumb-1 BL" "--no-fix-arm1176 -Ttext 0x1000 --section-start .foo=0x100100c" "" "" {thumb2-bl-as-thumb1-bad.s}
531 {{objdump -d thumb2-bl-as-thumb1-bad.d}}
532 "thumb2-bl-as-thumb1-bad"}
533 {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" "" {thumb2-bl-bad.s}
534 {{objdump -d thumb2-bl-bad.d}}
535 "thumb2-bl-bad"}
536 {"Branch to linker script symbol with BL for thumb-only target" "-T branch-lks-sym.ld" "" "" {thumb-bl-lks-sym.s}
537 {{objdump -d thumb-bl-lks-sym.d}}
538 "thumb-bl-lks-sym"}
539 {"Branch to linker script symbol with B for thumb-only target" "-T branch-lks-sym.ld" "" "" {thumb-b-lks-sym.s}
540 {{objdump -d thumb-b-lks-sym.d}}
541 "thumb-b-lks-sym"}
542
543 {"erratum 760522 fix (default for v6z)" "--section-start=.foo=0x2001014" ""
544 "-march=armv6z" {fix-arm1176.s}
545 {{objdump -d fix-arm1176-on.d}}
546 "fix-arm1176-1"}
547 {"erratum 760522 fix (explicitly on at v6z)" "--section-start=.foo=0x2001014 --fix-arm1176" ""
548 "-march=armv6z" {fix-arm1176.s}
549 {{objdump -d fix-arm1176-on.d}}
550 "fix-arm1176-2"}
551 {"erratum 760522 fix (explicitly off at v6z)" "--section-start=.foo=0x2001014 --no-fix-arm1176" ""
552 "-march=armv6z" {fix-arm1176.s}
553 {{objdump -d fix-arm1176-off.d}}
554 "fix-arm1176-3"}
555 {"erratum 760522 fix (default for v5)" "--section-start=.foo=0x2001014 " ""
556 "-march=armv5te" {fix-arm1176.s}
557 {{objdump -d fix-arm1176-on.d}}
558 "fix-arm1176-4"}
559 {"erratum 760522 fix (default for v7-a)" "--section-start=.foo=0x2001014 " ""
560 "-march=armv7-a" {fix-arm1176.s}
561 {{objdump -d fix-arm1176-off.d}}
562 "fix-arm1176-5"}
563 {"erratum 760522 fix (default for ARM1156)" "--section-start=.foo=0x2001014 " ""
564 "-mcpu=arm1156t2f-s" {fix-arm1176.s}
565 {{objdump -d fix-arm1176-off.d}}
566 "fix-arm1176-6"}
567
568 {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x1001000" "" "" {thumb2-bl.s}
569 {{objdump -dr thumb2-bl.d}}
570 "thumb2-bl"}
571 {"Thumb-2 Interworked branch" "-T arm.ld" "" "" {thumb2-b-interwork.s}
572 {{objdump -dr thumb2-b-interwork.d}}
573 "thumb2-b-interwork"}
574 {"BL/BLX interworking" "-T arm.ld" "" "" {thumb2-bl-blx-interwork.s}
575 {{objdump -dr thumb2-bl-blx-interwork.d}}
576 "thumb2-bl-blx-interwork"}
577 {"ARMv4 interworking" "-static -T arm.ld --fix-v4bx-interworking" "" "--fix-v4bx -meabi=4" {armv4-bx.s}
578 {{objdump -d armv4-bx.d}}
579 "armv4-bx"}
580
581 {"R_ARM_THM_JUMP24 Relocation veneers: Short 1"
582 "--no-fix-arm1176 --section-start destsect=0x00009000 --section-start .text=0x8000" ""
583 "-march=armv7-a -mthumb"
584 {jump-reloc-veneers.s}
585 {{objdump -d jump-reloc-veneers-short1.d}}
586 "jump-reloc-veneers-short1"}
587 {"R_ARM_THM_JUMP24 Relocation veneers: Short 2"
588 "--no-fix-arm1176 --section-start destsect=0x00900000 --section-start .text=0x8000" ""
589 "-march=armv7-a -mthumb"
590 {jump-reloc-veneers.s}
591 {{objdump -d jump-reloc-veneers-short2.d}}
592 "jump-reloc-veneers-short2"}
593 {"R_ARM_THM_JUMP24 Relocation veneers: Long"
594 "--no-fix-arm1176 --section-start destsect=0x09000000 --section-start .text=0x8000" ""
595 "-march=armv7-a -mthumb"
596 {jump-reloc-veneers.s}
597 {{objdump -d jump-reloc-veneers-long.d}}
598 "jump-reloc-veneers-long"}
599
c5423981
TG
600 {"R_ARM_THM_JUMP19 Relocation veneers: Short"
601 "--section-start destsect=0x000108002 --section-start .text=0x8000" ""
602 "-march=armv7-m -mthumb"
603 {jump-reloc-veneers-cond.s}
604 {{objdump -d jump-reloc-veneers-cond-short.d}}
605 "jump-reloc-veneers-cond-short"}
606 {"R_ARM_THM_JUMP19 Relocation veneers: Long"
607 "--section-start destsect=0x00108004 --section-start .text=0x8000" ""
608 "-march=armv7-m -mthumb"
609 {jump-reloc-veneers-cond.s}
610 {{objdump -d jump-reloc-veneers-cond-long.d}}
611 "jump-reloc-veneers-cond-long"}
612 {"R_ARM_THM_JUMP19 Relocation veneers: Short backward"
613 "--section-start destsect=0x8004 --section-start .text=0x108000" ""
614 "-march=armv7-m -mthumb"
615 {jump-reloc-veneers-cond.s}
616 {{objdump -d jump-reloc-veneers-cond-short-backward.d}}
617 "jump-reloc-veneers-cond-short-backward"}
618 {"R_ARM_THM_JUMP19 Relocation veneers: Long backward"
619 "--section-start destsect=0x8002 --section-start .text=0x108000" ""
620 "-march=armv7-m -mthumb"
621 {jump-reloc-veneers-cond.s}
622 {{objdump -d jump-reloc-veneers-cond-long-backward.d}}
623 "jump-reloc-veneers-cond-long-backward"}
624
7a89b94e
NC
625 {"Default group size" "-Ttext 0x1000 --section-start .foo=0x2003020" "" "" {farcall-group.s farcall-group2.s}
626 {{objdump -d farcall-group.d}}
627 "farcall-group-default"}
628 {"Group size=2" "-Ttext 0x1000 --section-start .foo=0x2003020 --stub-group-size=2" "" "" {farcall-group.s farcall-group2.s}
629 {{objdump -d farcall-group-size2.d}}
630 "farcall-group-size2"}
631 {"Group size limit" "-Ttext 0x1000 --section-start .far=0x2003020" "" "" {farcall-group3.s farcall-group4.s}
632 {{objdump -d farcall-group-limit.d}}
633 "farcall-group-limit"}
634
897aea50 635 {"TLS gnu shared library" "--no-fix-arm1176 -shared -T arm-dyn.ld" "" "" {tls-gdesc.s}
0855e32b
NS
636 {{objdump -fdw tls-gdesc.d} {objdump -Rw tls-gdesc.r}}
637 "tls-lib2.so"}
897aea50 638 {"TLS gnu shared library non-lazy" "-z now -shared -T arm-dyn.ld" "" "" {tls-gdesc.s}
0855e32b
NS
639 {{readelf "-x .got" tls-gdesc-nlazy.g}}
640 "tls-lib2-nlazy.so"}
897aea50 641 {"TLS long plt library" "-shared -T arm-dyn.ld --section-start .foo=0x4001000" "" "" {tls-longplt-lib.s}
0855e32b
NS
642 {{objdump -fdw tls-longplt-lib.d}}
643 "tls-longplt-lib.so"}
897aea50 644 {"TLS long plt" "-T arm-dyn.ld --section-start .foo=0x4001000 tmpdir/tls-longplt-lib.so" "" "" {tls-longplt.s}
0855e32b
NS
645 {{objdump -fdw tls-longplt.d}}
646 "tls-longplt"}
897aea50 647 {"TLS thumb1" "-shared -T arm-dyn.ld --section-start .foo=0x4001000" "" "" {tls-thumb1.s}
0855e32b
NS
648 {{objdump -fdw tls-thumb1.d}}
649 "tls-thumb1"}
6a2619f9
WN
650 {"Cortex-A8 erratum fix, b.w"
651 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-fix-b.s}
652 {{objdump -dr cortex-a8-fix-b.d}}
653 "cortex-a8-fix-b"}
654 {"Cortex-A8 erratum fix, bl.w"
655 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-fix-bl.s}
656 {{objdump -dr cortex-a8-fix-bl.d}}
657 "cortex-a8-fix-bl"}
658 {"Cortex-A8 erratum fix, bcc.w"
659 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-fix-bcc.s}
660 {{objdump -dr cortex-a8-fix-bcc.d}}
661 "cortex-a8-fix-bcc"}
662 {"Cortex-A8 erratum fix, blx.w"
663 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-fix-blx.s}
664 {{objdump -dr cortex-a8-fix-blx.d}}
665 "cortex-a8-fix-blx"}
666 {"Cortex-A8 erratum fix, relocate b.w to ARM"
667 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-b-rel.s}
668 {{objdump -dr cortex-a8-fix-b-rel-arm.d}}
669 "cortex-a8-fix-b-rel-arm"}
670 {"Cortex-A8 erratum fix, relocate b.w to Thumb"
671 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-b-rel.s}
672 {{objdump -dr cortex-a8-fix-b-rel-thumb.d}}
673 "cortex-a8-fix-b-rel-thumb"}
674 {"Cortex-A8 erratum fix, relocate bl.w to ARM"
675 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-bl-rel.s}
676 {{objdump -dr cortex-a8-fix-bl-rel-arm.d}}
677 "cortex-a8-fix-bl-rel-arm"}
678 {"Cortex-A8 erratum fix, relocate bl.w to Thumb"
679 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bl-rel.s}
680 {{objdump -dr cortex-a8-fix-bl-rel-thumb.d}}
681 "cortex-a8-fix-bl-rel-thumb"}
682 {"Cortex-A8 erratum fix, relocate b<cond>.w to Thumb"
683 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bcc-rel.s}
684 {{objdump -dr cortex-a8-fix-bcc-rel-thumb.d}}
685 "cortex-a8-fix-bcc-rel-thumb"}
686 {"Cortex-A8 erratum fix, relocate blx.w to ARM"
687 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-blx-rel.s}
688 {{objdump -dr cortex-a8-fix-blx-rel-arm.d}}
689 "cortex-a8-fix-blx-rel-arm"}
690 {"Cortex-A8 erratum fix, relocate blx.w to Thumb"
691 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-blx-rel.s}
692 {{objdump -dr cortex-a8-fix-blx-rel-thumb.d}}
693 "cortex-a8-fix-blx-rel-thumb"}
694 {"Cortex-A8 erratum fix, relocate bl.w and far call"
695 "-EL -Ttext=0x00 --fix-cortex-a8 --defsym _start=0" ""
696 "-EL -mcpu=cortex-a8" {cortex-a8-far-1.s cortex-a8-far-2.s cortex-a8-far-3.s}
697 {{objdump -dr cortex-a8-far.d}}
698 "cortex-a8-far"}
699 {"Cortex-A8 erratum fix, headers"
700 "-EL --fix-cortex-a8 -T cortex-a8-fix-hdr.t" ""
701 "-EL -mcpu=cortex-a8" {cortex-a8-fix-hdr.s}
702 {{objdump -dr cortex-a8-fix-hdr.d}}
703 "cortex-a8-fix-hdr"}
704 {"Cortex-A8 erratum fix, blx.w and b<cond>.w together"
705 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-fix-blx-bcond.s}
706 {{objdump -dr cortex-a8-fix-blx-bcond.d}}
707 "cortex-a8-fix-blx-bcond"}
708 {"Cortex-A8 erratum fix, b.w to PLT"
709 "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared" "" "-EL"
710 {cortex-a8-fix-b-plt.s}
711 {{objdump -dr cortex-a8-fix-b-plt.d}}
712 "cortex-a8-fix-b-plt"}
713 {"Cortex-A8 erratum fix, bl.w to PLT"
714 "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared" "" "-EL"
715 {cortex-a8-fix-bl-plt.s}
716 {{objdump -dr cortex-a8-fix-bl-plt.d}}
717 "cortex-a8-fix-bl-plt"}
718 {"Cortex-A8 erratum fix, bcc.w to PLT"
719 "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared" "" "-EL"
720 {cortex-a8-fix-bcc-plt.s}
721 {{objdump -dr cortex-a8-fix-bcc-plt.d}}
722 "cortex-a8-fix-bcc-plt"}
723 {"Cortex-A8 erratum fix, blx.w to PLT"
724 "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared" "" "-EL"
725 {cortex-a8-fix-blx-plt.s}
726 {{objdump -dr cortex-a8-fix-blx-plt.d}}
727 "cortex-a8-fix-blx-plt"}
728 {"Cortex-A8 erratum fix, relocate bl.w to PLT"
729 "-EL --section-start=.plt=0x8e00 -Ttext=0x8f00 --fix-cortex-a8 -shared" ""
730 "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bl-rel.s}
731 {{objdump -dr cortex-a8-fix-bl-rel-plt.d}}
732 "cortex-a8-fix-bl-rel-thumb"}
733 {"IFUNC test 1" "-T ifunc-static.ld" "" "" {ifunc-1.s}
734 {{objdump -d ifunc-1.dd}
735 {objdump {-s -j.data -j.got} ifunc-1.gd}
736 {readelf -dr ifunc-1.rd}}
737 "ifunc-1"}
738 {"IFUNC test 2" "-T ifunc-static.ld" "" "" {ifunc-2.s}
739 {{objdump -d ifunc-2.dd}
740 {objdump {-s -j.data -j.got} ifunc-2.gd}
741 {readelf -dr ifunc-2.rd}}
742 "ifunc-2"}
743 {"IFUNC test 3" "-T ifunc-dynamic.ld -shared" "" "" {ifunc-3.s}
744 {{objdump -d ifunc-3.dd}
745 {objdump {-s -j.data -j.got} ifunc-3.gd}
746 {readelf -r ifunc-3.rd}}
747 "ifunc-3.so"}
748 {"IFUNC test 4" "-T ifunc-dynamic.ld -shared" "" "" {ifunc-4.s}
749 {{objdump -d ifunc-4.dd}
750 {objdump {-s -j.data -j.got} ifunc-4.gd}
751 {readelf -r ifunc-4.rd}}
752 "ifunc-4.so"}
753 {"IFUNC test 5" "-T ifunc-static.ld" "" "" {ifunc-5.s}
754 {{objdump -d ifunc-5.dd}
755 {objdump {-s -j.data -j.got} ifunc-5.gd}
756 {readelf -dr ifunc-5.rd}}
757 "ifunc-5"}
758 {"IFUNC test 6" "-T ifunc-static.ld" "" "" {ifunc-6.s}
759 {{objdump -d ifunc-6.dd}
760 {objdump {-s -j.data -j.got} ifunc-6.gd}
761 {readelf -dr ifunc-6.rd}}
762 "ifunc-6"}
763 {"IFUNC test 7" "-T ifunc-dynamic.ld tmpdir/ifunc-3.so -shared" ""
764 "" {ifunc-7.s}
765 {{objdump -d ifunc-7.dd}
766 {objdump {-s -j.data -j.got} ifunc-7.gd}
767 {readelf -r ifunc-7.rd}}
768 "ifunc-7.so"}
769 {"IFUNC test 8" "-T ifunc-dynamic.ld tmpdir/ifunc-4.so -shared" ""
770 "" {ifunc-8.s}
771 {{objdump -d ifunc-8.dd}
772 {objdump {-s -j.data -j.got} ifunc-8.gd}
773 {readelf -r ifunc-8.rd}}
774 "ifunc-8.so"}
775 {"IFUNC test 9" "-T ifunc-dynamic.ld tmpdir/ifunc-3.so" "" "" {ifunc-9.s}
776 {{objdump -d ifunc-9.dd}
777 {objdump {-s -j.data -j.got} ifunc-9.gd}
778 {readelf -r ifunc-9.rd}}
779 "ifunc-9"}
780 {"IFUNC test 10" "-T ifunc-dynamic.ld tmpdir/ifunc-4.so" "" "" {ifunc-10.s}
781 {{objdump -d ifunc-10.dd}
782 {objdump {-s -j.data -j.got} ifunc-10.gd}
783 {readelf -r ifunc-10.rd}}
784 "ifunc-10"}
785 {"IFUNC test 11" "-T ifunc-static.ld" "" "" {ifunc-11.s}
786 {{objdump -d ifunc-11.dd}
787 {objdump {-s -j.data -j.got} ifunc-11.gd}
788 {readelf -dr ifunc-11.rd}}
789 "ifunc-11"}
790 {"IFUNC test 12" "-T ifunc-dynamic.ld -shared" "" "" {ifunc-12.s}
791 {{objdump -d ifunc-12.dd}
792 {objdump {-s -j.data -j.got} ifunc-12.gd}
793 {readelf -r ifunc-12.rd}}
794 "ifunc-12.so"}
795 {"IFUNC test 13" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-13.s}
796 {{objdump -d ifunc-13.dd}
797 {objdump {-s -j.data -j.got} ifunc-13.gd}
798 {readelf -r ifunc-13.rd}}
799 "ifunc-13"}
800 {"IFUNC test 14" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-14.s}
801 {{objdump -d ifunc-14.dd}
802 {objdump {-s -j.data -j.got} ifunc-14.gd}
803 {readelf -r ifunc-14.rd}}
804 "ifunc-14"}
805 {"IFUNC test 15" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-15.s}
806 {{objdump -d ifunc-15.dd}
807 {objdump {-s -j.data -j.got} ifunc-15.gd}
808 {readelf -r ifunc-15.rd}}
809 "ifunc-15"}
810 {"IFUNC test 16" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-16.s}
811 {{objdump -d ifunc-16.dd}
812 {objdump {-s -j.data -j.got} ifunc-16.gd}
813 {readelf -r ifunc-16.rd}}
814 "ifunc-16"}
815 {"IFUNC test 17" "-T ifunc-static.ld" "" "" {ifunc-17.s}
816 {{objdump -d ifunc-17.dd}
817 {objdump {-s -j.data -j.got} ifunc-17.gd}
818 {readelf -r ifunc-17.rd}}
819 "ifunc-17"}
820 {"Long PLT entries in executables" "--long-plt -shared --section-start=.plt=0x1000 --section-start=.got=0xf0001100" ""
821 "" {long-plt-format.s}
822 {{objdump "-d -j .plt" long-plt-format.d}}
823 "long-plt-format"}
824 {"IFUNC and TLS descriptor shared library" "-shared -T arm-lib.ld --version-script=ifunc-gdesc.ver" "" "" {ifunc-gdesc.s}
825 {{objdump "-Rw" ifunc-gdesc.r}}
826 "ifunc-gdesc.so"}
827 {"arm-pic-veneer" "-static -T arm.ld --pic-veneer" "" "" {arm-pic-veneer.s}
828 {{objdump -d arm-pic-veneer.d}}
829 "arm-pic-veneer"}
830 {"Preempt Thumb symbol" "tmpdir/mixed-lib.so -T arm-dyn.ld --use-blx" "" ""
831 {preempt-app.s}
832 {{readelf -Ds preempt-app.sym}}
833 "preempt-app"}
b38cadfb 834}
2de70689 835
7a89b94e
NC
836# Massage the $armeabitests_common list into run_ld_link_tests standard form.
837# See the comment before 'set armeabitests_common', above.
838set elide_action_elt 3
839set is_nacl [istarget "arm*-*-nacl*"]
840if {$is_nacl} {
841 set elide_action_elt 2
842}
843set neabi_common [llength $armeabitests_common]
844for {set i 0} {$i < $neabi_common} {incr i} {
845 set case [lindex $armeabitests_common $i]
846 set actions [lindex $case 5]
847 set nactions [llength $actions]
848 for {set j 0} {$j < $nactions} {incr j} {
849 set action [lindex $actions $j]
850 if {[llength $action] == 4} {
851 set action [lreplace $action $elide_action_elt $elide_action_elt]
852 lset armeabitests_common $i 5 $j $action
853 }
854 }
855}
856
b38cadfb 857run_ld_link_tests $armeabitests_common
7a89b94e 858if { !$is_nacl } {
b38cadfb 859 run_ld_link_tests $armeabitests_nonacl
2e73b915
DJ
860}
861
69239280
MGD
862run_dump_test "attr-merge-div-00"
863run_dump_test "attr-merge-div-01"
864run_dump_test "attr-merge-div-10"
865run_dump_test "attr-merge-div-01-m3"
866run_dump_test "attr-merge-div-10-m3"
867run_dump_test "attr-merge-div-11"
868run_dump_test "attr-merge-div-12"
869run_dump_test "attr-merge-div-120"
870run_dump_test "attr-merge-div-21"
871run_dump_test "attr-merge-div-22"
872run_dump_test "attr-merge-div-02"
873run_dump_test "attr-merge-div-20"
a9dc9481
JM
874run_dump_test "attr-merge-wchar-00"
875run_dump_test "attr-merge-wchar-02"
876run_dump_test "attr-merge-wchar-04"
877run_dump_test "attr-merge-wchar-20"
878run_dump_test "attr-merge-wchar-22"
879run_dump_test "attr-merge-wchar-24"
880run_dump_test "attr-merge-wchar-40"
881run_dump_test "attr-merge-wchar-42"
882run_dump_test "attr-merge-wchar-44"
883run_dump_test "attr-merge-wchar-00-nowarn"
884run_dump_test "attr-merge-wchar-02-nowarn"
885run_dump_test "attr-merge-wchar-04-nowarn"
886run_dump_test "attr-merge-wchar-20-nowarn"
887run_dump_test "attr-merge-wchar-22-nowarn"
888run_dump_test "attr-merge-wchar-24-nowarn"
889run_dump_test "attr-merge-wchar-40-nowarn"
890run_dump_test "attr-merge-wchar-42-nowarn"
891run_dump_test "attr-merge-wchar-44-nowarn"
da5938a2 892run_dump_test "farcall-section"
d237ce74
AS
893run_dump_test "attr-merge-unknown-1"
894run_dump_test "attr-merge-unknown-2"
895run_dump_test "attr-merge-unknown-2r"
896run_dump_test "attr-merge-unknown-3"
2468f9c9
PB
897run_dump_test "unwind-1"
898run_dump_test "unwind-2"
899run_dump_test "unwind-3"
900run_dump_test "unwind-4"
22a8f80e 901run_dump_test "unwind-5"
62f3b8c8
PB
902run_dump_test "attr-merge-vfp-1"
903run_dump_test "attr-merge-vfp-1r"
904run_dump_test "attr-merge-vfp-2"
905run_dump_test "attr-merge-vfp-2r"
906run_dump_test "attr-merge-vfp-3"
907run_dump_test "attr-merge-vfp-3r"
908run_dump_test "attr-merge-vfp-4"
909run_dump_test "attr-merge-vfp-4r"
910run_dump_test "attr-merge-vfp-5"
911run_dump_test "attr-merge-vfp-5r"
4547cb56
NC
912run_dump_test "attr-merge-vfp-6"
913run_dump_test "attr-merge-vfp-6r"
bca38921
MGD
914run_dump_test "attr-merge-vfp-7"
915run_dump_test "attr-merge-vfp-7r"
a715796b
TG
916run_dump_test "attr-merge-vfp-8"
917run_dump_test "attr-merge-vfp-8r"
918run_dump_test "attr-merge-vfp-9"
919run_dump_test "attr-merge-vfp-9r"
920run_dump_test "attr-merge-vfp-10"
921run_dump_test "attr-merge-vfp-10r"
922run_dump_test "attr-merge-vfp-11"
923run_dump_test "attr-merge-vfp-11r"
924run_dump_test "attr-merge-vfp-12"
925run_dump_test "attr-merge-vfp-12r"
926run_dump_test "attr-merge-vfp-13"
927run_dump_test "attr-merge-vfp-13r"
928run_dump_test "attr-merge-vfp-14"
929run_dump_test "attr-merge-vfp-14r"
5488d830 930run_dump_test "attr-merge-incompatible"
70e99720 931run_dump_test "attr-merge-arch-2"
9274e9de 932run_dump_test "attr-merge-nosection-1"
99654aaf
TG
933run_dump_test "attr-merge-hardfp-use-1"
934run_dump_test "attr-merge-hardfp-use-2"
b436d854 935run_dump_test "unresolved-1"
dc60a238
RM
936if { ![istarget "arm*-*-nacl*"] } {
937 run_dump_test "unresolved-1-dyn"
938}
62c34db3 939run_dump_test "unresolved-2"
4646d23b 940run_dump_test "gc-hidden-1"
b68a20d6 941run_dump_test "protected-data"
a504d23a
LA
942run_dump_test "stm32l4xx-cannot-fix-it-block"
943run_dump_test "stm32l4xx-cannot-fix-far-ldm"
This page took 0.549246 seconds and 4 git commands to generate.