]>
Commit | Line | Data |
---|---|---|
a06ea964 | 1 | # Expect script for various AARCH64 ELF tests. |
b3adc24a | 2 | # Copyright (C) 2009-2020 Free Software Foundation, Inc. |
a06ea964 NC |
3 | # |
4 | # This file is part of the GNU Binutils. | |
5 | # | |
6 | # This program is free software; you can redistribute it and/or modify | |
7 | # it under the terms of the GNU General Public License as published by | |
8 | # the Free Software Foundation; either version 3 of the License, or | |
9 | # (at your option) any later version. | |
10 | # | |
11 | # This program is distributed in the hope that it will be useful, | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with this program; if not, write to the Free Software | |
18 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, | |
19 | # MA 02110-1301, USA. | |
20 | ||
21 | # Exclude non-aarch64-ELF targets. | |
22 | if { ![is_elf_format] || ![istarget "aarch64*-*-*"] } { | |
23 | return | |
24 | } | |
25 | ||
26 | # List contains test-items with 3 items followed by 2 lists: | |
897aea50 MR |
27 | # 0:name 1:ld early options 2:ld late options 3:assembler options |
28 | # 4:filenames of assembler files 5: action and options. 6: name of output file | |
a06ea964 NC |
29 | |
30 | # Actions: | |
31 | # objdump: Apply objdump options on result. Compare with regex (last arg). | |
32 | # nm: Apply nm options on result. Compare with regex (last arg). | |
33 | # readelf: Apply readelf options on result. Compare with regex (last arg). | |
34 | ||
35 | set aarch64elftests { | |
68fcca92 JW |
36 | {"Erratum 835769 dump test" |
37 | "--fix-cortex-a53-835769" "" "" {erratum835769.s} | |
38 | {{objdump -dr erratum835769.d}} | |
39 | "erratum835769"} | |
3c3358ca AM |
40 | } |
41 | set tmp { | |
68fcca92 JW |
42 | {"Erratum 835769 dump test -shared" |
43 | "--fix-cortex-a53-835769 -shared" "" "" {erratum835769.s} | |
44 | {{objdump -dr erratum835769.d}} | |
45 | "erratum835769"} | |
a06ea964 | 46 | } |
3c3358ca | 47 | if [check_shared_lib_support] { append aarch64elftests $tmp } |
a06ea964 | 48 | |
696ddf4b | 49 | proc aarch64_choose_ilp32_emul {} { |
78da3bc1 AM |
50 | if [istarget *linux*] then { |
51 | if [istarget aarch64_be-*] { | |
52 | return "aarch64linux32b" | |
53 | } | |
54 | return "aarch64linux32" | |
55 | } | |
56 | if [istarget aarch64_be-*] { | |
696ddf4b | 57 | return "aarch64elf32b" |
696ddf4b | 58 | } |
78da3bc1 | 59 | return "aarch64elf32" |
696ddf4b JW |
60 | } |
61 | ||
971f1d27 JW |
62 | proc aarch64_choose_lp64_emul {} { |
63 | if [istarget *linux*] then { | |
64 | if [istarget aarch64_be-*] { | |
65 | return "aarch64linuxb" | |
66 | } | |
67 | return "aarch64linux" | |
68 | } | |
69 | if [istarget aarch64_be-*] { | |
70 | return "aarch64elfb" | |
71 | } | |
72 | return "aarch64elf" | |
73 | } | |
74 | ||
75 | proc run_dump_test_lp64 { testname } { | |
76 | run_dump_test $testname \ | |
77 | [list [list as "-mabi=lp64"] \ | |
78 | [list ld [concat "-m " [aarch64_choose_lp64_emul]]]] | |
79 | } | |
80 | ||
808c324b MM |
81 | # Return the hexadecimal representation of the value we need to add to $base in |
82 | # order to return $result plus 1. Both $base and $result are assumed to be | |
83 | # hexadecimal numbers without the leading 0x prefix. | |
84 | # | |
85 | # This procedure is especially useful for checking the addend of a RELATIVE | |
86 | # relocation against a function in a testcase using the `#check:` directive. | |
87 | # Dumping `objdump -DR -j .got -j .text` will give us the address we're trying | |
88 | # to reach and base stored in the relocation fragment before reaching the | |
89 | # addend we're using for this relocation. | |
90 | proc aarch64_required_func_addend { base result } { | |
91 | return [format %x [expr "0x$result + 1 - 0x$base"]]; | |
92 | } | |
93 | ||
9a68ca09 MM |
94 | # Return the hexadecimal addition of the two given values. Values should be |
95 | # provided in hexadecimal without the leading 0x prefix. | |
96 | # | |
97 | # Used in a testsuite to check that the combination of some ADRP/ADD constants | |
98 | # do indeed point at a variable later on in the dump. | |
99 | proc aarch64_page_plus_offset { page offset } { | |
100 | return [format %x [expr "0x$page + 0x$offset"] ]; | |
101 | } | |
102 | ||
604a5d22 MM |
103 | # Return the 8-hexdigit truncation of an address. |
104 | proc aarch64_8digit_addr { addr { plusLSB 0 } } { | |
105 | if { $plusLSB } { | |
106 | return [aarch64_8digit_addr [format %08x [expr "0x$addr + 1"]]]; | |
107 | } | |
108 | return [string range "$addr" end-7 end]; | |
109 | } | |
110 | ||
971f1d27 JW |
111 | set eh-frame-merge-lp64 [list [list "EH Frame merge" \ |
112 | [concat "-m " [aarch64_choose_lp64_emul] \ | |
113 | " -Ttext 0x8000"] \ | |
114 | "" "-mabi=lp64" {eh-frame-bar.s eh-frame-foo.s} \ | |
115 | {{objdump --dwarf=frames eh-frame.d}} \ | |
116 | "eh-frame"]] | |
117 | ||
a06ea964 | 118 | run_ld_link_tests $aarch64elftests |
971f1d27 JW |
119 | run_ld_link_tests eh-frame-merge-lp64 |
120 | ||
4106101c | 121 | run_dump_test "erratum843419" |
9fca35fc | 122 | run_dump_test "erratum843419_tls_ie" |
739b5c9c TC |
123 | run_dump_test "erratum843419-adr" |
124 | run_dump_test "erratum843419-adrp" | |
125 | run_dump_test "erratum843419-far-adr" | |
126 | run_dump_test "erratum843419-far-full" | |
127 | run_dump_test "erratum843419-full" | |
128 | run_dump_test "erratum843419-no-args" | |
0db131fb | 129 | run_dump_test "erratum835769-843419" |
a06ea964 NC |
130 | |
131 | # Relocation Tests | |
971f1d27 | 132 | run_dump_test_lp64 "weak-undefined" |
e30d1fa1 SN |
133 | run_dump_test "emit-relocs-22" |
134 | run_dump_test "emit-relocs-23" | |
7018c030 | 135 | run_dump_test "emit-relocs-28" |
40fbed84 JW |
136 | run_dump_test "emit-relocs-86" |
137 | run_dump_test "emit-relocs-86-overflow" | |
6ffe9a1b JW |
138 | run_dump_test "emit-relocs-87" |
139 | run_dump_test "emit-relocs-88" | |
140 | run_dump_test "emit-relocs-88-overflow" | |
141 | run_dump_test "emit-relocs-89" | |
142 | run_dump_test "emit-relocs-90" | |
143 | run_dump_test "emit-relocs-90-overflow" | |
753999c1 | 144 | run_dump_test "emit-relocs-92" |
e04ef022 RL |
145 | |
146 | run_dump_test "emit-relocs-112" | |
147 | run_dump_test "emit-relocs-112-overflow" | |
148 | run_dump_test "emit-relocs-113" | |
149 | run_dump_test "emit-relocs-114" | |
150 | run_dump_test "emit-relocs-114-overflow" | |
151 | run_dump_test "emit-relocs-115" | |
152 | run_dump_test "emit-relocs-116" | |
153 | run_dump_test "emit-relocs-116-overflow" | |
154 | run_dump_test "emit-relocs-117" | |
155 | run_dump_test "emit-relocs-118" | |
156 | run_dump_test "emit-relocs-118-overflow" | |
157 | run_dump_test "emit-relocs-119" | |
158 | ||
159 | run_dump_test "emit-relocs-257" | |
160 | run_dump_test "emit-relocs-257-be" | |
a06ea964 NC |
161 | # 258 is tested in 257 |
162 | # 259 is tested in 257 | |
79e74192 RL |
163 | run_dump_test_lp64 "emit-relocs-258-dyn-bad" |
164 | run_dump_test_lp64 "emit-relocs-259-dyn-bad" | |
971f1d27 JW |
165 | run_dump_test_lp64 "emit-relocs-260" |
166 | run_dump_test_lp64 "emit-relocs-260-be" | |
a06ea964 | 167 | # 261 is tested by 260 |
971f1d27 JW |
168 | run_dump_test_lp64 "emit-relocs-262" |
169 | run_dump_test_lp64 "emit-relocs-263" | |
170 | run_dump_test_lp64 "emit-relocs-264" | |
171 | run_dump_test_lp64 "emit-relocs-264-bad" | |
172 | run_dump_test_lp64 "emit-relocs-265" | |
173 | run_dump_test_lp64 "emit-relocs-266" | |
174 | run_dump_test_lp64 "emit-relocs-266-bad" | |
175 | run_dump_test_lp64 "emit-relocs-267" | |
176 | run_dump_test_lp64 "emit-relocs-268" | |
177 | run_dump_test_lp64 "emit-relocs-268-bad" | |
178 | run_dump_test_lp64 "emit-relocs-269" | |
179 | run_dump_test_lp64 "emit-relocs-269-bad" | |
180 | run_dump_test_lp64 "emit-relocs-270" | |
181 | run_dump_test_lp64 "emit-relocs-270-bad" | |
182 | run_dump_test_lp64 "emit-relocs-270-overflow" | |
183 | run_dump_test_lp64 "emit-relocs-271" | |
184 | run_dump_test_lp64 "emit-relocs-271-overflow" | |
185 | run_dump_test_lp64 "emit-relocs-272" | |
186 | run_dump_test_lp64 "emit-relocs-272-overflow" | |
187 | run_dump_test_lp64 "emit-relocs-273" | |
188 | run_dump_test_lp64 "emit-relocs-274" | |
189 | run_dump_test_lp64 "emit-relocs-275" | |
190 | run_dump_test_lp64 "emit-relocs-276" | |
191 | run_dump_test_lp64 "emit-relocs-277" | |
192 | run_dump_test_lp64 "emit-relocs-278" | |
193 | run_dump_test_lp64 "emit-relocs-279" | |
194 | run_dump_test_lp64 "emit-relocs-279-bad" | |
195 | run_dump_test_lp64 "emit-relocs-280" | |
a06ea964 | 196 | # 281 is unused |
971f1d27 JW |
197 | run_dump_test_lp64 "emit-relocs-282" |
198 | run_dump_test_lp64 "emit-relocs-283" | |
199 | run_dump_test_lp64 "emit-relocs-284" | |
200 | run_dump_test_lp64 "emit-relocs-285" | |
201 | run_dump_test_lp64 "emit-relocs-286" | |
202 | run_dump_test_lp64 "emit-relocs-286-bad" | |
1daf502a RL |
203 | run_dump_test_lp64 "emit-relocs-287" |
204 | run_dump_test_lp64 "emit-relocs-287-overflow" | |
205 | run_dump_test_lp64 "emit-relocs-288" | |
206 | run_dump_test_lp64 "emit-relocs-289" | |
207 | run_dump_test_lp64 "emit-relocs-289-overflow" | |
208 | run_dump_test_lp64 "emit-relocs-290" | |
209 | run_dump_test_lp64 "emit-relocs-291" | |
210 | run_dump_test_lp64 "emit-relocs-291-overflow" | |
211 | run_dump_test_lp64 "emit-relocs-292" | |
212 | run_dump_test_lp64 "emit-relocs-293" | |
213 | # 294-298 are not done yet | |
971f1d27 | 214 | run_dump_test_lp64 "emit-relocs-299" |
dc8008f5 | 215 | # 300 is not done yet |
971f1d27 JW |
216 | run_dump_test_lp64 "emit-relocs-301" |
217 | run_dump_test_lp64 "emit-relocs-301-be" | |
218 | run_dump_test_lp64 "emit-relocs-302" | |
219 | run_dump_test_lp64 "emit-relocs-302-be" | |
74a1bfe1 | 220 | # 303-308 are not done yet |
971f1d27 JW |
221 | run_dump_test_lp64 "emit-relocs-309-up" |
222 | run_dump_test_lp64 "emit-relocs-309-low" | |
223 | run_dump_test_lp64 "emit-relocs-309-up-bad" | |
224 | run_dump_test_lp64 "emit-relocs-309-low-bad" | |
225 | run_dump_test_lp64 "emit-relocs-310" | |
226 | run_dump_test_lp64 "emit-relocs-310-be" | |
227 | run_dump_test_lp64 "emit-relocs-311" | |
228 | run_dump_test_lp64 "emit-relocs-312" | |
229 | run_dump_test_lp64 "emit-relocs-313" | |
230 | run_dump_test_lp64 "emit-relocs-515" | |
231 | run_dump_test_lp64 "emit-relocs-515-be" | |
232 | run_dump_test_lp64 "emit-relocs-516" | |
233 | run_dump_test_lp64 "emit-relocs-516-be" | |
234 | run_dump_test_lp64 "emit-relocs-523" | |
235 | run_dump_test_lp64 "emit-relocs-524" | |
236 | run_dump_test_lp64 "emit-relocs-525" | |
237 | run_dump_test_lp64 "emit-relocs-526" | |
238 | run_dump_test_lp64 "emit-relocs-526-overflow" | |
239 | run_dump_test_lp64 "emit-relocs-527" | |
240 | run_dump_test_lp64 "emit-relocs-528" | |
241 | run_dump_test_lp64 "emit-relocs-528-overflow" | |
242 | run_dump_test_lp64 "emit-relocs-529" | |
243 | run_dump_test_lp64 "emit-relocs-529-overflow" | |
244 | run_dump_test_lp64 "emit-relocs-530" | |
245 | run_dump_test_lp64 "emit-relocs-531" | |
246 | run_dump_test_lp64 "emit-relocs-531-overflow" | |
247 | run_dump_test_lp64 "emit-relocs-532" | |
248 | run_dump_test_lp64 "emit-relocs-533" | |
249 | run_dump_test_lp64 "emit-relocs-533-overflow" | |
250 | run_dump_test_lp64 "emit-relocs-534" | |
251 | run_dump_test_lp64 "emit-relocs-535" | |
252 | run_dump_test_lp64 "emit-relocs-535-overflow" | |
253 | run_dump_test_lp64 "emit-relocs-536" | |
254 | run_dump_test_lp64 "emit-relocs-537" | |
255 | run_dump_test_lp64 "emit-relocs-537-overflow" | |
256 | run_dump_test_lp64 "emit-relocs-538" | |
e04ef022 RL |
257 | run_dump_test_lp64 "emit-relocs-552" |
258 | run_dump_test_lp64 "emit-relocs-552-overflow" | |
259 | run_dump_test_lp64 "emit-relocs-553" | |
260 | run_dump_test_lp64 "emit-relocs-554" | |
261 | run_dump_test_lp64 "emit-relocs-554-overflow" | |
262 | run_dump_test_lp64 "emit-relocs-555" | |
263 | run_dump_test_lp64 "emit-relocs-556" | |
264 | run_dump_test_lp64 "emit-relocs-556-overflow" | |
265 | run_dump_test_lp64 "emit-relocs-557" | |
266 | run_dump_test_lp64 "emit-relocs-558" | |
267 | run_dump_test_lp64 "emit-relocs-558-overflow" | |
268 | run_dump_test_lp64 "emit-relocs-559" | |
7e057737 | 269 | run_dump_test_lp64 "emit-relocs-560" |
a1bdea65 | 270 | run_dump_test_lp64 "emit-relocs-morello-1" |
a0b64c99 SP |
271 | run_dump_test_lp64 "emit-relocs-morello" |
272 | run_dump_test_lp64 "emit-relocs-morello-a64c" | |
273 | run_dump_test_lp64 "emit-relocs-morello-2" | |
274 | run_dump_test_lp64 "emit-relocs-morello-2-a64c" | |
275 | run_dump_test_lp64 "emit-relocs-morello-3" | |
276 | run_dump_test_lp64 "emit-relocs-morello-3-a64c" | |
dbd880c7 MM |
277 | run_dump_test_lp64 "emit-relocs-morello-4" |
278 | run_dump_test_lp64 "emit-relocs-morello-5" | |
c50aec72 MM |
279 | run_dump_test_lp64 "emit-relocs-morello-6" |
280 | run_dump_test_lp64 "emit-relocs-morello-6b" | |
5fa80905 | 281 | run_dump_test_lp64 "emit-relocs-morello-7" |
e10c835d | 282 | run_dump_test_lp64 "emit-relocs-morello-8" |
7470bce3 | 283 | run_dump_test_lp64 "emit-relocs-morello-9" |
d465be7b | 284 | run_dump_test_lp64 "emit-relocs-morello-10" |
808c324b | 285 | run_dump_test_lp64 "emit-relocs-morello-hidden" |
d6cf562a MM |
286 | run_dump_test_lp64 "emit-morello-reloc-markers-1" |
287 | run_dump_test_lp64 "emit-morello-reloc-markers-2" | |
288 | run_dump_test_lp64 "emit-morello-reloc-markers-3" | |
5fa80905 AC |
289 | run_dump_test_lp64 "morello-sizeless-local-syms" |
290 | run_dump_test_lp64 "morello-sizeless-global-syms" | |
291 | run_dump_test_lp64 "morello-sizeless-got-syms" | |
f8180c20 | 292 | run_dump_test_lp64 "morello-disallow-merged-binaries" |
dd0ed54c | 293 | run_dump_test_lp64 "c64-ehdr-sized-reloc" |
a06ea964 | 294 | |
d9f4f6fc MM |
295 | # Test for morello dynamic relocs can not be written in the usual manner since |
296 | # we need to specify different `ld` command lines for different objects. | |
297 | if { [ld_assemble_flags $as -march=morello+c64 $srcdir/$subdir/morello-dynamic-relocs-lib.s tmpdir/morello-dynamic-relocs-lib.o] | |
298 | && [ld_link $ld tmpdir/morello-dynamic-relocs.so "--shared tmpdir/morello-dynamic-relocs-lib.o"] } { | |
8f5baae3 | 299 | run_dump_test_lp64 "morello-dynamic-relocs" |
d9f4f6fc MM |
300 | run_dump_test_lp64 "morello-dynamic-link-rela-dyn" |
301 | run_dump_test_lp64 "morello-dynamic-link-rela-dyn2" | |
302 | run_dump_test_lp64 "morello-dynamic-local-got" | |
9a68ca09 MM |
303 | run_dump_test_lp64 "morello-funcptr-in-code" |
304 | run_dump_test_lp64 "morello-funcptr-through-data" | |
305 | run_dump_test_lp64 "morello-funcptr-through-data-pie" | |
306 | run_dump_test_lp64 "morello-funcptr-code-and-data" | |
307 | run_dump_test_lp64 "morello-dataptr-in-code" | |
308 | run_dump_test_lp64 "morello-dataptr-through-data" | |
309 | run_dump_test_lp64 "morello-dataptr-through-data-pie" | |
310 | run_dump_test_lp64 "morello-dataptr-code-and-data" | |
d9f4f6fc MM |
311 | } |
312 | ||
c0a10a86 MM |
313 | if { [ld_assemble_flags $as -march=morello+c64 $srcdir/$subdir/morello-weakdefinitions.s tmpdir/morello-weakdefinitions.o] |
314 | && [ld_link $ld tmpdir/morello-weakdefinitions.so "--shared tmpdir/morello-weakdefinitions.o"] } { | |
315 | run_dump_test_lp64 "morello-undefweak-relocs-PDE" | |
316 | } | |
317 | run_dump_test_lp64 "morello-undefweak-relocs-no-dyn-linker" | |
318 | run_dump_test_lp64 "morello-undefweak-relocs-PIE" | |
319 | run_dump_test_lp64 "morello-undefweak-relocs-static" | |
320 | run_dump_test_lp64 "morello-undefweak-relocs-static-relocs" | |
321 | ||
d9f4f6fc MM |
322 | run_dump_test_lp64 "morello-static-got" |
323 | run_dump_test_lp64 "morello-dynamic-got" | |
b2cb8a19 | 324 | run_dump_test_lp64 "morello-dt-init-fini" |
40bbb79e | 325 | run_dump_test_lp64 "morello-capinit" |
50e192f0 SP |
326 | run_dump_test_lp64 "morello-stubs" |
327 | run_dump_test_lp64 "morello-stubs-static" | |
7ff36d1a | 328 | run_dump_test_lp64 "morello-sec-round" |
bc64cc90 MM |
329 | run_dump_test_lp64 "morello-sec-round-adjust" |
330 | run_dump_test_lp64 "morello-sec-always-align" | |
331 | run_dump_test_lp64 "morello-sec-round-pcc-needed" | |
332 | run_dump_test_lp64 "morello-sec-round-data-only" | |
333 | run_dump_test_lp64 "morello-sec-round-include-relro" | |
334 | run_dump_test_lp64 "morello-pcc-bounds-include-readonly" | |
ea41358b | 335 | run_dump_test_lp64 "morello-sec-round-choose-linker-syms" |
e4f0a01c | 336 | run_dump_test_lp64 "morello-entry-point" |
47b91198 | 337 | run_dump_test_lp64 "morello-sec-start_stop-round" |
4ca9b406 SP |
338 | run_dump_test_lp64 "morello-tlsdesc" |
339 | run_dump_test_lp64 "morello-tlsdesc-static" | |
340 | run_dump_test_lp64 "morello-tlsdesc-staticpie" | |
40bbb79e | 341 | |
d9f4f6fc MM |
342 | run_dump_test "no-morello-syms-static" |
343 | ||
027e9c75 NC |
344 | run_dump_test "reloc-overflow-bad" |
345 | ||
2e0488d3 | 346 | # test addend correctness when --emit-relocs specified for non-relocatable obj. |
971f1d27 | 347 | run_dump_test_lp64 "emit-relocs-local-addend" |
2e0488d3 | 348 | # test addend correctness when -r specified. |
971f1d27 | 349 | run_dump_test_lp64 "local-addend-r" |
a06ea964 | 350 | |
dcbd20eb | 351 | # test error handling on pcrel relocation for shared libraries. |
971f1d27 | 352 | run_dump_test_lp64 "pcrel_pic_undefined" |
d68f1976 | 353 | run_dump_test_lp64 "pcrel_pic_defined" |
dcbd20eb | 354 | |
a06ea964 NC |
355 | run_dump_test "limit-b" |
356 | run_dump_test "limit-bl" | |
a06ea964 | 357 | run_dump_test "farcall-back" |
f678ded7 JW |
358 | run_dump_test "farcall-b-defsym" |
359 | run_dump_test "farcall-bl-defsym" | |
07f9ddfe JW |
360 | run_dump_test "farcall-b-gsym" |
361 | run_dump_test "farcall-b-plt" | |
362 | run_dump_test "farcall-bl-plt" | |
a06ea964 NC |
363 | run_dump_test "farcall-bl" |
364 | run_dump_test "farcall-b" | |
365 | run_dump_test "farcall-b-none-function" | |
366 | run_dump_test "farcall-bl-none-function" | |
2f340668 JW |
367 | run_dump_test "farcall-b-section" |
368 | run_dump_test "farcall-bl-section" | |
cff69cf4 | 369 | run_dump_test "farcall-group" |
a06ea964 NC |
370 | |
371 | run_dump_test "tls-relax-all" | |
2d0ca824 | 372 | run_dump_test "tls-relax-all-ilp32" |
a06ea964 | 373 | run_dump_test "tls-relax-gd-le" |
2d0ca824 | 374 | run_dump_test "tls-relax-gd-le-ilp32" |
a06ea964 | 375 | run_dump_test "tls-relax-gdesc-le" |
ce12121b | 376 | run_dump_test "tls-relax-gdesc-le-now" |
2d0ca824 | 377 | run_dump_test "tls-relax-gdesc-le-ilp32" |
971f1d27 JW |
378 | run_dump_test_lp64 "tls-relax-large-gd-le" |
379 | run_dump_test_lp64 "tls-relax-large-gd-le-be" | |
a06ea964 | 380 | run_dump_test "tls-relax-ie-le" |
2d0ca824 | 381 | run_dump_test "tls-relax-ie-le-ilp32" |
259364ad | 382 | run_dump_test "tls-relax-ld-le-small" |
c1fc2d7e | 383 | run_dump_test "tls-relax-ld-le-small-ilp32" |
259364ad | 384 | run_dump_test "tls-relax-ld-le-tiny" |
c1fc2d7e | 385 | run_dump_test "tls-relax-ld-le-tiny-ilp32" |
a06ea964 | 386 | run_dump_test "tls-desc-ie" |
2d0ca824 | 387 | run_dump_test "tls-desc-ie-ilp32" |
a06ea964 | 388 | run_dump_test "tls-relax-gdesc-le-2" |
2d0ca824 | 389 | run_dump_test "tls-relax-gdesc-le-2-ilp32" |
a06ea964 | 390 | run_dump_test "tls-relax-ie-le-2" |
2d0ca824 | 391 | run_dump_test "tls-relax-ie-le-2-ilp32" |
a06ea964 | 392 | run_dump_test "tls-relax-ie-le-3" |
2d0ca824 | 393 | run_dump_test "tls-relax-ie-le-3-ilp32" |
b480a481 | 394 | run_dump_test "tls-tiny-gd" |
b480a481 | 395 | run_dump_test "tls-tiny-gd-le" |
2d0ca824 | 396 | run_dump_test "tls-tiny-gd-le-ilp32" |
60d1b0d6 | 397 | run_dump_test "tls-tiny-desc" |
60d1b0d6 | 398 | run_dump_test "tls-tiny-desc-le" |
2d0ca824 | 399 | run_dump_test "tls-tiny-desc-le-ilp32" |
b1089987 | 400 | run_dump_test "tls-tiny-ie" |
971f1d27 JW |
401 | run_dump_test_lp64 "tls-large-ie" |
402 | run_dump_test_lp64 "tls-large-ie-be" | |
403 | run_dump_test_lp64 "tls-large-desc" | |
404 | run_dump_test_lp64 "tls-large-desc-be" | |
77a69ff8 | 405 | run_dump_test "tls-tiny-ld" |
f69e4920 | 406 | run_dump_test "tls-small-ld" |
971f1d27 | 407 | run_dump_test_lp64 "tlsle" |
bb3f9ed8 | 408 | run_dump_test "tlsle-symbol-offset" |
cb8af559 NC |
409 | run_dump_test "gc-got-relocs" |
410 | run_dump_test "gc-tls-relocs" | |
971f1d27 JW |
411 | run_dump_test_lp64 "gc-plt-relocs" |
412 | run_dump_test_lp64 "gc-relocs-257-dyn" | |
413 | run_dump_test_lp64 "gc-relocs-257" | |
18f822a0 | 414 | run_dump_test "implicit_got_section_1" |
bab91cce | 415 | run_dump_test "pr17415" |
971f1d27 | 416 | run_dump_test_lp64 "tprel_g2_overflow" |
36e6c140 | 417 | run_dump_test "tprel_add_lo12_overflow" |
32f573bc | 418 | run_dump_test "protected-data" |
279b2f94 | 419 | run_dump_test_lp64 "pr22764" |
0c1ded8d | 420 | run_dump_test_lp64 "pr20402" |
1419bbe5 | 421 | |
8a4f8507 MM |
422 | if {[check_shared_lib_support] |
423 | && [ld_assemble $as $srcdir/$subdir/tls-sharedlib.s tmpdir/tls-sharedlib.o] | |
424 | && [ld_link $ld tmpdir/tls-sharedlib.so "-shared tmpdir/tls-sharedlib.o"] } { | |
425 | run_dump_test "tls-relax-gd-ie" | |
426 | run_dump_test_lp64 "tls-relax-large-gd-ie" | |
427 | run_dump_test_lp64 "tls-relax-large-gd-ie-be" | |
428 | run_dump_test_lp64 "tls-relax-large-desc-ie" | |
429 | run_dump_test_lp64 "tls-relax-large-desc-ie-be" | |
430 | run_dump_test_lp64 "tls-relax-large-desc-le" | |
431 | run_dump_test_lp64 "tls-relax-large-desc-le-be" | |
432 | run_dump_test "tls-relax-gdesc-ie" | |
433 | run_dump_test "tls-relax-gdesc-ie-2" | |
434 | run_dump_test "tls-tiny-gd-ie" | |
435 | run_dump_test "tls-tiny-desc-ie" | |
436 | } | |
437 | if {[check_shared_lib_support] | |
438 | && [ld_assemble_flags $as -mabi=ilp32 $srcdir/$subdir/tls-sharedlib.s tmpdir/tls-sharedlib.o] | |
439 | && [ld_link $ld tmpdir/tls-sharedlib-ilp32.so "-shared tmpdir/tls-sharedlib.o -m [aarch64_choose_ilp32_emul]"] } { | |
440 | run_dump_test "tls-relax-gd-ie-ilp32" | |
441 | run_dump_test "tls-tiny-gd-ie-ilp32" | |
442 | run_dump_test "tls-tiny-desc-ie-ilp32" | |
443 | } | |
444 | run_dump_test "tls-relax-gd-ie-2" | |
445 | run_dump_test "tls-relax-ie-le-4" | |
446 | ||
1419bbe5 WN |
447 | # ifunc tests |
448 | run_dump_test "ifunc-1" | |
449 | run_dump_test "ifunc-1-local" | |
450 | run_dump_test "ifunc-2" | |
451 | run_dump_test "ifunc-2-local" | |
452 | run_dump_test "ifunc-3a" | |
453 | run_dump_test "ifunc-3b" | |
454 | run_dump_test "ifunc-4" | |
455 | run_dump_test "ifunc-4a" | |
456 | run_dump_test "ifunc-5a" | |
457 | run_dump_test "ifunc-5b" | |
458 | run_dump_test "ifunc-5a-local" | |
459 | run_dump_test "ifunc-5b-local" | |
460 | run_dump_test "ifunc-5r-local" | |
461 | run_dump_test "ifunc-6a" | |
462 | run_dump_test "ifunc-6b" | |
463 | run_dump_test "ifunc-7a" | |
464 | run_dump_test "ifunc-7b" | |
465 | run_dump_test "ifunc-7c" | |
466 | run_dump_test "ifunc-8" | |
971f1d27 JW |
467 | run_dump_test_lp64 "ifunc-9" |
468 | run_dump_test_lp64 "ifunc-10" | |
469 | run_dump_test_lp64 "ifunc-11" | |
470 | run_dump_test_lp64 "ifunc-12" | |
471 | run_dump_test_lp64 "ifunc-13" | |
1419bbe5 WN |
472 | run_dump_test "ifunc-14a" |
473 | run_dump_test "ifunc-14b" | |
474 | run_dump_test "ifunc-14c" | |
475 | run_dump_test "ifunc-14d" | |
476 | run_dump_test "ifunc-14e" | |
477 | run_dump_test "ifunc-14f" | |
478 | run_dump_test "ifunc-15" | |
479 | run_dump_test "ifunc-16" | |
480 | run_dump_test "ifunc-17a" | |
481 | run_dump_test "ifunc-17b" | |
971f1d27 JW |
482 | run_dump_test_lp64 "ifunc-18a" |
483 | run_dump_test_lp64 "ifunc-18b" | |
484 | run_dump_test_lp64 "ifunc-19a" | |
485 | run_dump_test_lp64 "ifunc-19b" | |
486 | run_dump_test_lp64 "ifunc-20" | |
487 | run_dump_test_lp64 "ifunc-21" | |
488 | run_dump_test_lp64 "ifunc-22" | |
c955de36 | 489 | |
e19e9199 SP |
490 | run_dump_test_lp64 "c64-ifunc-2" |
491 | run_dump_test_lp64 "c64-ifunc-2-local" | |
492 | run_dump_test_lp64 "c64-ifunc-3a" | |
493 | run_dump_test_lp64 "c64-ifunc-3b" | |
494 | run_dump_test_lp64 "c64-ifunc-4" | |
495 | run_dump_test_lp64 "c64-ifunc-4a" | |
496 | ||
c955de36 | 497 | run_dump_test "relasz" |
971f1d27 | 498 | run_dump_test_lp64 "relocs-1027-symbolic-func" |
614b09ce | 499 | |
971f1d27 | 500 | run_dump_test_lp64 "dt_textrel" |
c2170589 | 501 | |
73524045 RL |
502 | run_dump_test "plt_mapping_symbol" |
503 | ||
971f1d27 JW |
504 | run_dump_test_lp64 "rela-abs-relative" |
505 | run_dump_test_lp64 "rela-abs-relative-be" | |
506 | run_dump_test_lp64 "rela-abs-relative-opt" | |
1f56df9d | 507 | |
971f1d27 | 508 | run_dump_test_lp64 "pie-bind-locally" |
ac33b731 | 509 | |
cd702818 SD |
510 | run_dump_test "property-bti-pac1" |
511 | run_dump_test "property-bti-pac2" | |
512 | run_dump_test "property-bti-pac3" | |
237df8fe SD |
513 | run_dump_test "property-bti-pac4-a" |
514 | run_dump_test "property-bti-pac4-b" | |
37c18eed SD |
515 | run_dump_test "bti-plt-1" |
516 | run_dump_test "bti-plt-2" | |
cd702818 | 517 | |
823710d5 SN |
518 | run_dump_test_lp64 "variant_pcs-r" |
519 | run_dump_test_lp64 "variant_pcs-shared" | |
520 | run_dump_test_lp64 "variant_pcs-now" | |
521 | ||
614b09ce JW |
522 | set aarch64elflinktests { |
523 | {"ld-aarch64/so with global symbol" "-shared" "" "" {copy-reloc-so.s} | |
027e9c75 | 524 | {} "copy-reloc-so.so"} |
614b09ce | 525 | {"ld-aarch64/exe with copy relocation" "-e0 tmpdir/copy-reloc-so.so" "" "" |
027e9c75 | 526 | {copy-reloc-exe.s} {{objdump -R copy-reloc.d}} "copy-reloc"} |
6353d82b JW |
527 | {"ld-aarch64/exe with copy relocation 2" "-e0 tmpdir/copy-reloc-so.so" "" "" |
528 | {copy-reloc-exe-2.s} {{objdump -R copy-reloc-2.d}} "copy-reloc-2"} | |
529 | {"ld-aarch64/exe with copy relocation elimination" "-e0 tmpdir/copy-reloc-so.so" "" "" | |
530 | {copy-reloc-exe-eliminate.s} {{objdump -R copy-reloc-eliminate.d}} "copy-reloc-elimination"} | |
7f784814 JW |
531 | {"ld-aarch64/so with global func" "-shared" "" "" {func-in-so.s} |
532 | {} "func-in-so.so"} | |
533 | {"ld-aarch64/func sym hash opt for exe" | |
534 | "-e0 --hash-style=gnu tmpdir/func-in-so.so" "" "" | |
535 | {func-sym-hash-opt.s} {{readelf --dyn-sym func-sym-hash-opt.d}} "hash-opt"} | |
37c18eed SD |
536 | {"Build bti-plt-so for PLT tests" "-shared" "" "" {bti-plt-so.s} |
537 | {} "libbti-plt-so.so"} | |
614b09ce JW |
538 | } |
539 | ||
3c3358ca AM |
540 | if [check_shared_lib_support] { |
541 | run_ld_link_tests $aarch64elflinktests | |
542 | } | |
37c18eed SD |
543 | |
544 | run_dump_test "bti-plt-3" | |
545 | run_dump_test "bti-plt-4" | |
546 | run_dump_test "bti-plt-5" | |
547 | run_dump_test "bti-plt-6" | |
548 | run_dump_test "bti-plt-7" | |
1dbade74 SD |
549 | |
550 | run_dump_test "pac-plt-1" | |
551 | run_dump_test "pac-plt-2" | |
552 | run_dump_test "bti-pac-plt-1" | |
553 | run_dump_test "bti-pac-plt-2" | |
4e539114 SD |
554 | |
555 | run_dump_test "bti-warn" | |
652afeef | 556 | run_dump_test "weak-tls" |
f3ecc5c8 | 557 | run_dump_test "morello-weak-tls" |
652afeef | 558 | run_dump_test "undef-tls" |