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 {"Simple dynamic application" "tmpdir/arm-lib.so" "" {arm-app.s}
84 {{objdump
-fdw arm
-app.d
} {objdump
-Rw arm
-app.r
}}
86 {"Simple static application" "" "" {arm-static-app.s}
87 {{objdump
-fdw arm
-static
-app.d
} {objdump
-rw arm
-static
-app.r
}}
89 {"Non-pcrel function reference" "tmpdir/arm-lib.so" "" {arm-app-abs32.s}
90 {{objdump
-fdw arm
-app
-abs32.d
} {objdump
-Rw arm
-app
-abs32.r
}}
92 {"Thumb shared library with ARM entry points" "-shared -T arm-lib.ld" "-mthumb-interwork"
94 {{objdump
-fdw armthumb
-lib.d
} {readelf
-Ds armthumb
-lib.sym
}}
96 {"Mixed ARM/Thumb shared library" "-shared -T arm-lib.ld -use-blx" ""
98 {{objdump
-fdw mixed
-lib.d
} {objdump
-Rw mixed
-lib.r
}
99 {readelf
-Ds mixed
-lib.sym
}}
101 {"Mixed ARM/Thumb dynamic application" "tmpdir/mixed-lib.so -T arm-dyn.ld" ""
103 {{objdump
-fdw mixed
-app.d
} {objdump
-Rw mixed
-app.r
}
104 {readelf
-Ds mixed
-app.sym
}}
106 {"Mixed ARM/Thumb arch5 dynamic application" "tmpdir/mixed-lib.so -T arm-dyn.ld --use-blx" ""
108 {{objdump
-fdw mixed
-app
-v5.d
} {objdump
-Rw mixed
-app.r
}
109 {readelf
-Ds mixed
-app.sym
}}
111 {"target1-abs" "-static --target1-abs -T arm.ld" "" {arm-target1.s}
112 {{objdump
-s arm
-target1
-abs.d
}}
114 {"target1-rel" "-static --target1-rel -T arm.ld" "" {arm-target1.s}
115 {{objdump
-s arm
-target1
-rel.d
}}
117 {"target2-rel" "-static --target2=rel -T arm.ld" "" {arm-target2.s}
118 {{objdump
-s arm
-target2
-rel.d
}}
120 {"target2-abs" "-static --target2=abs -T arm.ld" "" {arm-target2.s}
121 {{objdump
-s arm
-target2
-abs.d
}}
123 {"target2-got-rel" "-static --target2=got-rel -T arm.ld" "" {arm-target2.s}
124 {{objdump
-s arm
-target2
-got
-rel.d
}}
125 "arm-target2-got-rel"}
126 {"arm-rel31" "-static -T arm.ld" "" {arm-rel31.s}
127 {{objdump
-s arm
-rel31.d
}}
129 {"arm-call" "-static -T arm.ld" "-meabi=4" {arm-call1.s arm-call2.s}
130 {{objdump
-d arm
-call.d
}}
132 {"TLS shared library" "-shared -T arm-lib.ld" "" {tls-lib.s}
133 {{objdump
-fdw tls
-lib.d
} {objdump
-Rw tls
-lib.r
}}
135 {"TLS dynamic application" "-T arm-dyn.ld tmpdir/tls-lib.so" "" {tls-app.s}
136 {{objdump
-fdw tls
-app.d
} {objdump
-Rw tls
-app.r
}}
138 {"Thumb entry point" "-T arm.ld" "" {thumb-entry.s}
139 {{readelf
-h thumb
-entry.d
}}
141 {"thumb-rel32" "-static -T arm.ld" "" {thumb-rel32.s}
142 {{objdump
-s thumb
-rel32.d
}}
144 {"MOVW/MOVT" "-static -T arm.ld" "" {arm-movwt.s}
145 {{objdump
-dw arm
-movwt.d
}}
147 {"BE8 Mapping Symbols" "-static -T arm.ld -EB --be8" "-EB" {arm-be8.s}
148 {{objdump
-d arm
-be8.d
}}
150 {"Using Thumb lib by another lib" "-shared tmpdir/mixed-lib.so" "" {use-thumb-lib.s}
151 {{readelf
-Ds use
-thumb
-lib.sym
}}
153 {"VFP11 denorm erratum fix, scalar operation"
154 "-EL --vfp11-denorm-fix=scalar -Ttext=0x8000" "-EL -mfpu=vfpxd" {vfp11-fix-scalar.s}
155 {{objdump
-dr vfp11
-fix
-scalar.d
}}
157 {"VFP11 denorm erratum fix, vector operation"
158 "-EB --vfp11-denorm-fix=vector -Ttext=0x8000" "-EB -mfpu=vfpxd" {vfp11-fix-vector.s}
159 {{objdump
-dr vfp11
-fix
-vector.d
}}
161 {"VFP11 denorm erratum fix, embedded code-like data"
162 "-EL --vfp11-denorm-fix=scalar -Ttext=0x8000" "-EL -mfpu=vfpxd" {vfp11-fix-none.s}
163 {{objdump
-dr vfp11
-fix
-none.d
}}
165 {"Cortex-A8 erratum fix, b.w"
166 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-b.s}
167 {{objdump
-dr cortex
-a8
-fix
-b.d
}}
169 {"Cortex-A8 erratum fix, bl.w"
170 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-bl.s}
171 {{objdump
-dr cortex
-a8
-fix
-bl.d
}}
173 {"Cortex-A8 erratum fix, bcc.w"
174 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-bcc.s}
175 {{objdump
-dr cortex
-a8
-fix
-bcc.d
}}
177 {"Cortex-A8 erratum fix, blx.w"
178 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-blx.s}
179 {{objdump
-dr cortex
-a8
-fix
-blx.d
}}
181 {"Cortex-A8 erratum fix, relocate b.w to ARM"
182 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-b-rel.s}
183 {{objdump
-dr cortex
-a8
-fix
-b
-rel
-arm.d
}}
184 "cortex-a8-fix-b-rel-arm"}
185 {"Cortex-A8 erratum fix, relocate b.w to Thumb"
186 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-b-rel.s}
187 {{objdump
-dr cortex
-a8
-fix
-b
-rel
-thumb.d
}}
188 "cortex-a8-fix-b-rel-thumb"}
189 {"Cortex-A8 erratum fix, relocate bl.w to ARM"
190 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-bl-rel.s}
191 {{objdump
-dr cortex
-a8
-fix
-bl
-rel
-arm.d
}}
192 "cortex-a8-fix-bl-rel-arm"}
193 {"Cortex-A8 erratum fix, relocate bl.w to Thumb"
194 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bl-rel.s}
195 {{objdump
-dr cortex
-a8
-fix
-bl
-rel
-thumb.d
}}
196 "cortex-a8-fix-bl-rel-thumb"}
197 {"Cortex-A8 erratum fix, relocate b<cond>.w to Thumb"
198 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bcc-rel.s}
199 {{objdump
-dr cortex
-a8
-fix
-bcc
-rel
-thumb.d
}}
200 "cortex-a8-fix-bcc-rel-thumb"}
201 {"Cortex-A8 erratum fix, relocate blx.w to ARM"
202 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-blx-rel.s}
203 {{objdump
-dr cortex
-a8
-fix
-blx
-rel
-arm.d
}}
204 "cortex-a8-fix-blx-rel-arm"}
205 {"Cortex-A8 erratum fix, relocate blx.w to Thumb"
206 "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-blx-rel.s}
207 {{objdump
-dr cortex
-a8
-fix
-blx
-rel
-thumb.d
}}
208 "cortex-a8-fix-blx-rel-thumb"}
209 {"Cortex-A8 erratum fix, relocate bl.w and far call"
210 "-EL -Ttext=0x00 --fix-cortex-a8 --defsym far_fn1=0x80000000 --defsym far_fn2=0x80000004 --defsym far_fn=0x7fff0000 --defsym _start=0"
211 "-EL -mcpu=cortex-a8" {cortex-a8-far-1.s cortex-a8-far-2.s}
212 {{objdump
-dr cortex
-a8
-far.d
}}
214 {"Cortex-A8 erratum fix, headers"
215 "-EL --fix-cortex-a8 -T cortex-a8-fix-hdr.t"
216 "-EL -mcpu=cortex-a8" {cortex-a8-fix-hdr.s}
217 {{objdump
-dr cortex
-a8
-fix
-hdr.d
}}
219 {"Unwinding and -gc-sections" "-gc-sections" "" {gc-unwind.s}
220 {{objdump
-sj.data gc
-unwind.d
}}
222 {"arm-pic-veneer" "-static -T arm.ld --pic-veneer" "" {arm-pic-veneer.s}
223 {{objdump
-d arm
-pic
-veneer.d
}}
225 {"Preempt Thumb symbol" "tmpdir/mixed-lib.so -T arm-dyn.ld --use-blx" ""
227 {{readelf
-Ds preempt
-app.sym
}}
229 {"jump19" "-static -T arm.ld" "" {jump19.s}
230 {{objdump
-dr jump19.d
}}
232 {"script-type" "-static -T script-type.ld" "" {script-type.s}
233 {{readelf
-s script
-type.sym
}}
235 {"callweak" "-static -T arm.ld" "" {callweak.s}
236 {{objdump
-dr callweak.d
}}
238 {"callweak-2" "-static -T arm.ld" "" {callweak-2.s}
239 {{objdump
-dr callweak
-2.d
}}
241 {"Relocation boundaries" "-defsym x=0 -defsym y=0 -defsym _start=0" "" {reloc-boundaries.s}
242 {{objdump
-s reloc
-boundaries.d
}}
244 {"Data only mapping symbols" "-T data-only-map.ld -Map map" "" {data-only-map.s}
245 {{objdump
-dr data
-only
-map.d
}}
249 run_ld_link_tests $armelftests
250 run_dump_test
"group-relocs-alu-bad"
251 run_dump_test
"group-relocs-ldr-bad"
252 run_dump_test
"group-relocs-ldrs-bad"
253 run_dump_test
"group-relocs-ldc-bad"
254 run_dump_test
"thumb2-bl-undefweak"
255 run_dump_test
"thumb2-bl-undefweak1"
256 run_dump_test
"emit-relocs1"
257 run_dump_test
"movw-shared-1"
258 run_dump_test
"movw-shared-2"
259 run_dump_test
"movw-shared-3"
260 run_dump_test
"movw-shared-4"
262 # Exclude non
-ARM
-EABI targets.
264 if { ![istarget
"arm*-*-*eabi"] } {
265 # Special variants of these tests
, as a different farcall stub is
266 # generated
for a non
-ARM
-EABI target
: indeed in such a case
,
267 # there are no attributes to indicate that blx can be used.
269 set arm_noeabi_tests
{
270 {"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-as-thumb1-bad.s}
271 {{objdump
-d thumb2
-bl
-as
-thumb1
-bad
-noeabi.d
}}
272 "thumb2-bl-as-thumb1-bad"}
273 {"Thumb-2 BL bad" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-bad.s}
274 {{objdump
-d thumb2
-bl
-bad
-noeabi.d
}}
277 run_ld_link_tests $arm_noeabi_tests
282 # Farcalls stubs are fully supported
for ARM
-EABI only
284 {"EABI attribute merging" "-r" "" {attr-merge.s attr-merge.s}
285 {{readelf
-A attr
-merge.attr
}}
287 {"EABI attribute merging 2" "-r" "" {attr-merge-2a.s attr-merge-2b.s}
288 {{readelf
-A attr
-merge
-2.attr
}}
290 {"EABI attribute merging 3" "-r" "" {attr-merge-3a.s attr-merge-3b.s}
291 {{readelf
-A attr
-merge
-3.attr
}}
293 {"EABI attribute merging 4" "-r" "" {attr-merge-4a.s attr-merge-4b.s}
294 {{readelf
-A attr
-merge
-4.attr
}}
296 {"EABI attribute merging 5" "-r" "" {attr-merge-5.s attr-merge-5.s}
297 {{readelf
-A attr
-merge
-5.attr
}}
299 {"EABI attribute merging 6" "-r" "" {attr-merge-6a.s attr-merge-6b.s}
300 {{readelf
-A attr
-merge
-6.attr
}}
302 {"EABI attribute merging 6 reversed" "-r" "" {attr-merge-6b.s attr-merge-6a.s}
303 {{readelf
-A attr
-merge
-6.attr
}}
305 {"EABI attribute merging 7" "-r" "" {attr-merge-7a.s attr-merge-7b.s}
306 {{readelf
-A attr
-merge
-7.attr
}}
308 {"EABI attribute arch merging 1" "-r" "" {arch-v6k.s arch-v6t2.s}
309 {{readelf
-A attr
-merge
-arch
-1.attr
}}
311 {"EABI attribute arch merging 1 reversed" "-r" "" {arch-v6t2.s arch-v6k.s}
312 {{readelf
-A attr
-merge
-arch
-1.attr
}}
313 "attr-merge-arch-1r"}
314 {"EABI attribute arch merging 2" "-r" "" {arch-v6k.s arch-v6.s}
315 {{readelf
-A attr
-merge
-arch
-2.attr
}}
317 {"EABI attribute arch merging 2 reversed" "-r" "" {arch-v6.s arch-v6k.s}
318 {{readelf
-A attr
-merge
-arch
-2.attr
}}
319 "attr-merge-arch-2r"}
320 {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x1001000" "" {thumb2-bl.s}
321 {{objdump
-dr thumb2
-bl.d
}}
323 {"Thumb-2 Interworked branch" "-T arm.ld" "" {thumb2-b-interwork.s}
324 {{objdump
-dr thumb2
-b
-interwork.d
}}
325 "thumb2-b-interwork"}
326 {"BL/BLX interworking" "-T arm.ld" "" {thumb2-bl-blx-interwork.s}
327 {{objdump
-dr thumb2
-bl
-blx
-interwork.d
}}
328 "thumb2-bl-blx-interwork"}
329 {"ARMv4 interworking" "-static -T arm.ld --fix-v4bx-interworking" "--fix-v4bx -meabi=4" {armv4-bx.s}
330 {{objdump
-d armv4
-bx.d
}}
332 {"MOVW/MOVT and merged sections" "-T arm.ld" "" {movw-merge.s}
333 {{objdump
-dw movw
-merge.d
}}
335 {"MOVW/MOVT against shared libraries" "tmpdir/arm-lib.so" "" {arm-app-movw.s}
336 {{objdump
-Rw arm
-app.r
}}
338 {"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-as-thumb1-bad.s}
339 {{objdump
-d thumb2
-bl
-as
-thumb1
-bad.d
}}
340 "thumb2-bl-as-thumb1-bad"}
341 {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-bad.s}
342 {{objdump
-d thumb2
-bl
-bad.d
}}
345 {"ARM-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001020" "" {farcall-arm-arm.s}
346 {{objdump
-d farcall
-arm
-arm.d
}}
348 {"ARM-ARM farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001020 --pic-veneer" "" {farcall-arm-arm.s}
349 {{objdump
-d farcall
-arm
-arm
-pic
-veneer.d
}}
350 "farcall-arm-arm-pic-veneer"}
351 {"ARM-ARM farcall (BE8)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB --be8" "-EB" {farcall-arm-arm.s}
352 {{objdump
-d farcall
-arm
-arm.d
}}
353 "farcall-arm-arm-be8"}
354 {"ARM-ARM farcall (BE)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB" "-EB" {farcall-arm-arm.s}
355 {{objdump
-d farcall
-arm
-arm.d
}}
356 "farcall-arm-arm-be"}
358 {"ARM-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "" {farcall-arm-thumb.s}
359 {{objdump
-d farcall
-arm
-thumb.d
}}
361 {"ARM-Thumb farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv5t" {farcall-arm-thumb.s}
362 {{objdump
-d farcall
-arm
-thumb
-blx.d
}}
363 "farcall-arm-thumb-blx"}
364 {"ARM-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" {farcall-arm-thumb.s}
365 {{objdump
-d farcall
-arm
-thumb
-pic
-veneer.d
}}
366 "farcall-arm-thumb-pic-veneer"}
367 {"ARM-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-arm-thumb.s}
368 {{objdump
-d farcall
-arm
-thumb
-blx
-pic
-veneer.d
}}
369 "farcall-arm-thumb-blx-pic-veneer"}
371 {"Thumb-Thumb farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv5t" {farcall-thumb-thumb.s}
372 {{objdump
-d farcall
-thumb
-thumb
-blx.d
}}
373 "farcall-thumb-thumb-blx"}
374 {"Thumb-Thumb farcall M profile" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv7-m" {farcall-thumb-thumb.s}
375 {{objdump
-d farcall
-thumb
-thumb
-m.d
}}
376 "farcall-thumb-thumb-m"}
377 {"Thumb-Thumb farcall v6-M" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv6-m" {farcall-thumb-thumb.s}
378 {{objdump
-d farcall
-thumb
-thumb
-m.d
}}
379 "farcall-thumb-thumb-v6-m"}
380 {"Thumb-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv4t" {farcall-thumb-thumb.s}
381 {{objdump
-d farcall
-thumb
-thumb.d
}}
382 "farcall-thumb-thumb"}
383 {"Thumb-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-thumb-thumb.s}
384 {{objdump
-d farcall
-thumb
-thumb
-blx
-pic
-veneer.d
}}
385 "farcall-thumb-thumb-blx-pic-veneer"}
386 {"Thumb-Thumb farcall M profile (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv7-m" {farcall-thumb-thumb.s}
387 {{objdump
-d farcall
-thumb
-thumb
-m
-pic
-veneer.d
}}
388 "farcall-thumb-thumb-m-pic-veneer"}
389 {"Thumb-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv4t" {farcall-thumb-thumb.s}
390 {{objdump
-d farcall
-thumb
-thumb
-pic
-veneer.d
}}
391 "farcall-thumb-thumb-pic-veneer"}
393 {"Thumb-ARM farcall" "-Ttext 0x1c01010 --section-start .foo=0x2001014" "-W" {farcall-thumb-arm.s}
394 {{objdump
-d farcall
-thumb
-arm.d
}}
396 {"Thumb-ARM farcall (BE8)" "-Ttext 0x1c01010 --section-start .foo=0x2001014 -EB --be8" "-W -EB" {farcall-thumb-arm.s}
397 {{objdump
-d farcall
-thumb
-arm.d
}}
398 "farcall-thumb-arm-be8"}
399 {"Thumb-ARM farcall (BE)" "-Ttext 0x1c01010 --section-start .foo=0x2001014 -EB" "-W -EB" {farcall-thumb-arm.s}
400 {{objdump
-d farcall
-thumb
-arm.d
}}
401 "farcall-thumb-arm-be"}
402 {"Thumb-ARM (short) call" "-Ttext 0x1000 --section-start .foo=0x0002014" "-W" {farcall-thumb-arm-short.s}
403 {{objdump
-d farcall
-thumb
-arm
-short.d
}}
404 "farcall-thumb-arm-short"}
405 {"Thumb-ARM farcall with BLX" "-Ttext 0x1c01010 --section-start .foo=0x2001014" "-W -march=armv5t" {farcall-thumb-arm.s}
406 {{objdump
-d farcall
-thumb
-arm
-blx.d
}}
407 "farcall-thumb-arm-blx"}
408 {"Thumb-ARM farcall with BLX (PIC veneer)" "-Ttext 0x1c01010 --section-start .foo=0x2001014 --pic-veneer" "-W -march=armv5t" {farcall-thumb-arm.s}
409 {{objdump
-d farcall
-thumb
-arm
-blx
-pic
-veneer.d
}}
410 "farcall-thumb-arm-blx-pic-veneer"}
411 {"Thumb-ARM farcall (PIC veneer)" "-Ttext 0x1c01010 --section-start .foo=0x2001014 --pic-veneer" "-W" {farcall-thumb-arm.s}
412 {{objdump
-d farcall
-thumb
-arm
-pic
-veneer.d
}}
413 "farcall-thumb-arm-pic-veneer"}
415 {"Multiple farcalls" "-Ttext 0x1000 --section-start .foo=0x2002020" "" {farcall-mix.s}
416 {{objdump
-d farcall
-mix.d
}}
418 {"Multiple farcalls from several sections" "-Ttext 0x1000 --section-start .mytext=0x2000 --section-start .foo=0x2003020" "" {farcall-mix2.s}
419 {{objdump
-d farcall
-mix2.d
}}
422 {"Default group size" "-Ttext 0x1000 --section-start .foo=0x2003020" "" {farcall-group.s farcall-group2.s}
423 {{objdump
-d farcall
-group.d
}}
424 "farcall-group-default"}
425 {"Group size=2" "-Ttext 0x1000 --section-start .foo=0x2003020 --stub-group-size=2" "" {farcall-group.s farcall-group2.s}
426 {{objdump
-d farcall
-group
-size2.d
}}
427 "farcall-group-size2"}
428 {"Group size limit" "-Ttext 0x1000 --section-start .far=0x2003020" "" {farcall-group3.s farcall-group4.s}
429 {{objdump
-d farcall
-group
-limit.d
}}
430 "farcall-group-limit"}
432 {"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" ""
433 {farcall
-mixed
-app.s
}
434 {{objdump
-fdw farcall
-mixed
-app.d
} {objdump
-Rw farcall
-mixed
-app.r
}
435 {readelf
-Ds farcall
-mixed
-app.sym
}}
437 {"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" ""
438 {farcall
-mixed
-app.s
}
439 {{objdump
-fdw farcall
-mixed
-app
-v5.d
} {objdump
-Rw farcall
-mixed
-app.r
}
440 {readelf
-Ds farcall
-mixed
-app.sym
}}
441 "farcall-mixed-app-v5"}
443 {"Mixed ARM/Thumb shared library with long branches (v4t)" "-shared -T arm-lib.ld" "-march=armv4t"
444 {farcall
-mixed
-lib1.s farcall
-mixed
-lib2.s
}
445 {{objdump
-fdw farcall
-mixed
-lib
-v4t.d
}}
446 "farcall-mixed-lib.so"}
448 {"Mixed ARM/Thumb shared library with long branches (v5t)" "-shared -T arm-lib.ld" "-march=armv5t"
449 {farcall
-mixed
-lib1.s farcall
-mixed
-lib2.s
}
450 {{objdump
-fdw farcall
-mixed
-lib.d
}}
451 "farcall-mixed-lib.so"}
453 {"Long branch with mixed text and data" "-T arm.ld" "" {farcall-data.s}
454 {{objdump
-dr farcall
-data.d
}}
457 {"R_ARM_THM_JUMP24 Relocation veneers: Short 1"
458 "-defsym _start=0x8000 --section-start destsect=0x00009000"
459 "-march=armv7-a -mthumb"
460 {jump
-reloc
-veneers.s
}
461 {{objdump
-d jump
-reloc
-veneers
-short1.d
}}
462 "jump-reloc-veneers-short1"}
463 {"R_ARM_THM_JUMP24 Relocation veneers: Short 2"
464 "-defsym _start=0x8000 --section-start destsect=0x00900000"
465 "-march=armv7-a -mthumb"
466 {jump
-reloc
-veneers.s
}
467 {{objdump
-d jump
-reloc
-veneers
-short2.d
}}
468 "jump-reloc-veneers-short2"}
469 {"R_ARM_THM_JUMP24 Relocation veneers: Long"
470 "-defsym _start=0x8000 --section-start destsect=0x09000000"
471 "-march=armv7-a -mthumb"
472 {jump
-reloc
-veneers.s
}
473 {{objdump
-d jump
-reloc
-veneers
-long.d
}}
474 "jump-reloc-veneers-long"}
477 run_ld_link_tests $armeabitests
478 run_dump_test
"attr-merge-wchar-00"
479 run_dump_test
"attr-merge-wchar-02"
480 run_dump_test
"attr-merge-wchar-04"
481 run_dump_test
"attr-merge-wchar-20"
482 run_dump_test
"attr-merge-wchar-22"
483 run_dump_test
"attr-merge-wchar-24"
484 run_dump_test
"attr-merge-wchar-40"
485 run_dump_test
"attr-merge-wchar-42"
486 run_dump_test
"attr-merge-wchar-44"
487 run_dump_test
"attr-merge-wchar-00-nowarn"
488 run_dump_test
"attr-merge-wchar-02-nowarn"
489 run_dump_test
"attr-merge-wchar-04-nowarn"
490 run_dump_test
"attr-merge-wchar-20-nowarn"
491 run_dump_test
"attr-merge-wchar-22-nowarn"
492 run_dump_test
"attr-merge-wchar-24-nowarn"
493 run_dump_test
"attr-merge-wchar-40-nowarn"
494 run_dump_test
"attr-merge-wchar-42-nowarn"
495 run_dump_test
"attr-merge-wchar-44-nowarn"
496 run_dump_test
"farcall-section"
497 run_dump_test
"attr-merge-unknown-1"
498 run_dump_test
"attr-merge-unknown-2"
499 run_dump_test
"attr-merge-unknown-2r"
500 run_dump_test
"attr-merge-unknown-3"
501 run_dump_test
"unwind-1"
502 run_dump_test
"unwind-2"
503 run_dump_test
"unwind-3"
504 run_dump_test
"unwind-4"
505 run_dump_test
"unwind-5"
506 run_dump_test
"attr-merge-vfp-1"
507 run_dump_test
"attr-merge-vfp-1r"
508 run_dump_test
"attr-merge-vfp-2"
509 run_dump_test
"attr-merge-vfp-2r"
510 run_dump_test
"attr-merge-vfp-3"
511 run_dump_test
"attr-merge-vfp-3r"
512 run_dump_test
"attr-merge-vfp-4"
513 run_dump_test
"attr-merge-vfp-4r"
514 run_dump_test
"attr-merge-vfp-5"
515 run_dump_test
"attr-merge-vfp-5r"
516 run_dump_test
"attr-merge-incompatible"