]>
Commit | Line | Data |
---|---|---|
a06ea964 | 1 | # Expect script for various AARCH64 ELF tests. |
b90efa5b | 2 | # Copyright (C) 2009-2015 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 { | |
897aea50 | 36 | {"EH Frame merge" "-Ttext 0x8000" "" "" {eh-frame-bar.s eh-frame-foo.s} |
a06ea964 | 37 | {{objdump --dwarf=frames eh-frame.d}} "eh-frame"} |
68fcca92 JW |
38 | {"Erratum 835769 dump test" |
39 | "--fix-cortex-a53-835769" "" "" {erratum835769.s} | |
40 | {{objdump -dr erratum835769.d}} | |
41 | "erratum835769"} | |
42 | {"Erratum 835769 dump test -shared" | |
43 | "--fix-cortex-a53-835769 -shared" "" "" {erratum835769.s} | |
44 | {{objdump -dr erratum835769.d}} | |
45 | "erratum835769"} | |
a06ea964 NC |
46 | } |
47 | ||
696ddf4b | 48 | proc aarch64_choose_ilp32_emul {} { |
87ad46af JW |
49 | if [istarget aarch64-*-linux*] then { |
50 | return "aarch64linux32" | |
51 | } elseif [istarget aarch64-*-elf] { | |
52 | return "aarch64elf32" | |
53 | } elseif [istarget aarch64_be-*-linux*] { | |
54 | return "aarch64linux32b" | |
55 | } elseif [istarget aarch64_be-*-elf] { | |
696ddf4b JW |
56 | return "aarch64elf32b" |
57 | } else { | |
87ad46af JW |
58 | perror "Unknown target triple." |
59 | exit 1 | |
696ddf4b JW |
60 | } |
61 | } | |
62 | ||
a06ea964 | 63 | run_ld_link_tests $aarch64elftests |
4106101c | 64 | run_dump_test "erratum843419" |
a06ea964 NC |
65 | |
66 | # Relocation Tests | |
67 | run_dump_test "weak-undefined" | |
7018c030 | 68 | run_dump_test "emit-relocs-28" |
40fbed84 JW |
69 | run_dump_test "emit-relocs-86" |
70 | run_dump_test "emit-relocs-86-overflow" | |
6ffe9a1b JW |
71 | run_dump_test "emit-relocs-87" |
72 | run_dump_test "emit-relocs-88" | |
73 | run_dump_test "emit-relocs-88-overflow" | |
74 | run_dump_test "emit-relocs-89" | |
75 | run_dump_test "emit-relocs-90" | |
76 | run_dump_test "emit-relocs-90-overflow" | |
753999c1 | 77 | run_dump_test "emit-relocs-92" |
a06ea964 NC |
78 | run_dump_test "emit-relocs-257" |
79 | run_dump_test "emit-relocs-257-be" | |
80 | # 258 is tested in 257 | |
81 | # 259 is tested in 257 | |
82 | run_dump_test "emit-relocs-260" | |
83 | run_dump_test "emit-relocs-260-be" | |
84 | # 261 is tested by 260 | |
85 | run_dump_test "emit-relocs-262" | |
86 | run_dump_test "emit-relocs-263" | |
87 | run_dump_test "emit-relocs-264" | |
614b09ce | 88 | run_dump_test "emit-relocs-264-bad" |
a06ea964 NC |
89 | run_dump_test "emit-relocs-265" |
90 | run_dump_test "emit-relocs-266" | |
614b09ce | 91 | run_dump_test "emit-relocs-266-bad" |
a06ea964 NC |
92 | run_dump_test "emit-relocs-267" |
93 | run_dump_test "emit-relocs-268" | |
614b09ce | 94 | run_dump_test "emit-relocs-268-bad" |
a06ea964 | 95 | run_dump_test "emit-relocs-269" |
614b09ce | 96 | run_dump_test "emit-relocs-269-bad" |
a06ea964 NC |
97 | run_dump_test "emit-relocs-270" |
98 | run_dump_test "emit-relocs-270-bad" | |
99 | run_dump_test "emit-relocs-271" | |
100 | run_dump_test "emit-relocs-272" | |
101 | run_dump_test "emit-relocs-273" | |
102 | run_dump_test "emit-relocs-274" | |
103 | run_dump_test "emit-relocs-275" | |
104 | run_dump_test "emit-relocs-276" | |
105 | run_dump_test "emit-relocs-277" | |
106 | run_dump_test "emit-relocs-278" | |
107 | run_dump_test "emit-relocs-279" | |
108 | run_dump_test "emit-relocs-279-bad" | |
109 | run_dump_test "emit-relocs-280" | |
110 | # 281 is unused | |
111 | run_dump_test "emit-relocs-282" | |
112 | run_dump_test "emit-relocs-283" | |
113 | run_dump_test "emit-relocs-284" | |
114 | run_dump_test "emit-relocs-285" | |
115 | run_dump_test "emit-relocs-286" | |
116 | run_dump_test "emit-relocs-286-bad" | |
117 | # 287-298 are not done yet | |
118 | run_dump_test "emit-relocs-299" | |
f41aef5f RE |
119 | # 300-308 are not done yet |
120 | run_dump_test "emit-relocs-309-up" | |
121 | run_dump_test "emit-relocs-309-low" | |
122 | run_dump_test "emit-relocs-309-up-bad" | |
123 | run_dump_test "emit-relocs-309-low-bad" | |
a2e1db00 | 124 | run_dump_test "emit-relocs-310" |
a06ea964 NC |
125 | run_dump_test "emit-relocs-311" |
126 | run_dump_test "emit-relocs-312" | |
99ad26cb | 127 | run_dump_test "emit-relocs-313" |
6ffe9a1b JW |
128 | run_dump_test "emit-relocs-523" |
129 | run_dump_test "emit-relocs-524" | |
130 | run_dump_test "emit-relocs-525" | |
131 | run_dump_test "emit-relocs-526" | |
132 | run_dump_test "emit-relocs-526-overflow" | |
133 | run_dump_test "emit-relocs-527" | |
134 | run_dump_test "emit-relocs-528" | |
135 | run_dump_test "emit-relocs-528-overflow" | |
40fbed84 JW |
136 | run_dump_test "emit-relocs-529" |
137 | run_dump_test "emit-relocs-529-overflow" | |
753999c1 | 138 | run_dump_test "emit-relocs-530" |
07c9aa07 JW |
139 | run_dump_test "emit-relocs-531" |
140 | run_dump_test "emit-relocs-531-overflow" | |
141 | run_dump_test "emit-relocs-532" | |
142 | run_dump_test "emit-relocs-533" | |
143 | run_dump_test "emit-relocs-533-overflow" | |
144 | run_dump_test "emit-relocs-534" | |
145 | run_dump_test "emit-relocs-535" | |
146 | run_dump_test "emit-relocs-535-overflow" | |
147 | run_dump_test "emit-relocs-536" | |
148 | run_dump_test "emit-relocs-537" | |
149 | run_dump_test "emit-relocs-537-overflow" | |
150 | run_dump_test "emit-relocs-538" | |
a06ea964 | 151 | |
2e0488d3 JW |
152 | # test addend correctness when --emit-relocs specified for non-relocatable obj. |
153 | run_dump_test "emit-relocs-local-addend" | |
154 | # test addend correctness when -r specified. | |
155 | run_dump_test "local-addend-r" | |
a06ea964 | 156 | |
dcbd20eb JW |
157 | # test error handling on pcrel relocation for shared libraries. |
158 | run_dump_test "pcrel_pic_undefined" | |
159 | run_dump_test "pcrel_pic_defined_local" | |
160 | ||
a06ea964 NC |
161 | run_dump_test "limit-b" |
162 | run_dump_test "limit-bl" | |
163 | run_dump_test "farcall-section" | |
164 | run_dump_test "farcall-back" | |
f678ded7 JW |
165 | run_dump_test "farcall-b-defsym" |
166 | run_dump_test "farcall-bl-defsym" | |
07f9ddfe JW |
167 | run_dump_test "farcall-b-gsym" |
168 | run_dump_test "farcall-b-plt" | |
169 | run_dump_test "farcall-bl-plt" | |
a06ea964 NC |
170 | run_dump_test "farcall-bl" |
171 | run_dump_test "farcall-b" | |
172 | run_dump_test "farcall-b-none-function" | |
173 | run_dump_test "farcall-bl-none-function" | |
174 | ||
175 | run_dump_test "tls-relax-all" | |
176 | run_dump_test "tls-relax-gd-le" | |
177 | run_dump_test "tls-relax-gdesc-le" | |
178 | run_dump_test "tls-relax-gd-ie" | |
179 | run_dump_test "tls-relax-gdesc-ie" | |
180 | run_dump_test "tls-relax-ie-le" | |
259364ad JW |
181 | run_dump_test "tls-relax-ld-le-small" |
182 | run_dump_test "tls-relax-ld-le-tiny" | |
a06ea964 NC |
183 | run_dump_test "tls-desc-ie" |
184 | run_dump_test "tls-relax-gdesc-ie-2" | |
185 | run_dump_test "tls-relax-gdesc-le-2" | |
186 | run_dump_test "tls-relax-ie-le-2" | |
187 | run_dump_test "tls-relax-ie-le-3" | |
b480a481 MS |
188 | run_dump_test "tls-tiny-gd" |
189 | run_dump_test "tls-tiny-gd-ie" | |
190 | run_dump_test "tls-tiny-gd-le" | |
60d1b0d6 MS |
191 | run_dump_test "tls-tiny-desc" |
192 | run_dump_test "tls-tiny-desc-ie" | |
193 | run_dump_test "tls-tiny-desc-le" | |
b1089987 | 194 | run_dump_test "tls-tiny-ie" |
77a69ff8 | 195 | run_dump_test "tls-tiny-ld" |
f69e4920 | 196 | run_dump_test "tls-small-ld" |
e09ab7ac | 197 | run_dump_test "tlsle" |
bb3f9ed8 | 198 | run_dump_test "tlsle-symbol-offset" |
cb8af559 NC |
199 | run_dump_test "gc-got-relocs" |
200 | run_dump_test "gc-tls-relocs" | |
edb2fa9a MS |
201 | run_dump_test "gc-plt-relocs" |
202 | run_dump_test "gc-relocs-257-dyn" | |
203 | run_dump_test "gc-relocs-257" | |
bab91cce | 204 | run_dump_test "pr17415" |
0172429c | 205 | run_dump_test "tprel_g2_overflow" |
36e6c140 | 206 | run_dump_test "tprel_add_lo12_overflow" |
32f573bc | 207 | run_dump_test "protected-data" |
1419bbe5 WN |
208 | |
209 | # ifunc tests | |
210 | run_dump_test "ifunc-1" | |
211 | run_dump_test "ifunc-1-local" | |
212 | run_dump_test "ifunc-2" | |
213 | run_dump_test "ifunc-2-local" | |
214 | run_dump_test "ifunc-3a" | |
215 | run_dump_test "ifunc-3b" | |
216 | run_dump_test "ifunc-4" | |
217 | run_dump_test "ifunc-4a" | |
218 | run_dump_test "ifunc-5a" | |
219 | run_dump_test "ifunc-5b" | |
220 | run_dump_test "ifunc-5a-local" | |
221 | run_dump_test "ifunc-5b-local" | |
222 | run_dump_test "ifunc-5r-local" | |
223 | run_dump_test "ifunc-6a" | |
224 | run_dump_test "ifunc-6b" | |
225 | run_dump_test "ifunc-7a" | |
226 | run_dump_test "ifunc-7b" | |
227 | run_dump_test "ifunc-7c" | |
228 | run_dump_test "ifunc-8" | |
229 | run_dump_test "ifunc-9" | |
230 | run_dump_test "ifunc-10" | |
231 | run_dump_test "ifunc-11" | |
232 | run_dump_test "ifunc-12" | |
233 | run_dump_test "ifunc-13" | |
234 | run_dump_test "ifunc-14a" | |
235 | run_dump_test "ifunc-14b" | |
236 | run_dump_test "ifunc-14c" | |
237 | run_dump_test "ifunc-14d" | |
238 | run_dump_test "ifunc-14e" | |
239 | run_dump_test "ifunc-14f" | |
240 | run_dump_test "ifunc-15" | |
241 | run_dump_test "ifunc-16" | |
242 | run_dump_test "ifunc-17a" | |
243 | run_dump_test "ifunc-17b" | |
244 | run_dump_test "ifunc-18a" | |
245 | run_dump_test "ifunc-18b" | |
246 | run_dump_test "ifunc-19a" | |
247 | run_dump_test "ifunc-19b" | |
248 | run_dump_test "ifunc-20" | |
b1ee0cc4 | 249 | run_dump_test "ifunc-21" |
49206388 | 250 | run_dump_test "ifunc-22" |
c955de36 WN |
251 | |
252 | run_dump_test "relasz" | |
f63d6d96 | 253 | run_dump_test "relocs-1027-symbolic-func" |
614b09ce | 254 | |
c2170589 JW |
255 | run_dump_test "dt_textrel" |
256 | ||
73524045 RL |
257 | run_dump_test "plt_mapping_symbol" |
258 | ||
614b09ce JW |
259 | set aarch64elflinktests { |
260 | {"ld-aarch64/so with global symbol" "-shared" "" "" {copy-reloc-so.s} | |
261 | {} "copy-reloc-so.so"} | |
262 | {"ld-aarch64/exe with copy relocation" "-e0 tmpdir/copy-reloc-so.so" "" "" | |
263 | {copy-reloc-exe.s} {{objdump -R copy-reloc.d}} "copy-reloc"} | |
264 | } | |
265 | ||
266 | run_ld_link_tests $aarch64elflinktests |