Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / llvm-readobj / reloc-types-elf-mips64.test
blobf04064217bcb6af598d7b4273d9fda29294b5707
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)
60 --- !ELF
61 FileHeader:
62   Class:   ELFCLASS64
63   Data:    ELFDATA2LSB
64   OSABI:   ELFOSABI_GNU
65   Type:    ET_REL
66   Machine: EM_MIPS
67 Sections:
68   - Name:    .text
69     Type:    SHT_PROGBITS
70     Content: 00
71   - Name:         .rela.text
72     Type:         SHT_RELA
73     Link:         .symtab
74     AddressAlign: 0x0000000000000008
75     EntSize:      0x0000000000000018
76     Info:         .text
77     Relocations:
78       - Offset: 0x0000000000000000
79         Type:   R_MIPS_NONE
80       - Offset: 0x0000000000000004
81         Type:   R_MIPS_16
82         Type2:  R_MIPS_16
83         Type3:  R_MIPS_16
84       - Offset: 0x0000000000000008
85         Type:   R_MIPS_32
86         Type2:  R_MIPS_32
87         Type3:  R_MIPS_32
88       - Offset: 0x000000000000000C
89         Type:   R_MIPS_REL32
90         Type2:  R_MIPS_REL32
91         Type3:  R_MIPS_REL32
92       - Offset: 0x0000000000000010
93         Type:   R_MIPS_26
94         Type2:  R_MIPS_26
95         Type3:  R_MIPS_26
96       - Offset: 0x0000000000000014
97         Type:   R_MIPS_HI16
98         Type2:  R_MIPS_HI16
99         Type3:  R_MIPS_HI16
100       - Offset: 0x0000000000000018
101         Type:   R_MIPS_LO16
102         Type2:  R_MIPS_LO16
103         Type3:  R_MIPS_LO16
104       - Offset: 0x000000000000001C
105         Type:   R_MIPS_GPREL16
106         Type2:  R_MIPS_GPREL16
107         Type3:  R_MIPS_GPREL16
108       - Offset: 0x0000000000000020
109         Type:   R_MIPS_LITERAL
110         Type2:  R_MIPS_LITERAL
111         Type3:  R_MIPS_LITERAL
112       - Offset: 0x0000000000000024
113         Type:   R_MIPS_GOT16
114         Type2:  R_MIPS_GOT16
115         Type3:  R_MIPS_GOT16
116       - Offset: 0x0000000000000028
117         Type:   R_MIPS_PC16
118         Type2:  R_MIPS_PC16
119         Type3:  R_MIPS_PC16
120       - Offset: 0x000000000000002C
121         Type:   R_MIPS_CALL16
122         Type2:  R_MIPS_CALL16
123         Type3:  R_MIPS_CALL16
124       - Offset: 0x0000000000000030
125         Type:   R_MIPS_GPREL32
126         Type2:  R_MIPS_GPREL32
127         Type3:  R_MIPS_GPREL32
128       - Offset: 0x0000000000000034
129         Type:   R_MIPS_SHIFT5
130         Type2:  R_MIPS_SHIFT5
131         Type3:  R_MIPS_SHIFT5
132       - Offset: 0x0000000000000038
133         Type:   R_MIPS_SHIFT6
134         Type2:  R_MIPS_SHIFT6
135         Type3:  R_MIPS_SHIFT6
136       - Offset: 0x000000000000003C
137         Type:   R_MIPS_64
138         Type2:  R_MIPS_64
139         Type3:  R_MIPS_64
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
161         Type:   R_MIPS_SUB
162         Type2:  R_MIPS_SUB
163         Type3:  R_MIPS_SUB
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
173         Type:   R_MIPS_DELETE
174         Type2:  R_MIPS_DELETE
175         Type3:  R_MIPS_DELETE
176       - Offset: 0x0000000000000064
177         Type:   R_MIPS_HIGHER
178         Type2:  R_MIPS_HIGHER
179         Type3:  R_MIPS_HIGHER
180       - Offset: 0x0000000000000068
181         Type:   R_MIPS_HIGHEST
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
197         Type:   R_MIPS_REL16
198         Type2:  R_MIPS_REL16
199         Type3:  R_MIPS_REL16
200       - Offset: 0x000000000000007C
201         Type:   R_MIPS_ADD_IMMEDIATE
202         Type2:  R_MIPS_ADD_IMMEDIATE
203         Type3:  R_MIPS_ADD_IMMEDIATE
204       - Offset: 0x0000000000000080
205         Type:   R_MIPS_PJUMP
206         Type2:  R_MIPS_PJUMP
207         Type3:  R_MIPS_PJUMP
208       - Offset: 0x0000000000000084
209         Type:   R_MIPS_RELGOT
210         Type2:  R_MIPS_RELGOT
211         Type3:  R_MIPS_RELGOT
212       - Offset: 0x0000000000000088
213         Type:   R_MIPS_JALR
214         Type2:  R_MIPS_JALR
215         Type3:  R_MIPS_JALR
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
233         Type:   R_MIPS_TLS_GD
234         Type2:  R_MIPS_TLS_GD
235         Type3:  R_MIPS_TLS_GD
236       - Offset: 0x00000000000000A0
237         Type:   R_MIPS_TLS_LDM
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
273         Type:   R_MIPS_COPY
274         Type2:  R_MIPS_COPY
275         Type3:  R_MIPS_COPY
276       - Offset: 0x00000000000000C8
277         Type:   R_MIPS_JUMP_SLOT
278         Type2:  R_MIPS_JUMP_SLOT
279         Type3:  R_MIPS_JUMP_SLOT
280       - Offset: 0x00000000000000CC
281         Type:   R_MIPS_NUM
282         Type2:  R_MIPS_NUM
283         Type3:  R_MIPS_NUM