]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - ld/testsuite/ld-aarch64/aarch64-elf.exp
[AArch64] Improve copy relocation support on four absolute relocation types
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-aarch64 / aarch64-elf.exp
1 # Expect script for various AARCH64 ELF tests.
2 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
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:
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
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 {
36 {"EH Frame merge" "-Ttext 0x8000" "" "" {eh-frame-bar.s eh-frame-foo.s}
37 {{objdump --dwarf=frames eh-frame.d}} "eh-frame"}
38 }
39
40 run_ld_link_tests $aarch64elftests
41
42 # Relocation Tests
43 run_dump_test "weak-undefined"
44 run_dump_test "emit-relocs-257"
45 run_dump_test "emit-relocs-257-be"
46 # 258 is tested in 257
47 # 259 is tested in 257
48 run_dump_test "emit-relocs-260"
49 run_dump_test "emit-relocs-260-be"
50 # 261 is tested by 260
51 run_dump_test "emit-relocs-262"
52 run_dump_test "emit-relocs-263"
53 run_dump_test "emit-relocs-264"
54 run_dump_test "emit-relocs-264-bad"
55 run_dump_test "emit-relocs-265"
56 run_dump_test "emit-relocs-266"
57 run_dump_test "emit-relocs-266-bad"
58 run_dump_test "emit-relocs-267"
59 run_dump_test "emit-relocs-268"
60 run_dump_test "emit-relocs-268-bad"
61 run_dump_test "emit-relocs-269"
62 run_dump_test "emit-relocs-269-bad"
63 run_dump_test "emit-relocs-270"
64 run_dump_test "emit-relocs-270-bad"
65 run_dump_test "emit-relocs-271"
66 run_dump_test "emit-relocs-272"
67 run_dump_test "emit-relocs-273"
68 run_dump_test "emit-relocs-274"
69 run_dump_test "emit-relocs-275"
70 run_dump_test "emit-relocs-276"
71 run_dump_test "emit-relocs-277"
72 run_dump_test "emit-relocs-278"
73 run_dump_test "emit-relocs-279"
74 run_dump_test "emit-relocs-279-bad"
75 run_dump_test "emit-relocs-280"
76 # 281 is unused
77 run_dump_test "emit-relocs-282"
78 run_dump_test "emit-relocs-283"
79 run_dump_test "emit-relocs-284"
80 run_dump_test "emit-relocs-285"
81 run_dump_test "emit-relocs-286"
82 run_dump_test "emit-relocs-286-bad"
83 # 287-298 are not done yet
84 run_dump_test "emit-relocs-299"
85 # 300-308 are not done yet
86 run_dump_test "emit-relocs-309-up"
87 run_dump_test "emit-relocs-309-low"
88 run_dump_test "emit-relocs-309-up-bad"
89 run_dump_test "emit-relocs-309-low-bad"
90 # 310 not done yet
91 run_dump_test "emit-relocs-311"
92 run_dump_test "emit-relocs-312"
93
94 # test addend correctness when --emit-relocs specified for non-relocatable obj.
95 run_dump_test "emit-relocs-local-addend"
96 # test addend correctness when -r specified.
97 run_dump_test "local-addend-r"
98
99 run_dump_test "limit-b"
100 run_dump_test "limit-bl"
101 run_dump_test "farcall-section"
102 run_dump_test "farcall-back"
103 run_dump_test "farcall-bl"
104 run_dump_test "farcall-b"
105 run_dump_test "farcall-b-none-function"
106 run_dump_test "farcall-bl-none-function"
107
108 run_dump_test "tls-relax-all"
109 run_dump_test "tls-relax-gd-le"
110 run_dump_test "tls-relax-gdesc-le"
111 run_dump_test "tls-relax-gd-ie"
112 run_dump_test "tls-relax-gdesc-ie"
113 run_dump_test "tls-relax-ie-le"
114 run_dump_test "tls-desc-ie"
115 run_dump_test "tls-relax-gdesc-ie-2"
116 run_dump_test "tls-relax-gdesc-le-2"
117 run_dump_test "tls-relax-ie-le-2"
118 run_dump_test "tls-relax-ie-le-3"
119 run_dump_test "tlsle-symbol-offset"
120 run_dump_test "gc-got-relocs"
121 run_dump_test "gc-tls-relocs"
122 run_dump_test "gc-plt-relocs"
123 run_dump_test "gc-relocs-257-dyn"
124 run_dump_test "gc-relocs-257"
125
126 # ifunc tests
127 run_dump_test "ifunc-1"
128 run_dump_test "ifunc-1-local"
129 run_dump_test "ifunc-2"
130 run_dump_test "ifunc-2-local"
131 run_dump_test "ifunc-3a"
132 run_dump_test "ifunc-3b"
133 run_dump_test "ifunc-4"
134 run_dump_test "ifunc-4a"
135 run_dump_test "ifunc-5a"
136 run_dump_test "ifunc-5b"
137 run_dump_test "ifunc-5a-local"
138 run_dump_test "ifunc-5b-local"
139 run_dump_test "ifunc-5r-local"
140 run_dump_test "ifunc-6a"
141 run_dump_test "ifunc-6b"
142 run_dump_test "ifunc-7a"
143 run_dump_test "ifunc-7b"
144 run_dump_test "ifunc-7c"
145 run_dump_test "ifunc-8"
146 run_dump_test "ifunc-9"
147 run_dump_test "ifunc-10"
148 run_dump_test "ifunc-11"
149 run_dump_test "ifunc-12"
150 run_dump_test "ifunc-13"
151 run_dump_test "ifunc-14a"
152 run_dump_test "ifunc-14b"
153 run_dump_test "ifunc-14c"
154 run_dump_test "ifunc-14d"
155 run_dump_test "ifunc-14e"
156 run_dump_test "ifunc-14f"
157 run_dump_test "ifunc-15"
158 run_dump_test "ifunc-16"
159 run_dump_test "ifunc-17a"
160 run_dump_test "ifunc-17b"
161 run_dump_test "ifunc-18a"
162 run_dump_test "ifunc-18b"
163 run_dump_test "ifunc-19a"
164 run_dump_test "ifunc-19b"
165 run_dump_test "ifunc-20"
166 run_dump_test "ifunc-21"
167 run_dump_test "ifunc-22"
168
169 run_dump_test "relasz"
170
171 set aarch64elflinktests {
172 {"ld-aarch64/so with global symbol" "-shared" "" "" {copy-reloc-so.s}
173 {} "copy-reloc-so.so"}
174 {"ld-aarch64/exe with copy relocation" "-e0 tmpdir/copy-reloc-so.so" "" ""
175 {copy-reloc-exe.s} {{objdump -R copy-reloc.d}} "copy-reloc"}
176 }
177
178 run_ld_link_tests $aarch64elflinktests