1 # Expect script
for various ARM ELF tests.
2 # Copyright
2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
3 # Free Software Foundation
, Inc.
5 # This file is part of the GNU Binutils.
7 # This
program is free software
; you can redistribute it and
/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation
; either version
3 of the License
, or
10 #
(at your option
) any later version.
12 # This
program is distributed in the hope that it will be useful
,
13 # but WITHOUT
ANY WARRANTY
; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License
for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this
program; if not
, write to the Free Software
19 # Foundation
, Inc.
, 51 Franklin Street
- Fifth Floor
, Boston
,
23 if {[istarget
"arm-*-vxworks"]} {
25 {"VxWorks shared library test 1" "-shared -Tvxworks1.ld"
27 {{readelf
--relocs vxworks1
-lib.rd
} {objdump
-dr vxworks1
-lib.dd
}
28 {readelf
--symbols vxworks1
-lib.nd
} {readelf
-d vxworks1
-lib.td
}}
30 {"VxWorks executable test 1 (dynamic)" \
31 "tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic"
33 {{readelf
--relocs vxworks1.rd
} {objdump
-dr vxworks1.dd
}}
35 {"VxWorks executable test 2 (dynamic)" \
36 "-Tvxworks1.ld -q --force-dynamic"
38 {{readelf
--segments vxworks2.sd
}}
40 {"VxWorks executable test 2 (static)"
43 {{readelf
--segments vxworks2
-static.sd
}}
46 run_ld_link_tests $armvxworkstests
47 run_dump_test
"vxworks1-static"
48 run_dump_test
"emit-relocs1-vxworks"
51 if { [istarget
"arm*-*-symbianelf*"] } {
52 run_dump_test
"symbian-seg1"
55 # Exclude non
-ARM
-ELF targets.
57 if { ![is_elf_format
] ||
![istarget
"arm*-*-*"] } {
61 # List contains test
-items with
3 items followed by
2 lists and one more item
:
62 #
0:name 1:ld options
2:assembler options
63 #
3:filenames of assembler files
4: action and options.
5: name of output file
66 # objdump
: Apply objdump options
on result. Compare with regex
(last
arg).
67 # nm
: Apply nm options
on result. Compare with regex
(last
arg).
68 # readelf
: Apply readelf options
on result. Compare with regex
(last
arg).
71 {"Group relocations" "-Ttext 0x8000 --section-start zero=0x0 --section-start alpha=0xeef0 --section-start beta=0xffeef0" "" {group-relocs.s}
72 {{objdump
-dr group
-relocs.d
}}
74 {"Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x401000" "" {thumb1-bl.s}
75 {{objdump
-dr thumb1
-bl.d
}}
77 {"Simple non-PIC shared library" "-shared" "" {arm-lib.s}
78 {{objdump
-fdw arm
-lib.d
} {objdump
-Rw arm
-lib.r
}}
80 {"Simple PIC shared library" "-shared" "" {arm-lib-plt32.s}
81 {{objdump
-fdw arm
-lib
-plt32.d
} {objdump
-Rw arm
-lib
-plt32.r
}}
83 {"Indirect cross-library function reference (set-up)"
84 "-shared" "" {arm-lib-plt-2a.s}
87 {"Indirect cross-library function reference"
88 "-shared tmpdir/arm-lib-plt-2a.so" "" {arm-lib-plt-2b.s}
89 {{objdump
-dr arm
-lib
-plt
-2.dd
} {readelf
--relocs arm
-lib
-plt
-2.rd
}}
91 {"Simple dynamic application" "tmpdir/arm-lib.so" "" {arm-app.s}
92 {{objdump
-fdw arm
-app.d
} {objdump
-Rw arm
-app.r
}}
94 {"Simple static application" "" "" {arm-static-app.s}
95 {{objdump
-fdw arm
-static
-app.d
} {objdump
-rw arm
-static
-app.r
}}
97 {"Non-pcrel function reference" "tmpdir/arm-lib.so" "" {arm-app-abs32.s}
98 {{objdump
-fdw arm
-app
-abs32.d
} {objdump
-Rw arm
-app
-abs32.r
}}
100 {"Thumb shared library with ARM entry points" "-shared -T arm-lib.ld" "-mthumb-interwork"
102 {{objdump
-fdw armthumb
-lib.d
} {readelf
-Ds armthumb
-lib.sym
}}
104 {"Mixed ARM/Thumb shared library" "-shared -T arm-lib.ld -use-blx" ""
106 {{objdump
-fdw mixed
-lib.d
} {objdump
-Rw mixed
-lib.r
}
107 {readelf
-Ds mixed
-lib.sym
}}
109 {"Mixed ARM/Thumb dynamic application" "tmpdir/mixed-lib.so -T arm-dyn.ld" ""
111 {{objdump
-fdw mixed
-app.d
} {objdump
-Rw mixed
-app.r
}
112 {readelf
-Ds mixed
-app.sym
}}
114 {"Mixed ARM/Thumb arch5 dynamic application" "tmpdir/mixed-lib.so -T arm-dyn.ld --use-blx" ""
116 {{objdump
-fdw mixed
-app
-v5.d
} {objdump
-Rw mixed
-app.r
}
117 {readelf
-Ds mixed
-app.sym
}}
119 {"target1-abs" "-static --target1-abs -T arm.ld" "" {arm-target1.s}
120 {{objdump
-s arm
-target1
-abs.d
}}
122 {"target1-rel" "-static --target1-rel -T arm.ld" "" {arm-target1.s}
123 {{objdump
-s arm
-target1
-rel.d
}}
125 {"target2-rel" "-static --target2=rel -T arm.ld" "" {arm-target2.s}
126 {{objdump
-s arm
-target2
-rel.d
}}
128 {"target2-abs" "-static --target2=abs -T arm.ld" "" {arm-target2.s}
129 {{objdump
-s arm
-target2
-abs.d
}}
131 {"target2-got-rel" "-static --target2=got-rel -T arm.ld" "" {arm-target2.s}
132 {{objdump
-s arm
-target2
-got
-rel.d
}}
133 "arm-target2-got-rel"}
134 {"arm-rel31" "-static -T arm.ld" "" {arm-rel31.s}
135 {{objdump
-s arm
-rel31.d
}}
137 {"arm-rel32" "-shared -T arm-dyn.ld" "" {arm-rel32.s}
138 {{objdump
-Rsj.data arm
-rel32.d
}}
140 {"arm-call" "-static -T arm.ld" "-meabi=4" {arm-call1.s arm-call2.s}
141 {{objdump
-d arm
-call.d
}}
143 {"TLS shared library" "-shared -T arm-lib.ld" "" {tls-lib.s}
144 {{objdump
-fdw tls
-lib.d
} {objdump
-Rw tls
-lib.r
}}
146 {"TLS dynamic application" "-T arm-dyn.ld tmpdir/tls-lib.so" "" {tls-app.s}
147 {{objdump
-fdw tls
-app.d
} {objdump
-Rw tls
-app.r
}}
149 {"TLS gnu shared library got" "-shared -T arm-dyn.ld" "" {tls-gdesc-got.s}
150 {{objdump
"-fDR -j .got" tls-gdesc-got.d}}
152 {"TLS gnu shared library inlined trampoline" "-shared -T arm-dyn.ld" "" {tls-descseq.s}
153 {{objdump
-fdw tls
-descseq.d
} {objdump
-Rw tls
-descseq.r
}}
155 {"TLS shared library gdesc local" "-shared -T arm-dyn.ld" "" {tls-lib-loc.s}
156 {{objdump
-fdw tls
-lib
-loc.d
} {objdump
-Rw tls
-lib
-loc.r
}}
158 {"TLS gnu GD to IE relaxation" "-static -T arm-dyn.ld" "" {tls-gdierelax.s}
159 {{objdump
-fdw tls
-gdierelax.d
}}
161 {"TLS gnu GD to IE shared relaxation" "-shared -T arm-dyn.ld" "" {tls-gdierelax2.s}
162 {{objdump
-fdw tls
-gdierelax2.d
}}
164 {"TLS gnu GD to LE relaxation" "-T arm-dyn.ld" "" {tls-gdlerelax.s}
165 {{objdump
-fdw tls
-gdlerelax.d
}}
167 {"TLS mixed models shared lib" "-shared -T arm-dyn.ld" "" {tls-mixed.s}
168 {{objdump
-Rw tls
-mixed.r
}}
170 {"TLS descseq relaxation" "-T arm-dyn.ld" "" {tls-descrelax.s}
171 {{objdump
-fdw tls
-descrelax.d
}}
173 {"TLS descseq relaxation v7" "-T arm-dyn.ld" "" {tls-descrelax-v7.s}
174 {{objdump
-fdw tls
-descrelax
-v7.d
}}
176 {"TLS descseq relaxation BE8" "-T arm-dyn.ld -EB --be8" "-mbig-endian" {tls-descrelax-be8.s}
177 {{objdump
-fdw tls
-descrelax
-be8.d
}}
179 {"TLS descseq relaxation BE32" "-T arm-dyn.ld -EB" "-mbig-endian" {tls-descrelax-be32.s}
180 {{objdump
-fdw tls
-descrelax
-be32.d
}}
181 "tls-descrelax-be32"}
182 {"Thumb entry point" "-T arm.ld" "" {thumb-entry.s}
183 {{readelf
-h thumb
-entry.d
}}
185 {"thumb-rel32" "-static -T arm.ld" "" {thumb-rel32.s}
186 {{objdump
-s thumb
-rel32.d
}}
188 {"MOVW/MOVT" "-static -T arm.ld" "" {arm-movwt.s}
189 {{objdump
-dw arm
-movwt.d
}}
191 {"BE8 Mapping Symbols" "-static -T arm.ld -EB --be8" "-EB" {arm-be8.s}
192 {{objdump
-d arm
-be8.d
}}
194 {"Using Thumb lib by another lib" "-shared tmpdir/mixed-lib.so" "" {use-thumb-lib.s}
195 {{readelf
-Ds use
-thumb
-lib.sym
}}
197 {"VFP11 denorm erratum fix, scalar operation"
198 "-EL --vfp11-denorm-fix=scalar -Ttext=0x8000" "-EL -mfpu=vfpxd" {vfp11-fix-scalar.s}
199 {{objdump
-dr vfp11
-fix
-scalar.d
}}
201 {"VFP11 denorm erratum fix, vector operation"
202 "-EB --vfp11-denorm-fix=vector -Ttext=0x8000" "-EB -mfpu=vfpxd" {vfp11-fix-vector.s}
203 {{objdump
-dr vfp11
-fix
-vector.d
}}
205 {"VFP11 denorm erratum fix, embedded code-like data"
206 "-EL --vfp11-denorm-fix=scalar -Ttext=0x8000" "-EL -mfpu=vfpxd" {vfp11-fix-none.s}
207 {{objdump
-dr vfp11
-fix
-none.d
}}
209 {"Cortex-A8 erratum fix, b.w"
210 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-b.s}
211 {{objdump
-dr cortex
-a8
-fix
-b.d
}}
213 {"Cortex-A8 erratum fix, bl.w"
214 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-bl.s}
215 {{objdump
-dr cortex
-a8
-fix
-bl.d
}}
217 {"Cortex-A8 erratum fix, bcc.w"
218 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-bcc.s}
219 {{objdump
-dr cortex
-a8
-fix
-bcc.d
}}
221 {"Cortex-A8 erratum fix, blx.w"
222 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-blx.s}
223 {{objdump
-dr cortex
-a8
-fix
-blx.d
}}
225 {"Cortex-A8 erratum fix, relocate b.w to ARM"
226 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-b-rel.s}
227 {{objdump
-dr cortex
-a8
-fix
-b
-rel
-arm.d
}}
228 "cortex-a8-fix-b-rel-arm"}
229 {"Cortex-A8 erratum fix, relocate b.w to Thumb"
230 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-b-rel.s}
231 {{objdump
-dr cortex
-a8
-fix
-b
-rel
-thumb.d
}}
232 "cortex-a8-fix-b-rel-thumb"}
233 {"Cortex-A8 erratum fix, relocate bl.w to ARM"
234 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-bl-rel.s}
235 {{objdump
-dr cortex
-a8
-fix
-bl
-rel
-arm.d
}}
236 "cortex-a8-fix-bl-rel-arm"}
237 {"Cortex-A8 erratum fix, relocate bl.w to Thumb"
238 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bl-rel.s}
239 {{objdump
-dr cortex
-a8
-fix
-bl
-rel
-thumb.d
}}
240 "cortex-a8-fix-bl-rel-thumb"}
241 {"Cortex-A8 erratum fix, relocate bl.w to PLT"
242 "-EL --section-start=.plt=0x8e00 -Ttext=0x8f00 --fix-cortex-a8 -shared"
243 "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bl-rel.s}
244 {{objdump
-dr cortex
-a8
-fix
-bl
-rel
-plt.d
}}
245 "cortex-a8-fix-bl-rel-thumb"}
246 {"Cortex-A8 erratum fix, relocate b<cond>.w to Thumb"
247 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bcc-rel.s}
248 {{objdump
-dr cortex
-a8
-fix
-bcc
-rel
-thumb.d
}}
249 "cortex-a8-fix-bcc-rel-thumb"}
250 {"Cortex-A8 erratum fix, relocate blx.w to ARM"
251 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-blx-rel.s}
252 {{objdump
-dr cortex
-a8
-fix
-blx
-rel
-arm.d
}}
253 "cortex-a8-fix-blx-rel-arm"}
254 {"Cortex-A8 erratum fix, relocate blx.w to Thumb"
255 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-blx-rel.s}
256 {{objdump
-dr cortex
-a8
-fix
-blx
-rel
-thumb.d
}}
257 "cortex-a8-fix-blx-rel-thumb"}
258 {"Cortex-A8 erratum fix, relocate bl.w and far call"
259 "-EL -Ttext=0x00 --fix-cortex-a8 --defsym far_fn1=0x80000000 --defsym far_fn2=0x80000004 --defsym far_fn=0x7fff0000 --defsym _start=0"
260 "-EL -mcpu=cortex-a8" {cortex-a8-far-1.s cortex-a8-far-2.s}
261 {{objdump
-dr cortex
-a8
-far.d
}}
263 {"Cortex-A8 erratum fix, headers"
264 "-EL --fix-cortex-a8 -T cortex-a8-fix-hdr.t"
265 "-EL -mcpu=cortex-a8" {cortex-a8-fix-hdr.s}
266 {{objdump
-dr cortex
-a8
-fix
-hdr.d
}}
268 {"Cortex-A8 erratum fix, blx.w and b<cond>.w together"
269 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-blx-bcond.s}
270 {{objdump
-dr cortex
-a8
-fix
-blx
-bcond.d
}}
271 "cortex-a8-fix-blx-bcond"}
272 {"Unwinding and -gc-sections" "-gc-sections" "" {gc-unwind.s}
273 {{objdump
-sj.data gc
-unwind.d
}}
275 {"Thumb and -gc-sections" "-shared -T arm-dyn.ld" "" {gc-thumb-lib.s}
278 {"Thumb and -gc-sections" "-pie -T arm.ld -gc-sections tmpdir/gc-thumb-lib.so" "" {gc-thumb.s}
279 {{readelf
--relocs gc
-thumb.d
}}
281 {"arm-pic-veneer" "-static -T arm.ld --pic-veneer" "" {arm-pic-veneer.s}
282 {{objdump
-d arm
-pic
-veneer.d
}}
284 {"Preempt Thumb symbol" "tmpdir/mixed-lib.so -T arm-dyn.ld --use-blx" ""
286 {{readelf
-Ds preempt
-app.sym
}}
288 {"jump19" "-static -T arm.ld" "" {jump19.s}
289 {{objdump
-dr jump19.d
}}
291 {"script-type" "-static -T script-type.ld" "" {script-type.s}
292 {{readelf
-s script
-type.sym
}}
294 {"callweak" "-static -T arm.ld" "" {callweak.s}
295 {{objdump
-dr callweak.d
}}
297 {"callweak-2" "-static -T arm.ld" "" {callweak-2.s}
298 {{objdump
-dr callweak
-2.d
}}
300 {"Relocation boundaries" "-defsym x=0 -defsym y=0 -defsym _start=0" "" {reloc-boundaries.s}
301 {{objdump
-s reloc
-boundaries.d
}}
303 {"Data only mapping symbols" "-T data-only-map.ld -Map map" "" {data-only-map.s}
304 {{objdump
-dr data
-only
-map.d
}}
306 {"GOT relocations in executables (setup)" "-shared"
310 {"GOT relocations in executables" "tmpdir/exec-got-1.so"
312 {{readelf
--relocs exec
-got
-1.d
}}
316 run_ld_link_tests $armelftests
317 run_dump_test
"group-relocs-alu-bad"
318 run_dump_test
"group-relocs-ldr-bad"
319 run_dump_test
"group-relocs-ldrs-bad"
320 run_dump_test
"group-relocs-ldc-bad"
321 run_dump_test
"thumb2-bl-undefweak"
322 run_dump_test
"thumb2-bl-undefweak1"
323 run_dump_test
"emit-relocs1"
324 run_dump_test
"movw-shared-1"
325 run_dump_test
"movw-shared-2"
326 run_dump_test
"movw-shared-3"
327 run_dump_test
"movw-shared-4"
329 # Exclude non
-ARM
-EABI targets.
331 if { ![istarget
"arm*-*-*eabi"] } {
332 # Special variants of these tests
, as a different farcall stub is
333 # generated
for a non
-ARM
-EABI target
: indeed in such a case
,
334 # there are no attributes to indicate that blx can be used.
336 set arm_noeabi_tests
{
337 {"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-as-thumb1-bad.s}
338 {{objdump
-d thumb2
-bl
-as
-thumb1
-bad
-noeabi.d
}}
339 "thumb2-bl-as-thumb1-bad"}
340 {"Thumb-2 BL bad" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-bad.s}
341 {{objdump
-d thumb2
-bl
-bad
-noeabi.d
}}
344 run_ld_link_tests $arm_noeabi_tests
349 # Farcalls stubs are fully supported
for ARM
-EABI only
351 {"EABI attribute merging" "-r" "" {attr-merge.s attr-merge.s}
352 {{readelf
-A attr
-merge.attr
}}
354 {"EABI attribute merging 2" "-r" "" {attr-merge-2a.s attr-merge-2b.s}
355 {{readelf
-A attr
-merge
-2.attr
}}
357 {"EABI attribute merging 3" "-r" "" {attr-merge-3a.s attr-merge-3b.s}
358 {{readelf
-A attr
-merge
-3.attr
}}
360 {"EABI attribute merging 4" "-r" "" {attr-merge-4a.s attr-merge-4b.s}
361 {{readelf
-A attr
-merge
-4.attr
}}
363 {"EABI attribute merging 5" "-r" "" {attr-merge-5.s attr-merge-5.s}
364 {{readelf
-A attr
-merge
-5.attr
}}
366 {"EABI attribute merging 6" "-r" "" {attr-merge-6a.s attr-merge-6b.s}
367 {{readelf
-A attr
-merge
-6.attr
}}
369 {"EABI attribute merging 6 reversed" "-r" "" {attr-merge-6b.s attr-merge-6a.s}
370 {{readelf
-A attr
-merge
-6.attr
}}
372 {"EABI attribute merging 7" "-r" "" {attr-merge-7a.s attr-merge-7b.s}
373 {{readelf
-A attr
-merge
-7.attr
}}
375 {"EABI attribute arch merging 1" "-r" "" {arch-v6k.s arch-v6t2.s}
376 {{readelf
-A attr
-merge
-arch
-1.attr
}}
378 {"EABI attribute arch merging 1 reversed" "-r" "" {arch-v6t2.s arch-v6k.s}
379 {{readelf
-A attr
-merge
-arch
-1.attr
}}
380 "attr-merge-arch-1r"}
381 {"EABI attribute arch merging 2" "-r" "" {arch-v6k.s arch-v6.s}
382 {{readelf
-A attr
-merge
-arch
-2.attr
}}
384 {"EABI attribute arch merging 2 reversed" "-r" "" {arch-v6.s arch-v6k.s}
385 {{readelf
-A attr
-merge
-arch
-2.attr
}}
386 "attr-merge-arch-2r"}
387 {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x1001000" "" {thumb2-bl.s}
388 {{objdump
-dr thumb2
-bl.d
}}
390 {"Thumb-2 Interworked branch" "-T arm.ld" "" {thumb2-b-interwork.s}
391 {{objdump
-dr thumb2
-b
-interwork.d
}}
392 "thumb2-b-interwork"}
393 {"BL/BLX interworking" "-T arm.ld" "" {thumb2-bl-blx-interwork.s}
394 {{objdump
-dr thumb2
-bl
-blx
-interwork.d
}}
395 "thumb2-bl-blx-interwork"}
396 {"ARMv4 interworking" "-static -T arm.ld --fix-v4bx-interworking" "--fix-v4bx -meabi=4" {armv4-bx.s}
397 {{objdump
-d armv4
-bx.d
}}
399 {"MOVW/MOVT and merged sections" "-T arm.ld" "" {movw-merge.s}
400 {{objdump
-dw movw
-merge.d
}}
402 {"MOVW/MOVT against shared libraries" "tmpdir/arm-lib.so" "" {arm-app-movw.s}
403 {{objdump
-Rw arm
-app.r
}}
405 {"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-as-thumb1-bad.s}
406 {{objdump
-d thumb2
-bl
-as
-thumb1
-bad.d
}}
407 "thumb2-bl-as-thumb1-bad"}
408 {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-bad.s}
409 {{objdump
-d thumb2
-bl
-bad.d
}}
412 {"ARM-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001020" "" {farcall-arm-arm.s}
413 {{objdump
-d farcall
-arm
-arm.d
}}
415 {"ARM-ARM farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001020 --pic-veneer" "" {farcall-arm-arm.s}
416 {{objdump
-d farcall
-arm
-arm
-pic
-veneer.d
}}
417 "farcall-arm-arm-pic-veneer"}
418 {"ARM-ARM farcall (BE8)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB --be8" "-EB" {farcall-arm-arm.s}
419 {{objdump
-d farcall
-arm
-arm.d
}}
420 "farcall-arm-arm-be8"}
421 {"ARM-ARM farcall (BE)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB" "-EB" {farcall-arm-arm.s}
422 {{objdump
-d farcall
-arm
-arm.d
}}
423 "farcall-arm-arm-be"}
425 {"ARM-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "" {farcall-arm-thumb.s}
426 {{objdump
-d farcall
-arm
-thumb.d
}}
428 {"ARM-Thumb farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv5t" {farcall-arm-thumb.s}
429 {{objdump
-d farcall
-arm
-thumb
-blx.d
}}
430 "farcall-arm-thumb-blx"}
431 {"ARM-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" {farcall-arm-thumb.s}
432 {{objdump
-d farcall
-arm
-thumb
-pic
-veneer.d
}}
433 "farcall-arm-thumb-pic-veneer"}
434 {"ARM-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-arm-thumb.s}
435 {{objdump
-d farcall
-arm
-thumb
-blx
-pic
-veneer.d
}}
436 "farcall-arm-thumb-blx-pic-veneer"}
438 {"Thumb-Thumb farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv5t" {farcall-thumb-thumb.s}
439 {{objdump
-d farcall
-thumb
-thumb
-blx.d
}}
440 "farcall-thumb-thumb-blx"}
441 {"Thumb-Thumb farcall M profile" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv7-m" {farcall-thumb-thumb.s}
442 {{objdump
-d farcall
-thumb
-thumb
-m.d
}}
443 "farcall-thumb-thumb-m"}
444 {"Thumb-Thumb farcall v6-M" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv6-m" {farcall-thumb-thumb.s}
445 {{objdump
-d farcall
-thumb
-thumb
-m.d
}}
446 "farcall-thumb-thumb-v6-m"}
447 {"Thumb-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv4t" {farcall-thumb-thumb.s}
448 {{objdump
-d farcall
-thumb
-thumb.d
}}
449 "farcall-thumb-thumb"}
450 {"Thumb-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-thumb-thumb.s}
451 {{objdump
-d farcall
-thumb
-thumb
-blx
-pic
-veneer.d
}}
452 "farcall-thumb-thumb-blx-pic-veneer"}
453 {"Thumb-Thumb farcall M profile (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv7-m" {farcall-thumb-thumb.s}
454 {{objdump
-d farcall
-thumb
-thumb
-m
-pic
-veneer.d
}}
455 "farcall-thumb-thumb-m-pic-veneer"}
456 {"Thumb-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv4t" {farcall-thumb-thumb.s}
457 {{objdump
-d farcall
-thumb
-thumb
-pic
-veneer.d
}}
458 "farcall-thumb-thumb-pic-veneer"}
460 {"Thumb-ARM farcall" "-Ttext 0x1c01010 --section-start .foo=0x2001014" "-W" {farcall-thumb-arm.s}
461 {{objdump
-d farcall
-thumb
-arm.d
}}
463 {"Thumb-ARM farcall (BE8)" "-Ttext 0x1c01010 --section-start .foo=0x2001014 -EB --be8" "-W -EB" {farcall-thumb-arm.s}
464 {{objdump
-d farcall
-thumb
-arm.d
}}
465 "farcall-thumb-arm-be8"}
466 {"Thumb-ARM farcall (BE)" "-Ttext 0x1c01010 --section-start .foo=0x2001014 -EB" "-W -EB" {farcall-thumb-arm.s}
467 {{objdump
-d farcall
-thumb
-arm.d
}}
468 "farcall-thumb-arm-be"}
469 {"Thumb-ARM (short) call" "-Ttext 0x1000 --section-start .foo=0x0002014" "-W" {farcall-thumb-arm-short.s}
470 {{objdump
-d farcall
-thumb
-arm
-short.d
}}
471 "farcall-thumb-arm-short"}
472 {"Thumb-ARM farcall with BLX" "-Ttext 0x1c01010 --section-start .foo=0x2001014" "-W -march=armv5t" {farcall-thumb-arm.s}
473 {{objdump
-d farcall
-thumb
-arm
-blx.d
}}
474 "farcall-thumb-arm-blx"}
475 {"Thumb-ARM farcall with BLX (PIC veneer)" "-Ttext 0x1c01010 --section-start .foo=0x2001014 --pic-veneer" "-W -march=armv5t" {farcall-thumb-arm.s}
476 {{objdump
-d farcall
-thumb
-arm
-blx
-pic
-veneer.d
}}
477 "farcall-thumb-arm-blx-pic-veneer"}
478 {"Thumb-ARM farcall (PIC veneer)" "-Ttext 0x1c01010 --section-start .foo=0x2001014 --pic-veneer" "-W" {farcall-thumb-arm.s}
479 {{objdump
-d farcall
-thumb
-arm
-pic
-veneer.d
}}
480 "farcall-thumb-arm-pic-veneer"}
482 {"Multiple farcalls" "-Ttext 0x1000 --section-start .foo=0x2002020" "" {farcall-mix.s}
483 {{objdump
-d farcall
-mix.d
}}
485 {"Multiple farcalls from several sections" "-Ttext 0x1000 --section-start .mytext=0x2000 --section-start .foo=0x2003020" "" {farcall-mix2.s}
486 {{objdump
-d farcall
-mix2.d
}}
489 {"Default group size" "-Ttext 0x1000 --section-start .foo=0x2003020" "" {farcall-group.s farcall-group2.s}
490 {{objdump
-d farcall
-group.d
}}
491 "farcall-group-default"}
492 {"Group size=2" "-Ttext 0x1000 --section-start .foo=0x2003020 --stub-group-size=2" "" {farcall-group.s farcall-group2.s}
493 {{objdump
-d farcall
-group
-size2.d
}}
494 "farcall-group-size2"}
495 {"Group size limit" "-Ttext 0x1000 --section-start .far=0x2003020" "" {farcall-group3.s farcall-group4.s}
496 {{objdump
-d farcall
-group
-limit.d
}}
497 "farcall-group-limit"}
499 {"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" ""
500 {farcall
-mixed
-app.s
}
501 {{objdump
-fdw farcall
-mixed
-app.d
} {objdump
-Rw farcall
-mixed
-app.r
}
502 {readelf
-Ds farcall
-mixed
-app.sym
}}
504 {"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" ""
505 {farcall
-mixed
-app.s
}
506 {{objdump
-fdw farcall
-mixed
-app
-v5.d
} {objdump
-Rw farcall
-mixed
-app.r
}
507 {readelf
-Ds farcall
-mixed
-app.sym
}}
508 "farcall-mixed-app-v5"}
510 {"Mixed ARM/Thumb shared library with long branches (v4t)" "-shared -T arm-lib.ld" "-march=armv4t"
511 {farcall
-mixed
-lib1.s farcall
-mixed
-lib2.s
}
512 {{objdump
-fdw farcall
-mixed
-lib
-v4t.d
}}
513 "farcall-mixed-lib.so"}
515 {"Mixed ARM/Thumb shared library with long branches (v5t)" "-shared -T arm-lib.ld" "-march=armv5t"
516 {farcall
-mixed
-lib1.s farcall
-mixed
-lib2.s
}
517 {{objdump
-fdw farcall
-mixed
-lib.d
}}
518 "farcall-mixed-lib.so"}
520 {"Long branch with mixed text and data" "-T arm.ld" "" {farcall-data.s}
521 {{objdump
-dr farcall
-data.d
}}
524 {"R_ARM_THM_JUMP24 Relocation veneers: Short 1"
525 "--section-start destsect=0x00009000 --section-start .text=0x8000"
526 "-march=armv7-a -mthumb"
527 {jump
-reloc
-veneers.s
}
528 {{objdump
-d jump
-reloc
-veneers
-short1.d
}}
529 "jump-reloc-veneers-short1"}
530 {"R_ARM_THM_JUMP24 Relocation veneers: Short 2"
531 "--section-start destsect=0x00900000 --section-start .text=0x8000"
532 "-march=armv7-a -mthumb"
533 {jump
-reloc
-veneers.s
}
534 {{objdump
-d jump
-reloc
-veneers
-short2.d
}}
535 "jump-reloc-veneers-short2"}
536 {"R_ARM_THM_JUMP24 Relocation veneers: Long"
537 "--section-start destsect=0x09000000 --section-start .text=0x8000"
538 "-march=armv7-a -mthumb"
539 {jump
-reloc
-veneers.s
}
540 {{objdump
-d jump
-reloc
-veneers
-long.d
}}
541 "jump-reloc-veneers-long"}
542 {"TLS gnu shared library" "-shared -T arm-dyn.ld" "" {tls-gdesc.s}
543 {{objdump
-fdw tls
-gdesc.d
} {objdump
-Rw tls
-gdesc.r
}}
545 {"TLS gnu shared library non-lazy" "-z now -shared -T arm-dyn.ld" "" {tls-gdesc.s}
546 {{readelf
"-x .got" tls-gdesc-nlazy.g}}
548 {"TLS long plt library" "-shared -T arm-dyn.ld --section-start .foo=0x4001000" "" {tls-longplt-lib.s}
549 {{objdump
-fdw tls
-longplt
-lib.d
}}
550 "tls-longplt-lib.so"}
551 {"TLS long plt" "-T arm-dyn.ld --section-start .foo=0x4001000 tmpdir/tls-longplt-lib.so" "" {tls-longplt.s}
552 {{objdump
-fdw tls
-longplt.d
}}
554 {"TLS thumb1" "-shared -T arm-dyn.ld --section-start .foo=0x4001000" "" {tls-thumb1.s}
555 {{objdump
-fdw tls
-thumb1.d
}}
559 run_ld_link_tests $armeabitests
560 run_dump_test
"attr-merge-wchar-00"
561 run_dump_test
"attr-merge-wchar-02"
562 run_dump_test
"attr-merge-wchar-04"
563 run_dump_test
"attr-merge-wchar-20"
564 run_dump_test
"attr-merge-wchar-22"
565 run_dump_test
"attr-merge-wchar-24"
566 run_dump_test
"attr-merge-wchar-40"
567 run_dump_test
"attr-merge-wchar-42"
568 run_dump_test
"attr-merge-wchar-44"
569 run_dump_test
"attr-merge-wchar-00-nowarn"
570 run_dump_test
"attr-merge-wchar-02-nowarn"
571 run_dump_test
"attr-merge-wchar-04-nowarn"
572 run_dump_test
"attr-merge-wchar-20-nowarn"
573 run_dump_test
"attr-merge-wchar-22-nowarn"
574 run_dump_test
"attr-merge-wchar-24-nowarn"
575 run_dump_test
"attr-merge-wchar-40-nowarn"
576 run_dump_test
"attr-merge-wchar-42-nowarn"
577 run_dump_test
"attr-merge-wchar-44-nowarn"
578 run_dump_test
"farcall-section"
579 run_dump_test
"attr-merge-unknown-1"
580 run_dump_test
"attr-merge-unknown-2"
581 run_dump_test
"attr-merge-unknown-2r"
582 run_dump_test
"attr-merge-unknown-3"
583 run_dump_test
"unwind-1"
584 run_dump_test
"unwind-2"
585 run_dump_test
"unwind-3"
586 run_dump_test
"unwind-4"
587 run_dump_test
"unwind-5"
588 run_dump_test
"attr-merge-vfp-1"
589 run_dump_test
"attr-merge-vfp-1r"
590 run_dump_test
"attr-merge-vfp-2"
591 run_dump_test
"attr-merge-vfp-2r"
592 run_dump_test
"attr-merge-vfp-3"
593 run_dump_test
"attr-merge-vfp-3r"
594 run_dump_test
"attr-merge-vfp-4"
595 run_dump_test
"attr-merge-vfp-4r"
596 run_dump_test
"attr-merge-vfp-5"
597 run_dump_test
"attr-merge-vfp-5r"
598 run_dump_test
"attr-merge-vfp-6"
599 run_dump_test
"attr-merge-vfp-6r"
600 run_dump_test
"attr-merge-incompatible"
601 run_dump_test
"unresolved-1"
602 run_dump_test
"unresolved-1-dyn"