[AArch64][2/6] LD support BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC
[deliverable/binutils-gdb.git] / ld / testsuite / ld-aarch64 / aarch64-elf.exp
CommitLineData
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.
22if { ![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
35set 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 48proc 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 63run_ld_link_tests $aarch64elftests
4106101c 64run_dump_test "erratum843419"
a06ea964
NC
65
66# Relocation Tests
67run_dump_test "weak-undefined"
7018c030 68run_dump_test "emit-relocs-28"
40fbed84
JW
69run_dump_test "emit-relocs-86"
70run_dump_test "emit-relocs-86-overflow"
753999c1 71run_dump_test "emit-relocs-92"
a06ea964
NC
72run_dump_test "emit-relocs-257"
73run_dump_test "emit-relocs-257-be"
74# 258 is tested in 257
75# 259 is tested in 257
76run_dump_test "emit-relocs-260"
77run_dump_test "emit-relocs-260-be"
78# 261 is tested by 260
79run_dump_test "emit-relocs-262"
80run_dump_test "emit-relocs-263"
81run_dump_test "emit-relocs-264"
614b09ce 82run_dump_test "emit-relocs-264-bad"
a06ea964
NC
83run_dump_test "emit-relocs-265"
84run_dump_test "emit-relocs-266"
614b09ce 85run_dump_test "emit-relocs-266-bad"
a06ea964
NC
86run_dump_test "emit-relocs-267"
87run_dump_test "emit-relocs-268"
614b09ce 88run_dump_test "emit-relocs-268-bad"
a06ea964 89run_dump_test "emit-relocs-269"
614b09ce 90run_dump_test "emit-relocs-269-bad"
a06ea964
NC
91run_dump_test "emit-relocs-270"
92run_dump_test "emit-relocs-270-bad"
93run_dump_test "emit-relocs-271"
94run_dump_test "emit-relocs-272"
95run_dump_test "emit-relocs-273"
96run_dump_test "emit-relocs-274"
97run_dump_test "emit-relocs-275"
98run_dump_test "emit-relocs-276"
99run_dump_test "emit-relocs-277"
100run_dump_test "emit-relocs-278"
101run_dump_test "emit-relocs-279"
102run_dump_test "emit-relocs-279-bad"
103run_dump_test "emit-relocs-280"
104# 281 is unused
105run_dump_test "emit-relocs-282"
106run_dump_test "emit-relocs-283"
107run_dump_test "emit-relocs-284"
108run_dump_test "emit-relocs-285"
109run_dump_test "emit-relocs-286"
110run_dump_test "emit-relocs-286-bad"
111# 287-298 are not done yet
112run_dump_test "emit-relocs-299"
f41aef5f
RE
113# 300-308 are not done yet
114run_dump_test "emit-relocs-309-up"
115run_dump_test "emit-relocs-309-low"
116run_dump_test "emit-relocs-309-up-bad"
117run_dump_test "emit-relocs-309-low-bad"
118# 310 not done yet
a06ea964
NC
119run_dump_test "emit-relocs-311"
120run_dump_test "emit-relocs-312"
99ad26cb 121run_dump_test "emit-relocs-313"
40fbed84
JW
122run_dump_test "emit-relocs-529"
123run_dump_test "emit-relocs-529-overflow"
753999c1 124run_dump_test "emit-relocs-530"
a06ea964 125
2e0488d3
JW
126# test addend correctness when --emit-relocs specified for non-relocatable obj.
127run_dump_test "emit-relocs-local-addend"
128# test addend correctness when -r specified.
129run_dump_test "local-addend-r"
a06ea964 130
dcbd20eb
JW
131# test error handling on pcrel relocation for shared libraries.
132run_dump_test "pcrel_pic_undefined"
133run_dump_test "pcrel_pic_defined_local"
134
a06ea964
NC
135run_dump_test "limit-b"
136run_dump_test "limit-bl"
137run_dump_test "farcall-section"
138run_dump_test "farcall-back"
f678ded7
JW
139run_dump_test "farcall-b-defsym"
140run_dump_test "farcall-bl-defsym"
07f9ddfe
JW
141run_dump_test "farcall-b-gsym"
142run_dump_test "farcall-b-plt"
143run_dump_test "farcall-bl-plt"
a06ea964
NC
144run_dump_test "farcall-bl"
145run_dump_test "farcall-b"
146run_dump_test "farcall-b-none-function"
147run_dump_test "farcall-bl-none-function"
148
149run_dump_test "tls-relax-all"
150run_dump_test "tls-relax-gd-le"
151run_dump_test "tls-relax-gdesc-le"
152run_dump_test "tls-relax-gd-ie"
153run_dump_test "tls-relax-gdesc-ie"
154run_dump_test "tls-relax-ie-le"
155run_dump_test "tls-desc-ie"
156run_dump_test "tls-relax-gdesc-ie-2"
157run_dump_test "tls-relax-gdesc-le-2"
158run_dump_test "tls-relax-ie-le-2"
159run_dump_test "tls-relax-ie-le-3"
b480a481
MS
160run_dump_test "tls-tiny-gd"
161run_dump_test "tls-tiny-gd-ie"
162run_dump_test "tls-tiny-gd-le"
60d1b0d6
MS
163run_dump_test "tls-tiny-desc"
164run_dump_test "tls-tiny-desc-ie"
165run_dump_test "tls-tiny-desc-le"
b1089987 166run_dump_test "tls-tiny-ie"
77a69ff8 167run_dump_test "tls-tiny-ld"
f69e4920 168run_dump_test "tls-small-ld"
e09ab7ac 169run_dump_test "tlsle"
bb3f9ed8 170run_dump_test "tlsle-symbol-offset"
cb8af559
NC
171run_dump_test "gc-got-relocs"
172run_dump_test "gc-tls-relocs"
edb2fa9a
MS
173run_dump_test "gc-plt-relocs"
174run_dump_test "gc-relocs-257-dyn"
175run_dump_test "gc-relocs-257"
bab91cce 176run_dump_test "pr17415"
0172429c 177run_dump_test "tprel_g2_overflow"
36e6c140 178run_dump_test "tprel_add_lo12_overflow"
32f573bc 179run_dump_test "protected-data"
1419bbe5
WN
180
181# ifunc tests
182run_dump_test "ifunc-1"
183run_dump_test "ifunc-1-local"
184run_dump_test "ifunc-2"
185run_dump_test "ifunc-2-local"
186run_dump_test "ifunc-3a"
187run_dump_test "ifunc-3b"
188run_dump_test "ifunc-4"
189run_dump_test "ifunc-4a"
190run_dump_test "ifunc-5a"
191run_dump_test "ifunc-5b"
192run_dump_test "ifunc-5a-local"
193run_dump_test "ifunc-5b-local"
194run_dump_test "ifunc-5r-local"
195run_dump_test "ifunc-6a"
196run_dump_test "ifunc-6b"
197run_dump_test "ifunc-7a"
198run_dump_test "ifunc-7b"
199run_dump_test "ifunc-7c"
200run_dump_test "ifunc-8"
201run_dump_test "ifunc-9"
202run_dump_test "ifunc-10"
203run_dump_test "ifunc-11"
204run_dump_test "ifunc-12"
205run_dump_test "ifunc-13"
206run_dump_test "ifunc-14a"
207run_dump_test "ifunc-14b"
208run_dump_test "ifunc-14c"
209run_dump_test "ifunc-14d"
210run_dump_test "ifunc-14e"
211run_dump_test "ifunc-14f"
212run_dump_test "ifunc-15"
213run_dump_test "ifunc-16"
214run_dump_test "ifunc-17a"
215run_dump_test "ifunc-17b"
216run_dump_test "ifunc-18a"
217run_dump_test "ifunc-18b"
218run_dump_test "ifunc-19a"
219run_dump_test "ifunc-19b"
220run_dump_test "ifunc-20"
b1ee0cc4 221run_dump_test "ifunc-21"
49206388 222run_dump_test "ifunc-22"
c955de36
WN
223
224run_dump_test "relasz"
f63d6d96 225run_dump_test "relocs-1027-symbolic-func"
614b09ce 226
c2170589
JW
227run_dump_test "dt_textrel"
228
614b09ce
JW
229set aarch64elflinktests {
230 {"ld-aarch64/so with global symbol" "-shared" "" "" {copy-reloc-so.s}
231 {} "copy-reloc-so.so"}
232 {"ld-aarch64/exe with copy relocation" "-e0 tmpdir/copy-reloc-so.so" "" ""
233 {copy-reloc-exe.s} {{objdump -R copy-reloc.d}} "copy-reloc"}
234}
235
236run_ld_link_tests $aarch64elflinktests
This page took 0.172551 seconds and 4 git commands to generate.