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