1 ## Test that llvm-readobj/llvm-readelf shows proper relocation type
2 ## names and values for mips64 target.
4 # RUN: yaml2obj %s -o %t-mips64.o
5 # RUN: llvm-readobj -r --expand-relocs %t-mips64.o | FileCheck %s
7 # CHECK: Type: R_MIPS_NONE/R_MIPS_NONE/R_MIPS_NONE (0)
8 # CHECK: Type: R_MIPS_16/R_MIPS_16/R_MIPS_16 (65793)
9 # CHECK: Type: R_MIPS_32/R_MIPS_32/R_MIPS_32 (131586)
10 # CHECK: Type: R_MIPS_REL32/R_MIPS_REL32/R_MIPS_REL32 (197379)
11 # CHECK: Type: R_MIPS_26/R_MIPS_26/R_MIPS_26 (263172)
12 # CHECK: Type: R_MIPS_HI16/R_MIPS_HI16/R_MIPS_HI16 (328965)
13 # CHECK: Type: R_MIPS_LO16/R_MIPS_LO16/R_MIPS_LO16 (394758)
14 # CHECK: Type: R_MIPS_GPREL16/R_MIPS_GPREL16/R_MIPS_GPREL16 (460551)
15 # CHECK: Type: R_MIPS_LITERAL/R_MIPS_LITERAL/R_MIPS_LITERAL (526344)
16 # CHECK: Type: R_MIPS_GOT16/R_MIPS_GOT16/R_MIPS_GOT16 (592137)
17 # CHECK: Type: R_MIPS_PC16/R_MIPS_PC16/R_MIPS_PC16 (657930)
18 # CHECK: Type: R_MIPS_CALL16/R_MIPS_CALL16/R_MIPS_CALL16 (723723)
19 # CHECK: Type: R_MIPS_GPREL32/R_MIPS_GPREL32/R_MIPS_GPREL32 (789516)
20 # CHECK: Type: R_MIPS_SHIFT5/R_MIPS_SHIFT5/R_MIPS_SHIFT5 (1052688)
21 # CHECK: Type: R_MIPS_SHIFT6/R_MIPS_SHIFT6/R_MIPS_SHIFT6 (1118481)
22 # CHECK: Type: R_MIPS_64/R_MIPS_64/R_MIPS_64 (1184274)
23 # CHECK: Type: R_MIPS_GOT_DISP/R_MIPS_GOT_DISP/R_MIPS_GOT_DISP (1250067)
24 # CHECK: Type: R_MIPS_GOT_PAGE/R_MIPS_GOT_PAGE/R_MIPS_GOT_PAGE (1315860)
25 # CHECK: Type: R_MIPS_GOT_OFST/R_MIPS_GOT_OFST/R_MIPS_GOT_OFST (1381653)
26 # CHECK: Type: R_MIPS_GOT_HI16/R_MIPS_GOT_HI16/R_MIPS_GOT_HI16 (1447446)
27 # CHECK: Type: R_MIPS_GOT_LO16/R_MIPS_GOT_LO16/R_MIPS_GOT_LO16 (1513239)
28 # CHECK: Type: R_MIPS_SUB/R_MIPS_SUB/R_MIPS_SUB (1579032)
29 # CHECK: Type: R_MIPS_INSERT_A/R_MIPS_INSERT_A/R_MIPS_INSERT_A (1644825)
30 # CHECK: Type: R_MIPS_INSERT_B/R_MIPS_INSERT_B/R_MIPS_INSERT_B (1710618)
31 # CHECK: Type: R_MIPS_DELETE/R_MIPS_DELETE/R_MIPS_DELETE (1776411)
32 # CHECK: Type: R_MIPS_HIGHER/R_MIPS_HIGHER/R_MIPS_HIGHER (1842204)
33 # CHECK: Type: R_MIPS_HIGHEST/R_MIPS_HIGHEST/R_MIPS_HIGHEST (1907997)
34 # CHECK: Type: R_MIPS_CALL_HI16/R_MIPS_CALL_HI16/R_MIPS_CALL_HI16 (1973790)
35 # CHECK: Type: R_MIPS_CALL_LO16/R_MIPS_CALL_LO16/R_MIPS_CALL_LO16 (2039583)
36 # CHECK: Type: R_MIPS_SCN_DISP/R_MIPS_SCN_DISP/R_MIPS_SCN_DISP (2105376)
37 # CHECK: Type: R_MIPS_REL16/R_MIPS_REL16/R_MIPS_REL16 (2171169)
38 # CHECK: Type: R_MIPS_ADD_IMMEDIATE/R_MIPS_ADD_IMMEDIATE/R_MIPS_ADD_IMMEDIATE (2236962)
39 # CHECK: Type: R_MIPS_PJUMP/R_MIPS_PJUMP/R_MIPS_PJUMP (2302755)
40 # CHECK: Type: R_MIPS_RELGOT/R_MIPS_RELGOT/R_MIPS_RELGOT (2368548)
41 # CHECK: Type: R_MIPS_JALR/R_MIPS_JALR/R_MIPS_JALR (2434341)
42 # CHECK: Type: R_MIPS_TLS_DTPMOD32/R_MIPS_TLS_DTPMOD32/R_MIPS_TLS_DTPMOD32 (2500134)
43 # CHECK: Type: R_MIPS_TLS_DTPREL32/R_MIPS_TLS_DTPREL32/R_MIPS_TLS_DTPREL32 (2565927)
44 # CHECK: Type: R_MIPS_TLS_DTPMOD64/R_MIPS_TLS_DTPMOD64/R_MIPS_TLS_DTPMOD64 (2631720)
45 # CHECK: Type: R_MIPS_TLS_DTPREL64/R_MIPS_TLS_DTPREL64/R_MIPS_TLS_DTPREL64 (2697513)
46 # CHECK: Type: R_MIPS_TLS_GD/R_MIPS_TLS_GD/R_MIPS_TLS_GD (2763306)
47 # CHECK: Type: R_MIPS_TLS_LDM/R_MIPS_TLS_LDM/R_MIPS_TLS_LDM (2829099)
48 # CHECK: Type: R_MIPS_TLS_DTPREL_HI16/R_MIPS_TLS_DTPREL_HI16/R_MIPS_TLS_DTPREL_HI16 (2894892)
49 # CHECK: Type: R_MIPS_TLS_DTPREL_LO16/R_MIPS_TLS_DTPREL_LO16/R_MIPS_TLS_DTPREL_LO16 (2960685)
50 # CHECK: Type: R_MIPS_TLS_GOTTPREL/R_MIPS_TLS_GOTTPREL/R_MIPS_TLS_GOTTPREL (3026478)
51 # CHECK: Type: R_MIPS_TLS_TPREL32/R_MIPS_TLS_TPREL32/R_MIPS_TLS_TPREL32 (3092271)
52 # CHECK: Type: R_MIPS_TLS_TPREL64/R_MIPS_TLS_TPREL64/R_MIPS_TLS_TPREL64 (3158064)
53 # CHECK: Type: R_MIPS_TLS_TPREL_HI16/R_MIPS_TLS_TPREL_HI16/R_MIPS_TLS_TPREL_HI16 (3223857)
54 # CHECK: Type: R_MIPS_TLS_TPREL_LO16/R_MIPS_TLS_TPREL_LO16/R_MIPS_TLS_TPREL_LO16 (3289650)
55 # CHECK: Type: R_MIPS_GLOB_DAT/R_MIPS_GLOB_DAT/R_MIPS_GLOB_DAT (3355443)
56 # CHECK: Type: R_MIPS_COPY/R_MIPS_COPY/R_MIPS_COPY (8289918)
57 # CHECK: Type: R_MIPS_JUMP_SLOT/R_MIPS_JUMP_SLOT/R_MIPS_JUMP_SLOT (8355711)
58 # CHECK: Type: R_MIPS_NUM/R_MIPS_NUM/R_MIPS_NUM (14342874)
74 AddressAlign: 0x0000000000000008
75 EntSize: 0x0000000000000018
78 - Offset: 0x0000000000000000
80 - Offset: 0x0000000000000004
84 - Offset: 0x0000000000000008
88 - Offset: 0x000000000000000C
92 - Offset: 0x0000000000000010
96 - Offset: 0x0000000000000014
100 - Offset: 0x0000000000000018
104 - Offset: 0x000000000000001C
106 Type2: R_MIPS_GPREL16
107 Type3: R_MIPS_GPREL16
108 - Offset: 0x0000000000000020
110 Type2: R_MIPS_LITERAL
111 Type3: R_MIPS_LITERAL
112 - Offset: 0x0000000000000024
116 - Offset: 0x0000000000000028
120 - Offset: 0x000000000000002C
124 - Offset: 0x0000000000000030
126 Type2: R_MIPS_GPREL32
127 Type3: R_MIPS_GPREL32
128 - Offset: 0x0000000000000034
132 - Offset: 0x0000000000000038
136 - Offset: 0x000000000000003C
140 - Offset: 0x0000000000000040
141 Type: R_MIPS_GOT_DISP
142 Type2: R_MIPS_GOT_DISP
143 Type3: R_MIPS_GOT_DISP
144 - Offset: 0x0000000000000044
145 Type: R_MIPS_GOT_PAGE
146 Type2: R_MIPS_GOT_PAGE
147 Type3: R_MIPS_GOT_PAGE
148 - Offset: 0x0000000000000048
149 Type: R_MIPS_GOT_OFST
150 Type2: R_MIPS_GOT_OFST
151 Type3: R_MIPS_GOT_OFST
152 - Offset: 0x000000000000004C
153 Type: R_MIPS_GOT_HI16
154 Type2: R_MIPS_GOT_HI16
155 Type3: R_MIPS_GOT_HI16
156 - Offset: 0x0000000000000050
157 Type: R_MIPS_GOT_LO16
158 Type2: R_MIPS_GOT_LO16
159 Type3: R_MIPS_GOT_LO16
160 - Offset: 0x0000000000000054
164 - Offset: 0x0000000000000058
165 Type: R_MIPS_INSERT_A
166 Type2: R_MIPS_INSERT_A
167 Type3: R_MIPS_INSERT_A
168 - Offset: 0x000000000000005C
169 Type: R_MIPS_INSERT_B
170 Type2: R_MIPS_INSERT_B
171 Type3: R_MIPS_INSERT_B
172 - Offset: 0x0000000000000060
176 - Offset: 0x0000000000000064
180 - Offset: 0x0000000000000068
182 Type2: R_MIPS_HIGHEST
183 Type3: R_MIPS_HIGHEST
184 - Offset: 0x000000000000006C
185 Type: R_MIPS_CALL_HI16
186 Type2: R_MIPS_CALL_HI16
187 Type3: R_MIPS_CALL_HI16
188 - Offset: 0x0000000000000070
189 Type: R_MIPS_CALL_LO16
190 Type2: R_MIPS_CALL_LO16
191 Type3: R_MIPS_CALL_LO16
192 - Offset: 0x0000000000000074
193 Type: R_MIPS_SCN_DISP
194 Type2: R_MIPS_SCN_DISP
195 Type3: R_MIPS_SCN_DISP
196 - Offset: 0x0000000000000078
200 - Offset: 0x000000000000007C
201 Type: R_MIPS_ADD_IMMEDIATE
202 Type2: R_MIPS_ADD_IMMEDIATE
203 Type3: R_MIPS_ADD_IMMEDIATE
204 - Offset: 0x0000000000000080
208 - Offset: 0x0000000000000084
212 - Offset: 0x0000000000000088
216 - Offset: 0x000000000000008C
217 Type: R_MIPS_TLS_DTPMOD32
218 Type2: R_MIPS_TLS_DTPMOD32
219 Type3: R_MIPS_TLS_DTPMOD32
220 - Offset: 0x0000000000000090
221 Type: R_MIPS_TLS_DTPREL32
222 Type2: R_MIPS_TLS_DTPREL32
223 Type3: R_MIPS_TLS_DTPREL32
224 - Offset: 0x0000000000000094
225 Type: R_MIPS_TLS_DTPMOD64
226 Type2: R_MIPS_TLS_DTPMOD64
227 Type3: R_MIPS_TLS_DTPMOD64
228 - Offset: 0x0000000000000098
229 Type: R_MIPS_TLS_DTPREL64
230 Type2: R_MIPS_TLS_DTPREL64
231 Type3: R_MIPS_TLS_DTPREL64
232 - Offset: 0x000000000000009C
236 - Offset: 0x00000000000000A0
238 Type2: R_MIPS_TLS_LDM
239 Type3: R_MIPS_TLS_LDM
240 - Offset: 0x00000000000000A4
241 Type: R_MIPS_TLS_DTPREL_HI16
242 Type2: R_MIPS_TLS_DTPREL_HI16
243 Type3: R_MIPS_TLS_DTPREL_HI16
244 - Offset: 0x00000000000000A8
245 Type: R_MIPS_TLS_DTPREL_LO16
246 Type2: R_MIPS_TLS_DTPREL_LO16
247 Type3: R_MIPS_TLS_DTPREL_LO16
248 - Offset: 0x00000000000000AC
249 Type: R_MIPS_TLS_GOTTPREL
250 Type2: R_MIPS_TLS_GOTTPREL
251 Type3: R_MIPS_TLS_GOTTPREL
252 - Offset: 0x00000000000000B0
253 Type: R_MIPS_TLS_TPREL32
254 Type2: R_MIPS_TLS_TPREL32
255 Type3: R_MIPS_TLS_TPREL32
256 - Offset: 0x00000000000000B4
257 Type: R_MIPS_TLS_TPREL64
258 Type2: R_MIPS_TLS_TPREL64
259 Type3: R_MIPS_TLS_TPREL64
260 - Offset: 0x00000000000000B8
261 Type: R_MIPS_TLS_TPREL_HI16
262 Type2: R_MIPS_TLS_TPREL_HI16
263 Type3: R_MIPS_TLS_TPREL_HI16
264 - Offset: 0x00000000000000BC
265 Type: R_MIPS_TLS_TPREL_LO16
266 Type2: R_MIPS_TLS_TPREL_LO16
267 Type3: R_MIPS_TLS_TPREL_LO16
268 - Offset: 0x00000000000000C0
269 Type: R_MIPS_GLOB_DAT
270 Type2: R_MIPS_GLOB_DAT
271 Type3: R_MIPS_GLOB_DAT
272 - Offset: 0x00000000000000C4
276 - Offset: 0x00000000000000C8
277 Type: R_MIPS_JUMP_SLOT
278 Type2: R_MIPS_JUMP_SLOT
279 Type3: R_MIPS_JUMP_SLOT
280 - Offset: 0x00000000000000CC