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)
73 AddressAlign: 0x0000000000000008
74 EntSize: 0x0000000000000018
77 - Offset: 0x0000000000000000
79 - Offset: 0x0000000000000004
83 - Offset: 0x0000000000000008
87 - Offset: 0x000000000000000C
91 - Offset: 0x0000000000000010
95 - Offset: 0x0000000000000014
99 - Offset: 0x0000000000000018
103 - Offset: 0x000000000000001C
105 Type2: R_MIPS_GPREL16
106 Type3: R_MIPS_GPREL16
107 - Offset: 0x0000000000000020
109 Type2: R_MIPS_LITERAL
110 Type3: R_MIPS_LITERAL
111 - Offset: 0x0000000000000024
115 - Offset: 0x0000000000000028
119 - Offset: 0x000000000000002C
123 - Offset: 0x0000000000000030
125 Type2: R_MIPS_GPREL32
126 Type3: R_MIPS_GPREL32
127 - Offset: 0x0000000000000034
131 - Offset: 0x0000000000000038
135 - Offset: 0x000000000000003C
139 - Offset: 0x0000000000000040
140 Type: R_MIPS_GOT_DISP
141 Type2: R_MIPS_GOT_DISP
142 Type3: R_MIPS_GOT_DISP
143 - Offset: 0x0000000000000044
144 Type: R_MIPS_GOT_PAGE
145 Type2: R_MIPS_GOT_PAGE
146 Type3: R_MIPS_GOT_PAGE
147 - Offset: 0x0000000000000048
148 Type: R_MIPS_GOT_OFST
149 Type2: R_MIPS_GOT_OFST
150 Type3: R_MIPS_GOT_OFST
151 - Offset: 0x000000000000004C
152 Type: R_MIPS_GOT_HI16
153 Type2: R_MIPS_GOT_HI16
154 Type3: R_MIPS_GOT_HI16
155 - Offset: 0x0000000000000050
156 Type: R_MIPS_GOT_LO16
157 Type2: R_MIPS_GOT_LO16
158 Type3: R_MIPS_GOT_LO16
159 - Offset: 0x0000000000000054
163 - Offset: 0x0000000000000058
164 Type: R_MIPS_INSERT_A
165 Type2: R_MIPS_INSERT_A
166 Type3: R_MIPS_INSERT_A
167 - Offset: 0x000000000000005C
168 Type: R_MIPS_INSERT_B
169 Type2: R_MIPS_INSERT_B
170 Type3: R_MIPS_INSERT_B
171 - Offset: 0x0000000000000060
175 - Offset: 0x0000000000000064
179 - Offset: 0x0000000000000068
181 Type2: R_MIPS_HIGHEST
182 Type3: R_MIPS_HIGHEST
183 - Offset: 0x000000000000006C
184 Type: R_MIPS_CALL_HI16
185 Type2: R_MIPS_CALL_HI16
186 Type3: R_MIPS_CALL_HI16
187 - Offset: 0x0000000000000070
188 Type: R_MIPS_CALL_LO16
189 Type2: R_MIPS_CALL_LO16
190 Type3: R_MIPS_CALL_LO16
191 - Offset: 0x0000000000000074
192 Type: R_MIPS_SCN_DISP
193 Type2: R_MIPS_SCN_DISP
194 Type3: R_MIPS_SCN_DISP
195 - Offset: 0x0000000000000078
199 - Offset: 0x000000000000007C
200 Type: R_MIPS_ADD_IMMEDIATE
201 Type2: R_MIPS_ADD_IMMEDIATE
202 Type3: R_MIPS_ADD_IMMEDIATE
203 - Offset: 0x0000000000000080
207 - Offset: 0x0000000000000084
211 - Offset: 0x0000000000000088
215 - Offset: 0x000000000000008C
216 Type: R_MIPS_TLS_DTPMOD32
217 Type2: R_MIPS_TLS_DTPMOD32
218 Type3: R_MIPS_TLS_DTPMOD32
219 - Offset: 0x0000000000000090
220 Type: R_MIPS_TLS_DTPREL32
221 Type2: R_MIPS_TLS_DTPREL32
222 Type3: R_MIPS_TLS_DTPREL32
223 - Offset: 0x0000000000000094
224 Type: R_MIPS_TLS_DTPMOD64
225 Type2: R_MIPS_TLS_DTPMOD64
226 Type3: R_MIPS_TLS_DTPMOD64
227 - Offset: 0x0000000000000098
228 Type: R_MIPS_TLS_DTPREL64
229 Type2: R_MIPS_TLS_DTPREL64
230 Type3: R_MIPS_TLS_DTPREL64
231 - Offset: 0x000000000000009C
235 - Offset: 0x00000000000000A0
237 Type2: R_MIPS_TLS_LDM
238 Type3: R_MIPS_TLS_LDM
239 - Offset: 0x00000000000000A4
240 Type: R_MIPS_TLS_DTPREL_HI16
241 Type2: R_MIPS_TLS_DTPREL_HI16
242 Type3: R_MIPS_TLS_DTPREL_HI16
243 - Offset: 0x00000000000000A8
244 Type: R_MIPS_TLS_DTPREL_LO16
245 Type2: R_MIPS_TLS_DTPREL_LO16
246 Type3: R_MIPS_TLS_DTPREL_LO16
247 - Offset: 0x00000000000000AC
248 Type: R_MIPS_TLS_GOTTPREL
249 Type2: R_MIPS_TLS_GOTTPREL
250 Type3: R_MIPS_TLS_GOTTPREL
251 - Offset: 0x00000000000000B0
252 Type: R_MIPS_TLS_TPREL32
253 Type2: R_MIPS_TLS_TPREL32
254 Type3: R_MIPS_TLS_TPREL32
255 - Offset: 0x00000000000000B4
256 Type: R_MIPS_TLS_TPREL64
257 Type2: R_MIPS_TLS_TPREL64
258 Type3: R_MIPS_TLS_TPREL64
259 - Offset: 0x00000000000000B8
260 Type: R_MIPS_TLS_TPREL_HI16
261 Type2: R_MIPS_TLS_TPREL_HI16
262 Type3: R_MIPS_TLS_TPREL_HI16
263 - Offset: 0x00000000000000BC
264 Type: R_MIPS_TLS_TPREL_LO16
265 Type2: R_MIPS_TLS_TPREL_LO16
266 Type3: R_MIPS_TLS_TPREL_LO16
267 - Offset: 0x00000000000000C0
268 Type: R_MIPS_GLOB_DAT
269 Type2: R_MIPS_GLOB_DAT
270 Type3: R_MIPS_GLOB_DAT
271 - Offset: 0x00000000000000C4
275 - Offset: 0x00000000000000C8
276 Type: R_MIPS_JUMP_SLOT
277 Type2: R_MIPS_JUMP_SLOT
278 Type3: R_MIPS_JUMP_SLOT
279 - Offset: 0x00000000000000CC