aarch64 and arm testsuite fixes for targets lacking shared libs
[deliverable/binutils-gdb.git] / ld / testsuite / ld-arm / arm-elf.exp
1 # Expect script for various ARM ELF tests.
2 # Copyright (C) 2002-2019 Free Software Foundation, Inc.
3 #
4 # This file is part of the GNU Binutils.
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
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
18 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19 # MA 02110-1301, USA.
20 #
21
22 if {[istarget "arm-*-vxworks"]} {
23 set armvxworkstests {
24 {"VxWorks shared library test 1"
25 "-shared -Tvxworks1.ld --hash-style=sysv" ""
26 "" {vxworks1-lib.s}
27 {{readelf --relocs vxworks1-lib.rd} {objdump -dr vxworks1-lib.dd}
28 {readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}}
29 "libvxworks1.so"}
30 {"VxWorks executable test 1 (dynamic)"
31 "tmpdir/libvxworks1.so -Tvxworks1.ld --hash-style=sysv -q --force-dynamic" ""
32 "" {vxworks1.s}
33 {{readelf --relocs vxworks1.rd} {objdump -dr vxworks1.dd}}
34 "vxworks1"}
35 {"VxWorks executable test 2 (dynamic)" \
36 "-Tvxworks1.ld --hash-style=sysv -q --force-dynamic" ""
37 "" {vxworks2.s}
38 {{readelf --segments vxworks2.sd}}
39 "vxworks2"}
40 {"VxWorks executable test 2 (static)"
41 "-Tvxworks1.ld --hash-style=sysv" ""
42 "" {vxworks2.s}
43 {{readelf --segments vxworks2-static.sd}}
44 "vxworks2"}
45 {"Branch future relocations for armv8.1-m.main target"
46 "-static -T arm.ld"
47 "" "" {bfs-0.s bfs-1.s}
48 {{objdump -dw branch-futures.d}}
49 "branch-futures"}
50 }
51 run_ld_link_tests $armvxworkstests
52 run_dump_test "vxworks1-static"
53 run_dump_test "emit-relocs1-vxworks"
54 }
55
56 if { [istarget "arm*-*-symbianelf*"] } {
57 run_dump_test "symbian-seg1"
58 }
59
60 # Exclude non-ARM-ELF targets.
61
62 if { ![is_elf_format] || ![istarget "arm*-*-*"] } {
63 return
64 }
65
66 # List contains test-items with 3 items followed by 2 lists and one more item:
67 # 0:name 1:ld early options 2:ld late options 3:assembler options
68 # 4:filenames of assembler files 5: action and options. 6: name of output file
69
70 # Actions:
71 # objdump: Apply objdump options on result. Compare with regex (last arg).
72 # nm: Apply nm options on result. Compare with regex (last arg).
73 # readelf: Apply readelf options on result. Compare with regex (last arg).
74
75 set armelftests_common {
76 {"Group relocations" "-Ttext 0x8000 -Tdata 0x3000000 --section-start alpha=0xeef0 --section-start beta=0xffeef0" "" "" {group-relocs.s}
77 {{objdump -dr group-relocs.d}}
78 "group-relocs"}
79 }
80 set tmp {
81 {"Indirect cross-library function reference (set-up)"
82 "-shared" "" "" {arm-lib-plt-2a.s}
83 {}
84 "arm-lib-plt-2a.so"}
85 {"Indirect cross-library function reference"
86 "-shared tmpdir/arm-lib-plt-2a.so" "" "" {arm-lib-plt-2b.s}
87 {{objdump -dr arm-lib-plt-2.dd} {readelf --relocs arm-lib-plt-2.rd}}
88 "arm-lib-plt-2b.so"}
89 }
90 if [check_shared_lib_support] { append armelftests_common $tmp }
91 set tmp {
92 {"Simple static application" "" "" "" {arm-static-app.s}
93 {{objdump -fdw arm-static-app.d} {objdump -rw arm-static-app.r}}
94 "arm-static-app"}
95 {"target1-abs" "-static --target1-abs -T arm.ld" "" "" {arm-target1.s}
96 {{objdump -s arm-target1-abs.d}}
97 "arm-target1-abs"}
98 {"target1-rel" "-static --target1-rel -T arm.ld" "" "" {arm-target1.s}
99 {{objdump -s arm-target1-rel.d}}
100 "arm-target1-rel"}
101 {"target2-rel" "-static --target2=rel -T arm.ld" "" "" {arm-target2.s}
102 {{objdump -s arm-target2-rel.d}}
103 "arm-target2-rel"}
104 {"target2-abs" "-static --target2=abs -T arm.ld" "" "" {arm-target2.s}
105 {{objdump -s arm-target2-abs.d}}
106 "arm-target2-abs"}
107 {"target2-got-rel" "-static --target2=got-rel -T arm.ld" "" "" {arm-target2.s}
108 {{objdump -s arm-target2-got-rel.d}}
109 "arm-target2-got-rel"}
110 {"arm-rel31" "-static -T arm.ld" "" "" {arm-rel31.s}
111 {{objdump -s arm-rel31.d}}
112 "arm-rel31"}
113 }
114 append armelftests_common $tmp
115 set tmp {
116 {"arm-rel32" "-shared -T arm-dyn.ld --hash-style=sysv" "" "" {arm-rel32.s}
117 {{objdump -Rsj.data arm-rel32.d}}
118 "arm-rel32"}
119 }
120 if [check_shared_lib_support] { append armelftests_common $tmp }
121 set tmp {
122 {"arm-call" "--no-fix-arm1176 -static -T arm.ld" "" "-meabi=4" {arm-call1.s arm-call2.s}
123 {{objdump -d arm-call.d}}
124 "arm-call"}
125 }
126 append armelftests_common $tmp
127 set tmp {
128 {"TLS shared library" "-shared -T arm-lib.ld --hash-style=sysv" ""
129 "" {tls-lib.s}
130 {{objdump -fdw tls-lib.d} {objdump -Rw tls-lib.r}}
131 "tls-lib.so"}
132 {"TLS dynamic application"
133 "-T arm-dyn.ld --hash-style=sysv tmpdir/tls-lib.so" "" "" {tls-app.s}
134 {{objdump -fdw tls-app.d} {objdump -Rw tls-app.r}}
135 "tls-app"}
136 {"TLS gnu shared library got"
137 "-shared -T arm-dyn.ld --hash-style=sysv" "" "" {tls-gdesc-got.s}
138 {{objdump "-fDR -j .got" tls-gdesc-got.d}}
139 "tls-lib2-got.so"}
140 }
141 if [check_shared_lib_support] { append armelftests_common $tmp }
142 set tmp {
143 {"TLS gnu GD to IE relaxation"
144 "-static -T arm-dyn.ld" "" "" {tls-gdierelax.s}
145 {{objdump -fdw tls-gdierelax.d}}
146 "tls-app-rel-ie"}
147 }
148 append armelftests_common $tmp
149 set tmp {
150 {"TLS gnu GD to IE shared relaxation"
151 "--no-fix-arm1176 -shared -T arm-dyn.ld --hash-style=sysv" ""
152 "" {tls-gdierelax2.s}
153 {{objdump -fdw tls-gdierelax2.d}}
154 "tls-app-rel-ie2"}
155 }
156 if [check_shared_lib_support] { append armelftests_common $tmp }
157 set tmp {
158 {"TLS gnu GD to LE relaxation" "-T arm-dyn.ld" ""
159 "" {tls-gdlerelax.s}
160 {{objdump -fdw tls-gdlerelax.d}}
161 "tls-app-rel-le"}
162 }
163 append armelftests_common $tmp
164 set tmp {
165 {"TLS mixed models shared lib"
166 "-shared -T arm-dyn.ld --hash-style=sysv" "" "" {tls-mixed.s}
167 {{objdump -Rw tls-mixed.r}}
168 "tls-mixed.so"}
169 }
170 if [check_shared_lib_support] { append armelftests_common $tmp }
171 set tmp {
172 {"TLS descseq relaxation"
173 "-T arm-dyn.ld" "" "" {tls-descrelax.s}
174 {{objdump -fdw tls-descrelax.d}}
175 "tls-descrelax"}
176 {"TLS descseq relaxation v7"
177 "-T arm-dyn.ld" "" "" {tls-descrelax-v7.s}
178 {{objdump -fdw tls-descrelax-v7.d}}
179 "tls-descrelax-v7"}
180 {"TLS descseq relaxation BE8"
181 "-T arm-dyn.ld -EB --be8" ""
182 "-mbig-endian" {tls-descrelax-be8.s}
183 {{objdump -fdw tls-descrelax-be8.d}}
184 "tls-descrelax-be8"}
185 {"TLS descseq relaxation BE32"
186 "-T arm-dyn.ld -EB" ""
187 "-mbig-endian" {tls-descrelax-be32.s}
188 {{objdump -fdw tls-descrelax-be32.d}}
189 "tls-descrelax-be32"}
190 {"TLS local PIC symbol static link" "-T arm.ld" "" "" {tls-local-static.s}
191 {{objdump -fdw tls-local-static.d}}
192 "tls-local-static"}
193 {"MOVW/MOVT" "-static -T arm.ld" "" "" {arm-movwt.s}
194 {{objdump -dw arm-movwt.d}}
195 "arm-movwt"}
196 {"BE8 Mapping Symbols" "-static -T arm.ld -EB --be8" "" "-EB" {arm-be8.s}
197 {{objdump -d arm-be8.d}}
198 "arm-be8"}
199 {"VFP11 denorm erratum fix, scalar operation"
200 "-EL --vfp11-denorm-fix=scalar -Ttext=0x8000" "" "-EL -mfpu=vfpxd" {vfp11-fix-scalar.s}
201 {{objdump -dr vfp11-fix-scalar.d}}
202 "vfp11-fix-scalar"}
203 {"VFP11 denorm erratum fix, vector operation"
204 "-EB --vfp11-denorm-fix=vector -Ttext=0x8000" "" "-EB -mfpu=vfpxd" {vfp11-fix-vector.s}
205 {{objdump -dr vfp11-fix-vector.d}}
206 "vfp11-fix-vector"}
207 {"VFP11 denorm erratum fix, embedded code-like data"
208 "-EL --vfp11-denorm-fix=scalar -Ttext=0x8000" "" "-EL -mfpu=vfpxd" {vfp11-fix-none.s}
209 {{objdump -dr vfp11-fix-none.d}}
210 "vfp11-fix-none"}
211 {"STM32L4XX erratum fix LDM"
212 "-EL --fix-stm32l4xx-629360 -Ttext=0x8000" "" "-EL -mcpu=cortex-m4 -mfpu=fpv4-sp-d16" {stm32l4xx-fix-ldm.s}
213 {{objdump -dr stm32l4xx-fix-ldm.d}}
214 "stm32l4xx-fix-ldm"}
215 {"STM32L4XX erratum fix VLDM"
216 "-EL --fix-stm32l4xx-629360 -Ttext=0x8000" "" "-EL -mcpu=cortex-m4 -mfpu=fpv4-sp-d16" {stm32l4xx-fix-vldm.s}
217 {{objdump -dr stm32l4xx-fix-vldm.d}}
218 "stm32l4xx-fix-vldm"}
219 {"STM32L4XX erratum fix VLDM, DP registers"
220 "-EL --fix-stm32l4xx-629360 -Ttext=0x8000" "" "-EL -mcpu=cortex-m4 -mfpu=fpv4-sp-d16" {stm32l4xx-fix-vldm-dp.s}
221 {{objdump -dr stm32l4xx-fix-vldm-dp.d}}
222 "stm32l4xx-fix-vldm-dp"}
223 {"STM32L4XX erratum fix ALL"
224 "-EL --fix-stm32l4xx-629360=all -Ttext=0x8000" "" "-EL -mcpu=cortex-m4 -mfpu=fpv4-sp-d16" {stm32l4xx-fix-all.s}
225 {{objdump -dr stm32l4xx-fix-all.d}}
226 "stm32l4xx-fix-all"}
227 {"STM32L4XX erratum fix in IT context"
228 "-EL --fix-stm32l4xx-629360 -Ttext=0x8000" "" "-EL -mcpu=cortex-m4 -mfpu=fpv4-sp-d16" {stm32l4xx-fix-it-block.s}
229 {{objdump -dr stm32l4xx-fix-it-block.d}}
230 "stm32l4xx-fix-it-block"}
231 {"Unwinding and -gc-sections" "-gc-sections" "" "" {gc-unwind.s}
232 {{objdump -sj.data gc-unwind.d}}
233 "gc-unwind"}
234 }
235 append armelftests_common $tmp
236
237 set tmp {
238 {"script-type" "-static -T script-type.ld" "" "" {script-type.s}
239 {{readelf -s script-type.sym}}
240 "script-type"}
241 }
242 if ![istarget "arm*-*-netbsdelf"] { append armelftests_common $tmp }
243
244 set tmp {
245 {"callweak" "-static -T arm.ld" "" "" {callweak.s}
246 {{objdump -dr callweak.d}}
247 "callweak"}
248 {"Relocation boundaries" "-defsym x=0 -defsym y=0 -defsym _start=0" "" "" {reloc-boundaries.s}
249 {{objdump -s reloc-boundaries.d}}
250 "reloc-boundaries"}
251 {"Data only mapping symbols" "-T data-only-map.ld -Map map" "" "" {data-only-map.s}
252 {{objdump -dr data-only-map.d}}
253 "data-only-map"}
254 }
255 append armelftests_common $tmp
256 set tmp {
257 {"Data only mapping symbols for merged sections" "-T rodata-merge-map.ld" "" "" {rodata-merge-map1.s rodata-merge-map2.s rodata-merge-map3.s}
258 {{readelf -s rodata-merge-map.sym}}
259 "rodata-merge-map"}
260 {"GOT relocations in executables (setup)" "-shared" ""
261 "" {exec-got-1a.s}
262 {}
263 "exec-got-1.so"}
264 {"GOT relocations in executables" "tmpdir/exec-got-1.so" ""
265 "" {exec-got-1b.s}
266 {{readelf --relocs exec-got-1.d}}
267 "exec-got-1"}
268 {"Simple non-PIC shared library (no PLT check)" "-shared" "" "" {arm-lib.s}
269 {{objdump -Rw arm-lib.r}}
270 "arm-lib.so"}
271 }
272 if [check_shared_lib_support] { append armelftests_common $tmp }
273 set tmp {
274 {"EABI soft-float ET_EXEC ABI flag" "-T arm.ld" "" "-mfloat-abi=soft -meabi=5" {eabi-soft-float.s}
275 {{readelf -h eabi-soft-float.d}}
276 "eabi-soft-float"}
277 {"EABI hard-float ET_EXEC ABI flag" "-T arm.ld" "" "-mfloat-abi=hard -meabi=5" {eabi-hard-float.s}
278 {{readelf -h eabi-hard-float.d}}
279 "eabi-hard-float"}
280 }
281 append armelftests_common $tmp
282 set tmp {
283 {"EABI hard-float ET_DYN ABI flag" "-shared" "" "-mfloat-abi=hard -meabi=5" {eabi-hard-float.s}
284 {{readelf -h eabi-hard-float.d}}
285 "eabi-hard-float.so"}
286 }
287 if [check_shared_lib_support] { append armelftests_common $tmp }
288 set tmp {
289 {"EABI ABI flags wrong ABI version" "-T arm.ld" "" "-mfloat-abi=soft -meabi=4" {eabi-soft-float.s}
290 {{readelf -h eabi-soft-float-ABI4.d}}
291 "eabi-soft-float-no-flags"}
292 {"EABI ABI flags ld -r" "-r" "" "-mfloat-abi=soft -meabi=5" {eabi-soft-float.s}
293 {{readelf -h eabi-soft-float-r.d}}
294 "eabi-soft-float-r.o"}
295 }
296 append armelftests_common $tmp
297 set tmp {
298 {"PC-relative in -shared" "-shared --hash-style=sysv" ""
299 "" {pcrel-shared.s}
300 {{readelf -dr pcrel-shared.rd}}
301 "pcrel-shared.so"}
302 }
303 if [check_shared_lib_support] { append armelftests_common $tmp }
304 set tmp {
305 {"MOVS thumb1 relocations" "-static -T arm.ld" "" "" {thumb1-movs.s}
306 {{objdump -dw thumb1-movs.d}}
307 "thumb1-movs"}
308 {"ADDS thumb1 relocations" "-static -T arm.ld" "" "" {thumb1-adds.s}
309 {{objdump -dw thumb1-adds.d}}
310 "thumb1-adds"}
311 {"MOVS thumb1 relocations for armv7-m target" "-static -T arm.ld" "" "" {thumb1-movs-armv7-m.s}
312 {{objdump -dw thumb1-movs.d}}
313 "thumb1-movs"}
314 {"ADDS thumb1 relocations for armv7-m target" "-static -T arm.ld" "" "" {thumb1-adds-armv7-m.s}
315 {{objdump -dw thumb1-adds.d}}
316 "thumb1-adds"}
317 {"Branch future relocations for armv8.1-m.main target" "-static -T arm.ld"
318 "" "" {bfs-0.s bfs-1.s}
319 {{objdump -dw branch-futures.d}}
320 "branch-futures"}
321 }
322 append armelftests_common $tmp
323
324 run_ld_link_tests $armelftests_common
325
326 set armelftests_nonacl {
327 {"Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x401000" "" "" {thumb1-bl.s}
328 {{objdump -dr thumb1-bl.d}}
329 "thumb1-bl"}
330 {"Thumb entry point" "-T arm.ld" "" "" {thumb-entry.s}
331 {{readelf -h thumb-entry.d}}
332 "thumb-entry"}
333 {"thumb-rel32" "-static -T arm.ld" "" "" {thumb-rel32.s}
334 {{objdump -s thumb-rel32.d}}
335 "thumb-rel32"}
336 {"jump19" "-static -T arm.ld" "" "" {jump19.s}
337 {{objdump -dr jump19.d}}
338 "jump19"}
339 }
340 set tmp {
341 {"Thumb and -gc-sections"
342 "-shared -T arm-dyn.ld --hash-style=sysv" "" "" {gc-thumb-lib.s}
343 {}
344 "gc-thumb-lib.so"}
345 {"Thumb and -gc-sections" "-pie -T arm.ld -gc-sections tmpdir/gc-thumb-lib.so" "" "" {gc-thumb.s}
346 {{readelf --relocs gc-thumb.d}}
347 "gc-thumb"}
348 {"Simple non-PIC shared library" "-shared" "" "" {arm-lib.s}
349 {{objdump -fdw arm-lib.d} {objdump -Rw arm-lib.r}}
350 "arm-lib.so"}
351 {"Simple PIC shared library" "-shared" "" "" {arm-lib-plt32.s}
352 {{objdump -fdw arm-lib-plt32.d} {objdump -Rw arm-lib-plt32.r}}
353 "arm-lib-plt32.so"}
354 {"Simple dynamic application" "tmpdir/arm-lib.so" "" "" {arm-app.s}
355 {{objdump -fdw arm-app.d} {objdump -Rw arm-app.r}}
356 "arm-app"}
357 }
358 if [check_shared_lib_support] { append armelftests_nonacl $tmp }
359 set tmp {
360 {"Simple static application without .rel.plt in linker script"
361 "-T arm-no-rel-plt.ld" "" "" {arm-static-app.s}
362 {{objdump -fdw arm-static-app.d} {objdump -rw arm-static-app.r}}
363 "arm-static-app-no-rel-plt"}
364 }
365 append armelftests_nonacl $tmp
366 set tmp {
367 {"Simple dynamic application without .rel.plt in linker script"
368 "tmpdir/arm-lib.so -T arm-no-rel-plt.ld" "" "" {arm-app.s}
369 {{readelf -dr arm-no-rel-plt.r}}
370 "arm-app-no-rel-plt"}
371 {"Non-pcrel function reference" "tmpdir/arm-lib.so" "" "" {arm-app-abs32.s}
372 {{objdump -fdw arm-app-abs32.d} {objdump -Rw arm-app-abs32.r}}
373 "arm-app-abs32"}
374 {"Thumb shared library with ARM entry points"
375 "-shared -T arm-lib.ld --hash-style=sysv" ""
376 "-mthumb-interwork" {mixed-lib.s}
377 {{objdump -fdw armthumb-lib.d} {readelf -Ds armthumb-lib.sym}}
378 "armthumb-lib.so"}
379 {"Mixed ARM/Thumb shared library"
380 "-shared -T arm-lib.ld --hash-style=sysv -use-blx" ""
381 "" {mixed-lib.s}
382 {{objdump -fdw mixed-lib.d} {objdump -Rw mixed-lib.r}
383 {readelf -Ds mixed-lib.sym}}
384 "mixed-lib.so"}
385 {"Mixed ARM/Thumb dynamic application"
386 "tmpdir/mixed-lib.so -T arm-dyn.ld --hash-style=sysv" ""
387 "" {mixed-app.s}
388 {{objdump -fdw mixed-app.d} {objdump -Rw mixed-app.r}
389 {readelf -Ds mixed-app.sym}}
390 "mixed-app"}
391 {"Mixed ARM/Thumb arch5 dynamic application"
392 "tmpdir/mixed-lib.so -T arm-dyn.ld --hash-style=sysv --use-blx" ""
393 "" {mixed-app.s}
394 {{objdump -fdw mixed-app-v5.d} {objdump -Rw mixed-app.r}
395 {readelf -Ds mixed-app.sym}}
396 "mixed-app-v5"}
397 {"Using Thumb lib by another lib"
398 "-shared --hash-style=sysv tmpdir/mixed-lib.so" ""
399 "" {use-thumb-lib.s}
400 {{readelf -Ds use-thumb-lib.sym}}
401 "use-thumb-lib.so"}
402 {"TLS gnu shared library inlined trampoline"
403 "--no-fix-arm1176 -shared -T arm-dyn.ld --hash-style=sysv" ""
404 "" {tls-descseq.s}
405 {{objdump -fdw tls-descseq.d} {objdump -Rw tls-descseq.r}}
406 "tls-lib2inline.so"}
407 {"TLS shared library gdesc local"
408 "--no-fix-arm1176 -shared -T arm-dyn.ld --hash-style=sysv" ""
409 "" {tls-lib-loc.s}
410 {{objdump -fdw tls-lib-loc.d} {objdump -Rw tls-lib-loc.r}}
411 "tls-lib-loc.so"}
412 }
413 if [check_shared_lib_support] { append armelftests_nonacl $tmp }
414
415 if { ![istarget "arm*-*-nacl*"] } {
416 run_ld_link_tests $armelftests_nonacl
417 }
418
419 run_dump_test "group-relocs-alu-bad"
420 run_dump_test "group-relocs-alu-bad-2"
421 run_dump_test "group-relocs-ldr-bad"
422 run_dump_test "group-relocs-ldr-bad-2"
423 run_dump_test "group-relocs-ldrs-bad"
424 run_dump_test "group-relocs-ldrs-bad-2"
425 run_dump_test "group-relocs-ldc-bad"
426 run_dump_test "group-relocs-ldc-bad-2"
427 run_dump_test "thumb2-bl-undefweak"
428 run_dump_test "thumb2-bl-undefweak1"
429 run_dump_test "emit-relocs1"
430 run_dump_test "movw-shared-1"
431 run_dump_test "movw-shared-2"
432 run_dump_test "movw-shared-3"
433 run_dump_test "movw-shared-4"
434 run_dump_test "rel32-reject"
435 run_dump_test "rel32-reject-pie"
436 run_dump_test "pie-bind-locally"
437
438 # Exclude non-ARM-EABI targets.
439
440 if { [istarget "arm*-*-netbsdelf"] } {
441 return
442 }
443
444 if { ![istarget "arm*-*-*eabi*"] && ![istarget "arm*-*-nacl*"] } {
445 # Special variants of these tests, as a different farcall stub is
446 # generated for a non-ARM-EABI target: indeed in such a case,
447 # there are no attributes to indicate that blx can be used.
448
449 set arm_noeabi_tests {
450 {"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" "" {thumb2-bl-as-thumb1-bad.s}
451 {{objdump -d thumb2-bl-as-thumb1-bad-noeabi.d}}
452 "thumb2-bl-as-thumb1-bad"}
453 {"Thumb-2 BL bad" "-Ttext 0x1000 --section-start .foo=0x100100c" "" "" {thumb2-bl-bad.s}
454 {{objdump -d thumb2-bl-bad-noeabi.d}}
455 "thumb2-bl-bad"}
456 }
457 run_ld_link_tests $arm_noeabi_tests
458
459 return
460 }
461
462 # Farcalls stubs are fully supported for ARM-EABI only.
463 # This list is massaged below into run_ld_link_tests standard format.
464 # The source list is almost that same format. The one difference is
465 # that each "action" (elements of element 5) might have four elements
466 # instead of three; in that case, the fourth element is the name of
467 # the dump file to use for arm*-*nacl* targets instead of the canonical
468 # dump file (the third element).
469 set armeabitests_common {
470 {"EABI attribute merging" "-r" "" "" {attr-merge.s attr-merge.s}
471 {{readelf -A attr-merge.attr}}
472 "attr-merge"}
473 {"EABI attribute merging 2" "-r" "" "" {attr-merge-2a.s attr-merge-2b.s}
474 {{readelf -A attr-merge-2.attr}}
475 "attr-merge-2"}
476 {"EABI attribute merging 3" "-r" "" "" {attr-merge-3a.s attr-merge-3b.s}
477 {{readelf -A attr-merge-3.attr}}
478 "attr-merge-3"}
479 {"EABI attribute merging 4" "-r" "" "" {attr-merge-4a.s attr-merge-4b.s}
480 {{readelf -A attr-merge-4.attr}}
481 "attr-merge-4"}
482 {"EABI attribute merging 5" "-r" "" "" {attr-merge-5.s attr-merge-5.s}
483 {{readelf -A attr-merge-5.attr}}
484 "attr-merge-5"}
485 {"EABI attribute merging 6" "-r" "" "" {attr-merge-6a.s attr-merge-6b.s}
486 {{readelf -A attr-merge-6.attr}}
487 "attr-merge-6"}
488 {"EABI attribute merging 6 reversed" "-r" "" "" {attr-merge-6b.s attr-merge-6a.s}
489 {{readelf -A attr-merge-6.attr}}
490 "attr-merge-6r"}
491 {"EABI attribute merging 7" "-r" "" "" {attr-merge-7a.s attr-merge-7b.s}
492 {{readelf -A attr-merge-7.attr}}
493 "attr-merge-7"}
494 {"EABI attribute merging 8" "-r" "" "" {attr-merge-8a.s attr-merge-8b.s}
495 {{readelf -A attr-merge-8.attr}}
496 "attr-merge-8"}
497 {"EABI attribute merging 9" "-r" "" "" {attr-merge-9a.s attr-merge-9b.s}
498 {{ld attr-merge-9.out}}
499 "attr-merge-9"}
500 {"EABI attribute merging 10" "-r" "" "" {attr-merge-10a.s attr-merge-10b.s}
501 {{readelf -A attr-merge-10.attr}}
502 "attr-merge-10"}
503 {"EABI attribute merging 11" "-r" "" "" {attr-merge-11a.s attr-merge-11b.s}
504 {{readelf -A attr-merge-11.attr}}
505 "attr-merge-11"}
506 {"EABI attribute merging 12" "-r" "" "" {attr-merge-12a.s attr-merge-12b.s}
507 {{readelf -A attr-merge-12.attr}}
508 "attr-merge-12"}
509 {"EABI attribute merging 10 (DSP)" "-r" "" "" {attr-merge-10a.s attr-merge-10b-dsp.s}
510 {{readelf -A attr-merge-10-dsp.attr}}
511 "attr-merge-10-dsp"}
512 {"EABI attribute arch merging 1" "-r" "" "" {arch-v6k.s arch-v6t2.s}
513 {{readelf -A attr-merge-arch-1.attr}}
514 "attr-merge-arch-1"}
515 {"EABI attribute arch merging 1 reversed" "-r" "" "" {arch-v6t2.s arch-v6k.s}
516 {{readelf -A attr-merge-arch-1.attr}}
517 "attr-merge-arch-1r"}
518 {"EABI attribute arch merging 2" "-r" "" "" {arch-v6k.s arch-v6.s}
519 {{readelf -A attr-merge-arch-2.attr}}
520 "attr-merge-arch-2"}
521 {"EABI attribute arch merging 2 reversed" "-r" "" "" {arch-v6.s arch-v6k.s}
522 {{readelf -A attr-merge-arch-2.attr}}
523 "attr-merge-arch-2r"}
524 {"MOVW/MOVT and merged sections" "-T arm.ld" "" "" {movw-merge.s}
525 {{objdump -dw movw-merge.d}}
526 "movw-merge"}
527 {"MOVW/MOVT against shared libraries" "tmpdir/arm-lib.so" "" "" {arm-app-movw.s}
528 {{objdump -Rw arm-app.r}}
529 "arm-app-movw"}
530
531 {"ARM-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001020" "" "" {farcall-arm-arm.s}
532 {{objdump -d farcall-arm-arm.d farcall-arm-nacl.d}}
533 "farcall-arm-arm"}
534 {"ARM-ARM farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001020 --pic-veneer" "" "" {farcall-arm-arm.s}
535 {{objdump -d farcall-arm-arm-pic-veneer.d farcall-arm-nacl-pic.d}}
536 "farcall-arm-arm-pic-veneer"}
537 {"ARM-ARM farcall (BE8)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB --be8" "" "-EB" {farcall-arm-arm.s}
538 {{objdump -d farcall-arm-arm.d farcall-arm-nacl.d}}
539 "farcall-arm-arm-be8"}
540 {"ARM-ARM farcall (BE)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB" "" "-EB" {farcall-arm-arm.s}
541 {{objdump -d farcall-arm-arm.d farcall-arm-nacl.d}}
542 "farcall-arm-arm-be"}
543
544 {"Long branch with mixed text and data" "-T arm.ld" "" "" {farcall-data.s}
545 {{objdump -dr farcall-data.d farcall-data-nacl.d}}
546 "farcall-data"}
547 {"callweak-2" "-static -T arm.ld" "" "" {callweak-2.s}
548 {{objdump -dr callweak-2.d}}
549 "callweak-2"}
550 {"abs call" "-T arm.ld" "" "" {abs-call-1.s}
551 {{objdump -d abs-call-1.d}}
552 "abs-call-1"}
553 }
554
555 set armeabitests_nonacl {
556 {"ARM-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "" "" {farcall-arm-thumb.s}
557 {{objdump -d farcall-arm-thumb.d}}
558 "farcall-arm-thumb"}
559 {"ARM-Thumb farcall with BLX" "--no-fix-arm1176 -Ttext 0x1000 --section-start .foo=0x2001014" "" "-march=armv5t" {farcall-arm-thumb.s}
560 {{objdump -d farcall-arm-thumb-blx.d}}
561 "farcall-arm-thumb-blx"}
562 {"ARM-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" "" {farcall-arm-thumb.s}
563 {{objdump -d farcall-arm-thumb-pic-veneer.d}}
564 "farcall-arm-thumb-pic-veneer"}
565 {"ARM-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" "-march=armv5t" {farcall-arm-thumb.s}
566 {{objdump -d farcall-arm-thumb-blx-pic-veneer.d}}
567 "farcall-arm-thumb-blx-pic-veneer"}
568
569 {"Thumb-Thumb farcall with BLX" "--no-fix-arm1176 -Ttext 0x1000 --section-start .foo=0x2001014" "" "-march=armv5t" {farcall-thumb-thumb.s}
570 {{objdump -d farcall-thumb-thumb-blx.d}}
571 "farcall-thumb-thumb-blx"}
572 {"Thumb-Thumb farcall M profile" "-Ttext 0x1000 --section-start .foo=0x2001014" "" "-march=armv6-m" {farcall-thumb-thumb.s}
573 {{objdump -d farcall-thumb-thumb-m.d}}
574 "farcall-thumb-thumb-m"}
575 {"Thumb2-Thumb2 farcall M profile" "-Ttext 0x1000 --section-start .foo=0x2001014" "" "-march=armv7-m" {farcall-thumb-thumb.s}
576 {{objdump -d farcall-thumb2-thumb2-m.d}}
577 "farcall-thumb2-thumb2-m"}
578 {"Thumb-Thumb farcall v8-M Baseline" "-Ttext 0x1000 --section-start .foo=0x2001014" "" "-march=armv8-m.base" {farcall-thumb-thumb.s}
579 {{objdump -d farcall-thumb-thumb-m.d}}
580 "farcall-thumb-thumb-v8-m-base"}
581 {"Thumb-Thumb farcall v8-M Mainline" "-Ttext 0x1000 --section-start .foo=0x2001014" "" "-march=armv8-m.main" {farcall-thumb-thumb.s}
582 {{objdump -d farcall-thumb-thumb-m.d}}
583 "farcall-thumb-thumb-v8-m-main"}
584 {"Thumb-Thumb farcall v6-M" "-Ttext 0x1000 --section-start .foo=0x2001014" "" "-march=armv6-m" {farcall-thumb-thumb.s}
585 {{objdump -d farcall-thumb-thumb-m.d}}
586 "farcall-thumb-thumb-v6-m"}
587 {"Thumb-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "" "-march=armv4t" {farcall-thumb-thumb.s}
588 {{objdump -d farcall-thumb-thumb.d}}
589 "farcall-thumb-thumb"}
590 {"Thumb-Thumb farcall with BLX (PIC veneer)" "--no-fix-arm1176 -Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" "-march=armv5t" {farcall-thumb-thumb.s}
591 {{objdump -d farcall-thumb-thumb-blx-pic-veneer.d}}
592 "farcall-thumb-thumb-blx-pic-veneer"}
593 {"Thumb-Thumb farcall M profile (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" "-march=armv7-m" {farcall-thumb-thumb.s}
594 {{objdump -d farcall-thumb-thumb-m-pic-veneer.d}}
595 "farcall-thumb-thumb-m-pic-veneer"}
596 {"Thumb-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" "-march=armv4t" {farcall-thumb-thumb.s}
597 {{objdump -d farcall-thumb-thumb-pic-veneer.d}}
598 "farcall-thumb-thumb-pic-veneer"}
599 {"Thumb-Thumb farcall v6-M (no profile)" "-Ttext 0x1000 --section-start .foo=0x2001014" "" ""
600 {farcall-thumb-thumb-m-no-profile-a.s farcall-thumb-thumb-m-no-profile-b.s}
601 {{objdump -d farcall-thumb-thumb-m-no-profile.d}}
602 "farcall-thumb-thumb-m-no-profile"}
603 {"Thumb2 purecode farcall" "-Ttext 0x1000 --section-start .foo=0x2001020" "" "" {farcall-thumb2-purecode.s}
604 {{objdump -d farcall-thumb2-purecode.d}}
605 "farcall-thumb2-purecode"}
606
607 {"Thumb-ARM farcall" "-Ttext 0x1c01010 --section-start .foo=0x2001014" "" "-W" {farcall-thumb-arm.s}
608 {{objdump -d farcall-thumb-arm.d}}
609 "farcall-thumb-arm"}
610 {"Thumb-ARM farcall (BE8)" "-Ttext 0x1c01010 --section-start .foo=0x2001014 -EB --be8" "" "-W -EB" {farcall-thumb-arm.s}
611 {{objdump -d farcall-thumb-arm.d}}
612 "farcall-thumb-arm-be8"}
613 {"Thumb-ARM farcall (BE)" "-Ttext 0x1c01010 --section-start .foo=0x2001014 -EB" "" "-W -EB" {farcall-thumb-arm.s}
614 {{objdump -d farcall-thumb-arm.d}}
615 "farcall-thumb-arm-be"}
616 {"Thumb-ARM (short) call" "-Ttext 0x1000 --section-start .foo=0x0002014" "" "-W" {farcall-thumb-arm-short.s}
617 {{objdump -d farcall-thumb-arm-short.d}}
618 "farcall-thumb-arm-short"}
619 {"Thumb-ARM farcall with BLX" "--no-fix-arm1176 -Ttext 0x1c01010 --section-start .foo=0x2001014" "" "-W -march=armv5t" {farcall-thumb-arm.s}
620 {{objdump -d farcall-thumb-arm-blx.d}}
621 "farcall-thumb-arm-blx"}
622 {"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}
623 {{objdump -d farcall-thumb-arm-blx-pic-veneer.d}}
624 "farcall-thumb-arm-blx-pic-veneer"}
625 {"Thumb-ARM farcall (PIC veneer)" "-Ttext 0x1c01010 --section-start .foo=0x2001014 --pic-veneer" "" "-W" {farcall-thumb-arm.s}
626 {{objdump -d farcall-thumb-arm-pic-veneer.d}}
627 "farcall-thumb-arm-pic-veneer"}
628
629 {"Thumb-ARM farcall cond" "-Ttext 0x8000 --section-start .foo=0x118000" "" "-W" {farcall-cond-thumb-arm.s}
630 {{objdump -d farcall-cond-thumb-arm.d}}
631 "farcall-cond-thumb-arm"}
632 {"Thumb-ARM farcall cond (BE8)" "-Ttext 0x8000 --section-start .foo=0x118000 -EB --be8" "" "-W -EB" {farcall-cond-thumb-arm.s}
633 {{objdump -d farcall-cond-thumb-arm.d}}
634 "farcall-cond-thumb-arm-be8"}
635 {"Thumb-ARM farcall cond (BE)" "-Ttext 0x8000 --section-start .foo=0x118000 -EB" "" "-W -EB" {farcall-cond-thumb-arm.s}
636 {{objdump -d farcall-cond-thumb-arm.d}}
637 "farcall-cond-thumb-arm-be"}
638
639 {"Multiple farcalls" "-Ttext 0x1000 --section-start .foo=0x2002020" "" "" {farcall-mix.s}
640 {{objdump -d farcall-mix.d}}
641 "farcall-mix"}
642 {"Multiple farcalls from several sections" "-Ttext 0x1000 --section-start .mytext=0x2000 --section-start .foo=0x2003020" "" "" {farcall-mix2.s}
643 {{objdump -d farcall-mix2.d}}
644 "farcall-mix2"}
645
646 {"Mixed ARM/Thumb dynamic application with farcalls"
647 "tmpdir/mixed-lib.so -T arm-dyn.ld --hash-style=sysv --section-start .far_arm=0x2100000 --section-start .far_thumb=0x2200000" ""
648 "" {farcall-mixed-app.s}
649 {{objdump -fdw farcall-mixed-app.d} {objdump -Rw farcall-mixed-app.r}
650 {readelf -Ds farcall-mixed-app.sym}}
651 "farcall-mixed-app"}
652 {"Mixed ARM/Thumb arch5 dynamic application with farcalls"
653 "tmpdir/mixed-lib.so -T arm-dyn.ld --hash-style=sysv --use-blx --section-start .far_arm=0x2100000 --section-start .far_thumb=0x2200000" ""
654 "" {farcall-mixed-app.s}
655 {{objdump -fdw farcall-mixed-app-v5.d} {objdump -Rw farcall-mixed-app.r}
656 {readelf -Ds farcall-mixed-app.sym}}
657 "farcall-mixed-app-v5"}
658
659 {"Mixed ARM/Thumb2 dynamic application with farcalls"
660 "tmpdir/mixed-lib.so -T arm-dyn.ld --hash-style=sysv --section-start .mid_thumb=0x10081c0 --section-start .far_arm=0x2100000 --section-start .far_thumb=0x2200000" ""
661 "" {farcall-mixed-app2.s}
662 {{objdump -fdw farcall-mixed-app2.d} {objdump -Rw farcall-mixed-app2.r}
663 {readelf -Ds farcall-mixed-app2.sym}}
664 "farcall-mixed-app2"}
665
666 {"Mixed ARM/Thumb shared library with long branches (v4t)"
667 "-shared -T arm-lib.ld --hash-style=sysv" ""
668 "-march=armv4t" {farcall-mixed-lib1.s farcall-mixed-lib2.s}
669 {{objdump -fdw farcall-mixed-lib-v4t.d}}
670 "farcall-mixed-lib.so"}
671
672 {"Mixed ARM/Thumb shared library with long branches (v5t)"
673 "--no-fix-arm1176 -shared -T arm-lib.ld --hash-style=sysv" ""
674 "-march=armv5t" {farcall-mixed-lib1.s farcall-mixed-lib2.s}
675 {{objdump -fdw farcall-mixed-lib.d}}
676 "farcall-mixed-lib.so"}
677
678 {"Thumb-2-as-Thumb-1 BL" "--no-fix-arm1176 -Ttext 0x1000 --section-start .foo=0x100100c" "" "" {thumb2-bl-as-thumb1-bad.s}
679 {{objdump -d thumb2-bl-as-thumb1-bad.d}}
680 "thumb2-bl-as-thumb1-bad"}
681 {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" "" {thumb2-bl-bad.s}
682 {{objdump -d thumb2-bl-bad.d}}
683 "thumb2-bl-bad"}
684 {"Branch to linker script symbol with BL for thumb-only target" "-T branch-lks-sym.ld" "" "" {thumb-bl-lks-sym.s}
685 {{objdump -d thumb-bl-lks-sym.d}}
686 "thumb-bl-lks-sym"}
687 {"Branch to linker script symbol with B for thumb-only target" "-T branch-lks-sym.ld" "" "" {thumb-b-lks-sym.s}
688 {{objdump -d thumb-b-lks-sym.d}}
689 "thumb-b-lks-sym"}
690
691 {"erratum 760522 fix (default for v6z)" "--section-start=.foo=0x2001014" ""
692 "-march=armv6z" {fix-arm1176.s}
693 {{objdump -d fix-arm1176-on.d}}
694 "fix-arm1176-1"}
695 {"erratum 760522 fix (explicitly on at v6z)" "--section-start=.foo=0x2001014 --fix-arm1176" ""
696 "-march=armv6z" {fix-arm1176.s}
697 {{objdump -d fix-arm1176-on.d}}
698 "fix-arm1176-2"}
699 {"erratum 760522 fix (explicitly off at v6z)" "--section-start=.foo=0x2001014 --no-fix-arm1176" ""
700 "-march=armv6z" {fix-arm1176.s}
701 {{objdump -d fix-arm1176-off.d}}
702 "fix-arm1176-3"}
703 {"erratum 760522 fix (default for v5)" "--section-start=.foo=0x2001014 " ""
704 "-march=armv5te" {fix-arm1176.s}
705 {{objdump -d fix-arm1176-on.d}}
706 "fix-arm1176-4"}
707 {"erratum 760522 fix (default for v7-a)" "--section-start=.foo=0x2001014 " ""
708 "-march=armv7-a" {fix-arm1176.s}
709 {{objdump -d fix-arm1176-off.d}}
710 "fix-arm1176-5"}
711 {"erratum 760522 fix (default for ARM1156)" "--section-start=.foo=0x2001014 " ""
712 "-mcpu=arm1156t2f-s" {fix-arm1176.s}
713 {{objdump -d fix-arm1176-off.d}}
714 "fix-arm1176-6"}
715
716 {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x1001000" "" "-march=armv7" {thumb2-bl.s}
717 {{objdump -dr thumb2-bl.d}}
718 "thumb2-bl"}
719 {"Thumb-2 BL on ARMv6-M" "-Ttext 0x1000 --section-start .foo=0x1001000" "" "-march=armv6-m" {thumb2-bl.s}
720 {{objdump -dr thumb2-bl.d}}
721 "thumb2-armv6m-bl"}
722 {"Thumb-2 Interworked branch" "-T arm.ld" "" "" {thumb2-b-interwork.s}
723 {{objdump -dr thumb2-b-interwork.d}}
724 "thumb2-b-interwork"}
725 {"BL/BLX interworking" "-T arm.ld" "" "" {thumb2-bl-blx-interwork.s}
726 {{objdump -dr thumb2-bl-blx-interwork.d}}
727 "thumb2-bl-blx-interwork"}
728 {"ARMv4 interworking" "-static -T arm.ld --fix-v4bx-interworking" "" "--fix-v4bx -meabi=4" {armv4-bx.s}
729 {{objdump -d armv4-bx.d}}
730 "armv4-bx"}
731
732 {"Armv8.1-M Mainline BF" "-r -Ttext 0x1000 --section-start .foo=0x1001000" "" "-march=armv8.1-m.main" {bf.s}
733 {{objdump -dr bf.d}}
734 "bf"}
735 {"Armv8.1-M Mainline BFL" "-r -Ttext 0x1000 --section-start .foo=0x1001000" "" "-march=armv8.1-m.main" {bfl.s}
736 {{objdump -dr bfl.d}}
737 "bfl"}
738 {"Armv8.1-M Mainline BFCSEL" "-r -Ttext 0x1000 --section-start .foo=0x1001000" "" "-march=armv8.1-m.main" {bfcsel.s}
739 {{objdump -dr bfcsel.d}}
740 "bfcsel"}
741
742 {"R_ARM_THM_JUMP24 Relocation veneers: Short 1"
743 "--no-fix-arm1176 --section-start destsect=0x00009000 --section-start .text=0x8000" ""
744 "-march=armv7-a -mthumb"
745 {jump-reloc-veneers.s}
746 {{objdump -d jump-reloc-veneers-short1.d}}
747 "jump-reloc-veneers-short1"}
748 {"R_ARM_THM_JUMP24 Relocation veneers: Short 2"
749 "--no-fix-arm1176 --section-start destsect=0x00900000 --section-start .text=0x8000" ""
750 "-march=armv7-a -mthumb"
751 {jump-reloc-veneers.s}
752 {{objdump -d jump-reloc-veneers-short2.d}}
753 "jump-reloc-veneers-short2"}
754 {"R_ARM_THM_JUMP24 Relocation veneers: Long"
755 "--no-fix-arm1176 --section-start destsect=0x09000000 --section-start .text=0x8000" ""
756 "-march=armv7-a -mthumb"
757 {jump-reloc-veneers.s}
758 {{objdump -d jump-reloc-veneers-long.d}}
759 "jump-reloc-veneers-long"}
760
761 {"Secure gateway veneers: no .gnu.sgstubs section" "" ""
762 "-march=armv8-m.base -mthumb"
763 {cmse-veneers.s}
764 {{ld cmse-veneers-no-gnu_sgstubs.out}}
765 "cmse-veneers-no-gnu_sgstubs"}
766 {"Secure gateway veneers: wrong entry functions" "" ""
767 "-march=armv7-m -mthumb --defsym CHECK_ERRORS=1"
768 {cmse-veneers.s}
769 {{ld cmse-veneers-wrong-entryfct.out}}
770 "cmse-veneers-wrong-entryfct"}
771 {"Secure gateway veneers (ARMv8-M Baseline)"
772 "-Ttext=0x8000 --section-start .gnu.sgstubs=0x20000 --gc-sections" ""
773 "-march=armv8-m.base -mthumb"
774 {cmse-veneers.s}
775 {{objdump {-d -j .gnu.sgstubs} cmse-veneers.d}
776 {objdump {-h -j .gnu.sgstubs} cmse-veneers.sd}
777 {nm {} cmse-veneers.rd}}
778 "cmse-veneers-baseline"}
779 {"Secure gateway veneers (ARMv8-M Mainline)"
780 "-Ttext=0x8000 --section-start .gnu.sgstubs=0x20000 --gc-sections" ""
781 "-march=armv8-m.main -mthumb"
782 {cmse-veneers.s}
783 {{objdump {-d -j .gnu.sgstubs} cmse-veneers.d}
784 {objdump {-h -j .gnu.sgstubs} cmse-veneers.sd}
785 {nm {} cmse-veneers.rd}}
786 "cmse-veneers-mainline"}
787 {"Secure gateway import library generation: errors"
788 "--section-start .gnu.sgstubs=0x20000 --out-implib=tmpdir/cmse-implib.lib --cmse-implib" ""
789 "-march=armv8-m.base -mthumb --defsym CHECK_ERRORS=1 --defsym VER=1"
790 {cmse-implib.s}
791 {{ld cmse-implib-errors.out}}
792 "cmse-implib"}
793 {"Secure gateway import library generation"
794 "--section-start .gnu.sgstubs=0x20000 --out-implib=tmpdir/cmse-implib.lib --cmse-implib" ""
795 "-march=armv8-m.base -mthumb --defsym VER=1"
796 {cmse-implib.s}
797 {{readelf {-s tmpdir/cmse-implib.lib} cmse-implib.rd}
798 {readelf {-h tmpdir/cmse-implib.lib} cmse-implib.type}}
799 "cmse-implib"}
800 {"Input secure gateway import library"
801 "--section-start .gnu.sgstubs=0x20000 --out-implib=tmpdir/cmse-new-implib.lib --in-implib=tmpdir/cmse-implib.lib --cmse-implib" ""
802 "-march=armv8-m.base -mthumb --defsym VER=2"
803 {cmse-implib.s}
804 {{ld cmse-new-implib.out}
805 {readelf {-s tmpdir/cmse-new-implib.lib} cmse-new-implib.rd}}
806 "cmse-new-implib"}
807 {"Input secure gateway import library: no output import library"
808 "--section-start .gnu.sgstubs=0x20000 --in-implib=tmpdir/cmse-implib.lib --cmse-implib" ""
809 "-march=armv8-m.base -mthumb --defsym VER=2"
810 {cmse-implib.s}
811 {{ld cmse-new-implib-no-output.out}}
812 "cmse-new-implib-no-output"}
813 {"Input secure gateway import library: not an SG input import library"
814 "--section-start .gnu.sgstubs=0x20000 --in-implib=tmpdir/cmse-implib.lib" ""
815 "-march=armv8-m.base -mthumb --defsym VER=2"
816 {cmse-implib.s}
817 {{ld cmse-new-implib-not-sg-in-implib.out}}
818 "cmse-new-implib-not-sg-in-implib"}
819 {"Input secure gateway import library: earlier stub section base"
820 "--section-start .gnu.sgstubs=0x19000 --out-implib=tmpdir/cmse-new-earlier-implib.lib --in-implib=tmpdir/cmse-implib.lib --cmse-implib" ""
821 "-march=armv8-m.base -mthumb --defsym VER=2"
822 {cmse-implib.s}
823 {{ld cmse-new-earlier-later-implib.out}}
824 "cmse-new-earlier-implib"}
825 {"Input secure gateway import library: later stub section base"
826 "--section-start .gnu.sgstubs=0x30000 --out-implib=tmpdir/cmse-new-later-implib.lib --in-implib=tmpdir/cmse-implib.lib --cmse-implib" ""
827 "-march=armv8-m.base -mthumb --defsym VER=2"
828 {cmse-implib.s}
829 {{ld cmse-new-earlier-later-implib.out}}
830 "cmse-new-later-implib"}
831 {"Input secure gateway import library: veneer comeback"
832 "--section-start .gnu.sgstubs=0x20000 --out-implib=tmpdir/cmse-new-comeback-implib.lib --in-implib=tmpdir/cmse-implib.lib --cmse-implib" ""
833 "-march=armv8-m.base -mthumb --defsym VER=3"
834 {cmse-implib.s}
835 {{readelf {-s tmpdir/cmse-new-comeback-implib.lib} cmse-new-comeback-implib.rd}}
836 "cmse-new-comeback-implib"}
837 {"Input secure gateway import library: entry function change"
838 "--section-start .gnu.sgstubs=0x20000 --out-implib=tmpdir/cmse-new-wrong-implib.lib --in-implib=tmpdir/cmse-implib.lib --cmse-implib" ""
839 "-march=armv8-m.base -mthumb --defsym VER=4"
840 {cmse-implib.s}
841 {{ld cmse-new-wrong-implib.out}}
842 "cmse-new-wrong-implib"}
843 {"Secure gateway veneers:cmse functions debug information missing"
844 "--section-start .gnu.sgstubs=0x190000 --gc-sections -e0" ""
845 "-march=armv8-m.main -mthumb"
846 {cmse_main.s cmse_sec_debug.s}
847 {{objdump --dwarf=info cmse_main_sec_debug.d}}
848 "cmse_main_sec_debug"}
849
850 {"R_ARM_THM_JUMP19 Relocation veneers: Short"
851 "--section-start destsect=0x000108002 --section-start .text=0x8000" ""
852 "-march=armv7-m -mthumb"
853 {jump-reloc-veneers-cond.s}
854 {{objdump -d jump-reloc-veneers-cond-short.d}}
855 "jump-reloc-veneers-cond-short"}
856 {"R_ARM_THM_JUMP19 Relocation veneers: Long"
857 "--section-start destsect=0x00108004 --section-start .text=0x8000" ""
858 "-march=armv7-m -mthumb"
859 {jump-reloc-veneers-cond.s}
860 {{objdump -d jump-reloc-veneers-cond-long.d}}
861 "jump-reloc-veneers-cond-long"}
862 {"R_ARM_THM_JUMP19 Relocation veneers: Short backward"
863 "--section-start destsect=0x8004 --section-start .text=0x108000" ""
864 "-march=armv7-m -mthumb"
865 {jump-reloc-veneers-cond.s}
866 {{objdump -d jump-reloc-veneers-cond-short-backward.d}}
867 "jump-reloc-veneers-cond-short-backward"}
868 {"R_ARM_THM_JUMP19 Relocation veneers: Long backward"
869 "--section-start destsect=0x8002 --section-start .text=0x108000" ""
870 "-march=armv7-m -mthumb"
871 {jump-reloc-veneers-cond.s}
872 {{objdump -d jump-reloc-veneers-cond-long-backward.d}}
873 "jump-reloc-veneers-cond-long-backward"}
874
875 {"Default group size" "-Ttext 0x1000 --section-start .foo=0x2003020" "" "" {farcall-group.s farcall-group2.s}
876 {{objdump -d farcall-group.d}}
877 "farcall-group-default"}
878 {"Group size=2" "-Ttext 0x1000 --section-start .foo=0x2003020 --stub-group-size=2" "" "" {farcall-group.s farcall-group2.s}
879 {{objdump -d farcall-group-size2.d}}
880 "farcall-group-size2"}
881 {"Group size limit" "-Ttext 0x1000 --section-start .far=0x2003020" "" "" {farcall-group3.s farcall-group4.s}
882 {{objdump -d farcall-group-limit.d}}
883 "farcall-group-limit"}
884
885 {"TLS gnu shared library"
886 "--no-fix-arm1176 -shared -T arm-dyn.ld --hash-style=sysv" ""
887 "" {tls-gdesc.s}
888 {{objdump -fdw tls-gdesc.d} {objdump -Rw tls-gdesc.r}}
889 "tls-lib2.so"}
890 {"TLS gnu shared library non-lazy"
891 "-z now -shared -T arm-dyn.ld --hash-style=sysv" ""
892 "" {tls-gdesc.s}
893 {{readelf "-x .got" tls-gdesc-nlazy.g}}
894 "tls-lib2-nlazy.so"}
895 {"TLS gnu shared library negative addend"
896 "--no-fix-arm1176 -shared -T arm-dyn.ld --hash-style=sysv" ""
897 "" {tls-gdesc-neg.s}
898 {{objdump -fdw tls-gdesc-neg.d}}
899 "tls-lib2-neg.so"}
900 {"TLS long plt library"
901 "-shared -T arm-dyn.ld --hash-style=sysv --section-start .foo=0x4001000" ""
902 "" {tls-longplt-lib.s}
903 {{objdump -fdw tls-longplt-lib.d}}
904 "tls-longplt-lib.so"}
905 {"TLS long plt"
906 "-T arm-dyn.ld --hash-style=sysv --section-start .foo=0x4001000 tmpdir/tls-longplt-lib.so" ""
907 "" {tls-longplt.s}
908 {{objdump -fdw tls-longplt.d}}
909 "tls-longplt"}
910 {"TLS thumb1"
911 "-shared -T arm-dyn.ld --hash-style=sysv --section-start .foo=0x4001000" ""
912 "" {tls-thumb1.s}
913 {{objdump -fdw tls-thumb1.d}}
914 "tls-thumb1"}
915 {"Cortex-A8 erratum fix, b.w"
916 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-fix-b.s}
917 {{objdump -dr cortex-a8-fix-b.d}}
918 "cortex-a8-fix-b"}
919 {"Cortex-A8 erratum fix, bl.w"
920 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-fix-bl.s}
921 {{objdump -dr cortex-a8-fix-bl.d}}
922 "cortex-a8-fix-bl"}
923 {"Cortex-A8 erratum fix, bcc.w"
924 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-fix-bcc.s}
925 {{objdump -dr cortex-a8-fix-bcc.d}}
926 "cortex-a8-fix-bcc"}
927 {"Cortex-A8 erratum fix, blx.w"
928 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-fix-blx.s}
929 {{objdump -dr cortex-a8-fix-blx.d}}
930 "cortex-a8-fix-blx"}
931 {"Cortex-A8 erratum fix, relocate b.w to ARM"
932 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-b-rel.s}
933 {{objdump -dr cortex-a8-fix-b-rel-arm.d}}
934 "cortex-a8-fix-b-rel-arm"}
935 {"Cortex-A8 erratum fix, relocate b.w to Thumb"
936 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-b-rel.s}
937 {{objdump -dr cortex-a8-fix-b-rel-thumb.d}}
938 "cortex-a8-fix-b-rel-thumb"}
939 {"Cortex-A8 erratum fix, relocate bl.w to ARM"
940 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-bl-rel.s}
941 {{objdump -dr cortex-a8-fix-bl-rel-arm.d}}
942 "cortex-a8-fix-bl-rel-arm"}
943 {"Cortex-A8 erratum fix, relocate bl.w to Thumb"
944 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bl-rel.s}
945 {{objdump -dr cortex-a8-fix-bl-rel-thumb.d}}
946 "cortex-a8-fix-bl-rel-thumb"}
947 {"Cortex-A8 erratum fix, relocate b<cond>.w to Thumb"
948 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bcc-rel.s}
949 {{objdump -dr cortex-a8-fix-bcc-rel-thumb.d}}
950 "cortex-a8-fix-bcc-rel-thumb"}
951 {"Cortex-A8 erratum fix, relocate blx.w to ARM"
952 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-blx-rel.s}
953 {{objdump -dr cortex-a8-fix-blx-rel-arm.d}}
954 "cortex-a8-fix-blx-rel-arm"}
955 {"Cortex-A8 erratum fix, relocate blx.w to Thumb"
956 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-blx-rel.s}
957 {{objdump -dr cortex-a8-fix-blx-rel-thumb.d}}
958 "cortex-a8-fix-blx-rel-thumb"}
959 {"Cortex-A8 erratum fix, relocate bl.w and far call"
960 "-EL -Ttext=0x00 --fix-cortex-a8 --defsym _start=0" ""
961 "-EL -mcpu=cortex-a8" {cortex-a8-far-1.s cortex-a8-far-2.s cortex-a8-far-3.s}
962 {{objdump -dr cortex-a8-far.d}}
963 "cortex-a8-far"}
964 {"Cortex-A8 erratum fix, headers"
965 "-EL --fix-cortex-a8 -T cortex-a8-fix-hdr.t" ""
966 "-EL -mcpu=cortex-a8" {cortex-a8-fix-hdr.s}
967 {{objdump -dr cortex-a8-fix-hdr.d}}
968 "cortex-a8-fix-hdr"}
969 {"Cortex-A8 erratum fix, blx.w and b<cond>.w together"
970 "-EL -Ttext=0x8f00 --fix-cortex-a8" "" "-EL" {cortex-a8-fix-blx-bcond.s}
971 {{objdump -dr cortex-a8-fix-blx-bcond.d}}
972 "cortex-a8-fix-blx-bcond"}
973 {"Cortex-A8 erratum fix, b.w to PLT"
974 "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared" "" "-EL"
975 {cortex-a8-fix-b-plt.s}
976 {{objdump -dr cortex-a8-fix-b-plt.d}}
977 "cortex-a8-fix-b-plt"}
978 {"Cortex-A8 erratum fix, bl.w to PLT"
979 "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared" "" "-EL"
980 {cortex-a8-fix-bl-plt.s}
981 {{objdump -dr cortex-a8-fix-bl-plt.d}}
982 "cortex-a8-fix-bl-plt"}
983 {"Cortex-A8 erratum fix, bcc.w to PLT"
984 "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared" "" "-EL"
985 {cortex-a8-fix-bcc-plt.s}
986 {{objdump -dr cortex-a8-fix-bcc-plt.d}}
987 "cortex-a8-fix-bcc-plt"}
988 {"Cortex-A8 erratum fix, blx.w to PLT"
989 "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared" "" "-EL"
990 {cortex-a8-fix-blx-plt.s}
991 {{objdump -dr cortex-a8-fix-blx-plt.d}}
992 "cortex-a8-fix-blx-plt"}
993 {"Cortex-A8 erratum fix, relocate bl.w to PLT"
994 "-EL --section-start=.plt=0x8e00 -Ttext=0x8f00 --fix-cortex-a8 -shared --hash-style=sysv" ""
995 "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bl-rel.s}
996 {{objdump -dr cortex-a8-fix-bl-rel-plt.d}}
997 "cortex-a8-fix-bl-rel-thumb"}
998 {"IFUNC test 1" "-T ifunc-static.ld" "" "" {ifunc-1.s}
999 {{objdump -d ifunc-1.dd}
1000 {objdump {-s -j.data -j.got} ifunc-1.gd}
1001 {readelf -dr ifunc-1.rd}}
1002 "ifunc-1"}
1003 {"IFUNC test 2" "-T ifunc-static.ld" "" "" {ifunc-2.s}
1004 {{objdump -d ifunc-2.dd}
1005 {objdump {-s -j.data -j.got} ifunc-2.gd}
1006 {readelf -dr ifunc-2.rd}}
1007 "ifunc-2"}
1008 {"IFUNC test 3" "-T ifunc-dynamic.ld -shared" "" "" {ifunc-3.s}
1009 {{objdump -d ifunc-3.dd}
1010 {objdump {-s -j.data -j.got} ifunc-3.gd}
1011 {readelf -r ifunc-3.rd}}
1012 "ifunc-3.so"}
1013 {"IFUNC test 4" "-T ifunc-dynamic.ld -shared" "" "" {ifunc-4.s}
1014 {{objdump -d ifunc-4.dd}
1015 {objdump {-s -j.data -j.got} ifunc-4.gd}
1016 {readelf -r ifunc-4.rd}}
1017 "ifunc-4.so"}
1018 {"IFUNC test 5" "-T ifunc-static.ld" "" "" {ifunc-5.s}
1019 {{objdump -d ifunc-5.dd}
1020 {objdump {-s -j.data -j.got} ifunc-5.gd}
1021 {readelf -dr ifunc-5.rd}}
1022 "ifunc-5"}
1023 {"IFUNC test 6" "-T ifunc-static.ld" "" "" {ifunc-6.s}
1024 {{objdump -d ifunc-6.dd}
1025 {objdump {-s -j.data -j.got} ifunc-6.gd}
1026 {readelf -dr ifunc-6.rd}}
1027 "ifunc-6"}
1028 {"IFUNC test 7" "-T ifunc-dynamic.ld tmpdir/ifunc-3.so -shared" ""
1029 "" {ifunc-7.s}
1030 {{objdump -d ifunc-7.dd}
1031 {objdump {-s -j.data -j.got} ifunc-7.gd}
1032 {readelf -r ifunc-7.rd}}
1033 "ifunc-7.so"}
1034 {"IFUNC test 8" "-T ifunc-dynamic.ld tmpdir/ifunc-4.so -shared" ""
1035 "" {ifunc-8.s}
1036 {{objdump -d ifunc-8.dd}
1037 {objdump {-s -j.data -j.got} ifunc-8.gd}
1038 {readelf -r ifunc-8.rd}}
1039 "ifunc-8.so"}
1040 {"IFUNC test 9" "-T ifunc-dynamic.ld tmpdir/ifunc-3.so" "" "" {ifunc-9.s}
1041 {{objdump -d ifunc-9.dd}
1042 {objdump {-s -j.data -j.got} ifunc-9.gd}
1043 {readelf -r ifunc-9.rd}}
1044 "ifunc-9"}
1045 {"IFUNC test 10" "-T ifunc-dynamic.ld tmpdir/ifunc-4.so" "" "" {ifunc-10.s}
1046 {{objdump -d ifunc-10.dd}
1047 {objdump {-s -j.data -j.got} ifunc-10.gd}
1048 {readelf -r ifunc-10.rd}}
1049 "ifunc-10"}
1050 {"IFUNC test 11" "-T ifunc-static.ld" "" "" {ifunc-11.s}
1051 {{objdump -d ifunc-11.dd}
1052 {objdump {-s -j.data -j.got} ifunc-11.gd}
1053 {readelf -dr ifunc-11.rd}}
1054 "ifunc-11"}
1055 {"IFUNC test 12" "-T ifunc-dynamic.ld -shared" "" "" {ifunc-12.s}
1056 {{objdump -d ifunc-12.dd}
1057 {objdump {-s -j.data -j.got} ifunc-12.gd}
1058 {readelf -r ifunc-12.rd}}
1059 "ifunc-12.so"}
1060 {"IFUNC test 13" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-13.s}
1061 {{objdump -d ifunc-13.dd}
1062 {objdump {-s -j.data -j.got} ifunc-13.gd}
1063 {readelf -r ifunc-13.rd}}
1064 "ifunc-13"}
1065 {"IFUNC test 14" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-14.s}
1066 {{objdump -d ifunc-14.dd}
1067 {objdump {-s -j.data -j.got} ifunc-14.gd}
1068 {readelf -r ifunc-14.rd}}
1069 "ifunc-14"}
1070 {"IFUNC test 15" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-15.s}
1071 {{objdump -d ifunc-15.dd}
1072 {objdump {-s -j.data -j.got} ifunc-15.gd}
1073 {readelf -r ifunc-15.rd}}
1074 "ifunc-15"}
1075 {"IFUNC test 16" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-16.s}
1076 {{objdump -d ifunc-16.dd}
1077 {objdump {-s -j.data -j.got} ifunc-16.gd}
1078 {readelf -r ifunc-16.rd}}
1079 "ifunc-16"}
1080 {"IFUNC test 17" "-T ifunc-static.ld" "" "" {ifunc-17.s}
1081 {{objdump -d ifunc-17.dd}
1082 {objdump {-s -j.data -j.got} ifunc-17.gd}
1083 {readelf -r ifunc-17.rd}}
1084 "ifunc-17"}
1085 {"Long PLT entries in executables" "--long-plt -shared --section-start=.plt=0x1000 --section-start=.got=0xf0001100" ""
1086 "" {long-plt-format.s}
1087 {{objdump "-d -j .plt" long-plt-format.d}}
1088 "long-plt-format"}
1089 {"IFUNC and TLS descriptor shared library"
1090 "-shared -T arm-lib.ld --hash-style=sysv --version-script=ifunc-gdesc.ver" ""
1091 "" {ifunc-gdesc.s}
1092 {{objdump "-Rw" ifunc-gdesc.r}}
1093 "ifunc-gdesc.so"}
1094 {"arm-pic-veneer" "-static -T arm.ld --pic-veneer" "" "" {arm-pic-veneer.s}
1095 {{objdump -d arm-pic-veneer.d}}
1096 "arm-pic-veneer"}
1097 {"Preempt Thumb symbol"
1098 "tmpdir/mixed-lib.so -T arm-dyn.ld --hash-style=sysv --use-blx" ""
1099 "" {preempt-app.s}
1100 {{readelf -Ds preempt-app.sym}}
1101 "preempt-app"}
1102 }
1103
1104 set armfdpiceabitests {
1105 {"FDPIC ARM shared library little endian"
1106 "-shared -T fdpic-shared.ld --hash-style=sysv -EL -m armelf_linux_fdpiceabi" ""
1107 "-EL -fdpic" {fdpic-shared.s}
1108 {{objdump -fdw fdpic-shared.d} {objdump -Rw fdpic-shared.r}
1109 {readelf -Ds fdpic-shared.sym}}
1110 "fdpic-shared.so"}
1111 {"FDPIC ARM dynamic executable little endian"
1112 "tmpdir/fdpic-shared.so -T fdpic-main.ld --hash-style=sysv -EL -m armelf_linux_fdpiceabi" ""
1113 "-EL -fdpic" {fdpic-main.s}
1114 {{objdump -fdw fdpic-main.d} {objdump -Rw fdpic-main.r}
1115 {readelf -Ds fdpic-main.sym}}
1116 "fdpic-main"}
1117 {"FDPIC ARM shared library big endian"
1118 "-shared -T fdpic-shared.ld --hash-style=sysv -EB -m armelfb_linux_fdpiceabi" ""
1119 "-EB -fdpic" {fdpic-shared.s}
1120 {{objdump -fdw fdpic-shared.d} {objdump -Rw fdpic-shared.r}
1121 {readelf -Ds fdpic-shared.sym}}
1122 "fdpic-shared.so"}
1123 {"FDPIC ARM dynamic executable big endian"
1124 "tmpdir/fdpic-shared.so -T fdpic-main.ld --hash-style=sysv -EB -m armelfb_linux_fdpiceabi" ""
1125 "-EB -fdpic" {fdpic-main.s}
1126 {{objdump -fdw fdpic-main.d} {objdump -Rw fdpic-main.r}
1127 {readelf -Ds fdpic-main.sym}}
1128 "fdpic-main"}
1129 {"FDPIC ARM shared library little endian M profile"
1130 "-shared -T fdpic-shared.ld --hash-style=sysv -EL -m armelf_linux_fdpiceabi" ""
1131 "-EL -fdpic" {fdpic-shared-m.s}
1132 {{objdump -fdw fdpic-shared-m.d} {objdump -Rw fdpic-shared.r}
1133 {readelf -Ds fdpic-shared-m.sym}}
1134 "fdpic-shared.so"}
1135 {"FDPIC ARM dynamic executable little endian M profile"
1136 "tmpdir/fdpic-shared.so -T fdpic-main.ld --hash-style=sysv -EL -m armelf_linux_fdpiceabi" ""
1137 "-EL -fdpic" {fdpic-main-m.s}
1138 {{objdump -fdw fdpic-main-m.d} {objdump -Rw fdpic-main.r}
1139 {readelf -Ds fdpic-main-m.sym}}
1140 "fdpic-main"}
1141 }
1142
1143 # Massage the $armeabitests_common list into run_ld_link_tests standard form.
1144 # See the comment before 'set armeabitests_common', above.
1145 set elide_action_elt 3
1146 set is_nacl [istarget "arm*-*-nacl*"]
1147 if {$is_nacl} {
1148 set elide_action_elt 2
1149 }
1150 set neabi_common [llength $armeabitests_common]
1151 for {set i 0} {$i < $neabi_common} {incr i} {
1152 set case [lindex $armeabitests_common $i]
1153 set actions [lindex $case 5]
1154 set nactions [llength $actions]
1155 for {set j 0} {$j < $nactions} {incr j} {
1156 set action [lindex $actions $j]
1157 if {[llength $action] == 4} {
1158 set action [lreplace $action $elide_action_elt $elide_action_elt]
1159 lset armeabitests_common $i 5 $j $action
1160 }
1161 }
1162 }
1163
1164 run_ld_link_tests $armeabitests_common
1165 if { !$is_nacl } {
1166 run_ld_link_tests $armeabitests_nonacl
1167 }
1168
1169 if { [istarget "arm*-*-uclinuxfdpiceabi"] } {
1170 run_ld_link_tests $armfdpiceabitests
1171 }
1172
1173 run_dump_test "attr-merge-div-00"
1174 run_dump_test "attr-merge-div-01"
1175 run_dump_test "attr-merge-div-10"
1176 run_dump_test "attr-merge-div-01-m3"
1177 run_dump_test "attr-merge-div-10-m3"
1178 run_dump_test "attr-merge-div-11"
1179 run_dump_test "attr-merge-div-12"
1180 run_dump_test "attr-merge-div-120"
1181 run_dump_test "attr-merge-div-21"
1182 run_dump_test "attr-merge-div-22"
1183 run_dump_test "attr-merge-div-02"
1184 run_dump_test "attr-merge-div-20"
1185 run_dump_test "attr-merge-wchar-00"
1186 run_dump_test "attr-merge-wchar-02"
1187 run_dump_test "attr-merge-wchar-04"
1188 run_dump_test "attr-merge-wchar-20"
1189 run_dump_test "attr-merge-wchar-22"
1190 run_dump_test "attr-merge-wchar-24"
1191 run_dump_test "attr-merge-wchar-40"
1192 run_dump_test "attr-merge-wchar-42"
1193 run_dump_test "attr-merge-wchar-44"
1194 run_dump_test "attr-merge-wchar-00-nowarn"
1195 run_dump_test "attr-merge-wchar-02-nowarn"
1196 run_dump_test "attr-merge-wchar-04-nowarn"
1197 run_dump_test "attr-merge-wchar-20-nowarn"
1198 run_dump_test "attr-merge-wchar-22-nowarn"
1199 run_dump_test "attr-merge-wchar-24-nowarn"
1200 run_dump_test "attr-merge-wchar-40-nowarn"
1201 run_dump_test "attr-merge-wchar-42-nowarn"
1202 run_dump_test "attr-merge-wchar-44-nowarn"
1203 run_dump_test "farcall-section"
1204 run_dump_test "attr-merge-unknown-1"
1205 run_dump_test "attr-merge-unknown-2"
1206 run_dump_test "attr-merge-unknown-2r"
1207 run_dump_test "attr-merge-unknown-3"
1208 run_dump_test "unwind-1"
1209 run_dump_test "unwind-2"
1210 run_dump_test "unwind-3"
1211 run_dump_test "unwind-4"
1212 run_dump_test "unwind-5"
1213 run_dump_test "attr-merge-vfp-1"
1214 run_dump_test "attr-merge-vfp-1r"
1215 run_dump_test "attr-merge-vfp-2"
1216 run_dump_test "attr-merge-vfp-2r"
1217 run_dump_test "attr-merge-vfp-3"
1218 run_dump_test "attr-merge-vfp-3r"
1219 run_dump_test "attr-merge-vfp-4"
1220 run_dump_test "attr-merge-vfp-4r"
1221 run_dump_test "attr-merge-vfp-5"
1222 run_dump_test "attr-merge-vfp-5r"
1223 run_dump_test "attr-merge-vfp-6"
1224 run_dump_test "attr-merge-vfp-6r"
1225 run_dump_test "attr-merge-vfp-7"
1226 run_dump_test "attr-merge-vfp-7r"
1227 run_dump_test "attr-merge-vfp-8"
1228 run_dump_test "attr-merge-vfp-8r"
1229 run_dump_test "attr-merge-vfp-9"
1230 run_dump_test "attr-merge-vfp-9r"
1231 run_dump_test "attr-merge-vfp-10"
1232 run_dump_test "attr-merge-vfp-10r"
1233 run_dump_test "attr-merge-vfp-11"
1234 run_dump_test "attr-merge-vfp-11r"
1235 run_dump_test "attr-merge-vfp-12"
1236 run_dump_test "attr-merge-vfp-12r"
1237 run_dump_test "attr-merge-vfp-13"
1238 run_dump_test "attr-merge-vfp-13r"
1239 run_dump_test "attr-merge-vfp-14"
1240 run_dump_test "attr-merge-vfp-14r"
1241 run_dump_test "attr-merge-incompatible"
1242 run_dump_test "attr-merge-arch-2"
1243 run_dump_test "attr-merge-nosection-1"
1244 run_dump_test "attr-merge-hardfp-use-1"
1245 run_dump_test "attr-merge-hardfp-use-2"
1246 run_dump_test "unresolved-1"
1247 if { ![istarget "arm*-*-nacl*"] } {
1248 run_dump_test "unresolved-1-dyn"
1249 }
1250 run_dump_test "unresolved-2"
1251 run_dump_test "gc-hidden-1"
1252 run_dump_test "protected-data"
1253 run_dump_test "stm32l4xx-cannot-fix-it-block"
1254 run_dump_test "stm32l4xx-cannot-fix-far-ldm"
1255 set arm_unwind_tests {
1256 {"unwind-rel" "-r -Tarm.ld" "" "" {unwind-rel1.s unwind-rel2.s unwind-rel3.s}
1257 {{readelf -ur unwind-rel.d}}
1258 "unwind-rel"}
1259 {"unwind-mix" "-Tarm.ld" "" "" {unwind-mix1.s unwind-mix2.s}
1260 {{readelf -u unwind-mix.d}}
1261 "unwind-mix"}
1262 }
1263 run_ld_link_tests $arm_unwind_tests
This page took 0.06178 seconds and 4 git commands to generate.