Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / llvm-readobj / reloc-types-elf-mips.test
blobb948a3d5a6d0f8a6861287dd3b78db984d976c4d
1 ## Test that llvm-readobj/llvm-readelf shows proper relocation type
2 ## names and values for mips target.
4 # RUN: yaml2obj %s -o %t-mips.o
5 # RUN: llvm-readobj -r --expand-relocs %t-mips.o | FileCheck %s
7 # CHECK: Type: R_MIPS_NONE (0)
8 # CHECK: Type: R_MIPS_16 (1)
9 # CHECK: Type: R_MIPS_32 (2)
10 # CHECK: Type: R_MIPS_REL32 (3)
11 # CHECK: Type: R_MIPS_26 (4)
12 # CHECK: Type: R_MIPS_HI16 (5)
13 # CHECK: Type: R_MIPS_LO16 (6)
14 # CHECK: Type: R_MIPS_GPREL16 (7)
15 # CHECK: Type: R_MIPS_LITERAL (8)
16 # CHECK: Type: R_MIPS_GOT16 (9)
17 # CHECK: Type: R_MIPS_PC16 (10)
18 # CHECK: Type: R_MIPS_CALL16 (11)
19 # CHECK: Type: R_MIPS_GPREL32 (12)
20 # CHECK: Type: R_MIPS_SHIFT5 (16)
21 # CHECK: Type: R_MIPS_SHIFT6 (17)
22 # CHECK: Type: R_MIPS_64 (18)
23 # CHECK: Type: R_MIPS_GOT_DISP (19)
24 # CHECK: Type: R_MIPS_GOT_PAGE (20)
25 # CHECK: Type: R_MIPS_GOT_OFST (21)
26 # CHECK: Type: R_MIPS_GOT_HI16 (22)
27 # CHECK: Type: R_MIPS_GOT_LO16 (23)
28 # CHECK: Type: R_MIPS_SUB (24)
29 # CHECK: Type: R_MIPS_INSERT_A (25)
30 # CHECK: Type: R_MIPS_INSERT_B (26)
31 # CHECK: Type: R_MIPS_DELETE (27)
32 # CHECK: Type: R_MIPS_HIGHER (28)
33 # CHECK: Type: R_MIPS_HIGHEST (29)
34 # CHECK: Type: R_MIPS_CALL_HI16 (30)
35 # CHECK: Type: R_MIPS_CALL_LO16 (31)
36 # CHECK: Type: R_MIPS_SCN_DISP (32)
37 # CHECK: Type: R_MIPS_REL16 (33)
38 # CHECK: Type: R_MIPS_ADD_IMMEDIATE (34)
39 # CHECK: Type: R_MIPS_PJUMP (35)
40 # CHECK: Type: R_MIPS_RELGOT (36)
41 # CHECK: Type: R_MIPS_JALR (37)
42 # CHECK: Type: R_MIPS_TLS_DTPMOD32 (38)
43 # CHECK: Type: R_MIPS_TLS_DTPREL32 (39)
44 # CHECK: Type: R_MIPS_TLS_DTPMOD64 (40)
45 # CHECK: Type: R_MIPS_TLS_DTPREL64 (41)
46 # CHECK: Type: R_MIPS_TLS_GD (42)
47 # CHECK: Type: R_MIPS_TLS_LDM (43)
48 # CHECK: Type: R_MIPS_TLS_DTPREL_HI16 (44)
49 # CHECK: Type: R_MIPS_TLS_DTPREL_LO16 (45)
50 # CHECK: Type: R_MIPS_TLS_GOTTPREL (46)
51 # CHECK: Type: R_MIPS_TLS_TPREL32 (47)
52 # CHECK: Type: R_MIPS_TLS_TPREL64 (48)
53 # CHECK: Type: R_MIPS_TLS_TPREL_HI16 (49)
54 # CHECK: Type: R_MIPS_TLS_TPREL_LO16 (50)
55 # CHECK: Type: R_MIPS_GLOB_DAT (51)
56 # CHECK: Type: R_MIPS_COPY (126)
57 # CHECK: Type: R_MIPS_JUMP_SLOT (127)
58 # CHECK: Type: R_MIPS_NUM (218)
60 --- !ELF
61 FileHeader:
62   Class:   ELFCLASS32
63   Data:    ELFDATA2MSB
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:         .rel.text
72     Type:         SHT_REL
73     Link:         .symtab
74     AddressAlign: 0x0000000000000004
75     EntSize:      0x0000000000000008
76     Info:         .text
77     Relocations:
78       - Offset: 0x0000000000000000
79         Type:   R_MIPS_NONE
80       - Offset: 0x0000000000000004
81         Type:   R_MIPS_16
82       - Offset: 0x0000000000000008
83         Type:   R_MIPS_32
84       - Offset: 0x000000000000000C
85         Type:   R_MIPS_REL32
86       - Offset: 0x0000000000000010
87         Type:   R_MIPS_26
88       - Offset: 0x0000000000000014
89         Type:   R_MIPS_HI16
90       - Offset: 0x0000000000000018
91         Type:   R_MIPS_LO16
92       - Offset: 0x000000000000001C
93         Type:   R_MIPS_GPREL16
94       - Offset: 0x0000000000000020
95         Type:   R_MIPS_LITERAL
96       - Offset: 0x0000000000000024
97         Type:   R_MIPS_GOT16
98       - Offset: 0x0000000000000028
99         Type:   R_MIPS_PC16
100       - Offset: 0x000000000000002C
101         Type:   R_MIPS_CALL16
102       - Offset: 0x0000000000000030
103         Type:   R_MIPS_GPREL32
104       - Offset: 0x0000000000000034
105         Type:   R_MIPS_SHIFT5
106       - Offset: 0x0000000000000038
107         Type:   R_MIPS_SHIFT6
108       - Offset: 0x000000000000003C
109         Type:   R_MIPS_64
110       - Offset: 0x0000000000000040
111         Type:   R_MIPS_GOT_DISP
112       - Offset: 0x0000000000000044
113         Type:   R_MIPS_GOT_PAGE
114       - Offset: 0x0000000000000048
115         Type:   R_MIPS_GOT_OFST
116       - Offset: 0x000000000000004C
117         Type:   R_MIPS_GOT_HI16
118       - Offset: 0x0000000000000050
119         Type:   R_MIPS_GOT_LO16
120       - Offset: 0x0000000000000054
121         Type:   R_MIPS_SUB
122       - Offset: 0x0000000000000058
123         Type:   R_MIPS_INSERT_A
124       - Offset: 0x000000000000005C
125         Type:   R_MIPS_INSERT_B
126       - Offset: 0x0000000000000060
127         Type:   R_MIPS_DELETE
128       - Offset: 0x0000000000000064
129         Type:   R_MIPS_HIGHER
130       - Offset: 0x0000000000000068
131         Type:   R_MIPS_HIGHEST
132       - Offset: 0x000000000000006C
133         Type:   R_MIPS_CALL_HI16
134       - Offset: 0x0000000000000070
135         Type:   R_MIPS_CALL_LO16
136       - Offset: 0x0000000000000074
137         Type:   R_MIPS_SCN_DISP
138       - Offset: 0x0000000000000078
139         Type:   R_MIPS_REL16
140       - Offset: 0x000000000000007C
141         Type:   R_MIPS_ADD_IMMEDIATE
142       - Offset: 0x0000000000000080
143         Type:   R_MIPS_PJUMP
144       - Offset: 0x0000000000000084
145         Type:   R_MIPS_RELGOT
146       - Offset: 0x0000000000000088
147         Type:   R_MIPS_JALR
148       - Offset: 0x000000000000008C
149         Type:   R_MIPS_TLS_DTPMOD32
150       - Offset: 0x0000000000000090
151         Type:   R_MIPS_TLS_DTPREL32
152       - Offset: 0x0000000000000094
153         Type:   R_MIPS_TLS_DTPMOD64
154       - Offset: 0x0000000000000098
155         Type:   R_MIPS_TLS_DTPREL64
156       - Offset: 0x000000000000009C
157         Type:   R_MIPS_TLS_GD
158       - Offset: 0x00000000000000A0
159         Type:   R_MIPS_TLS_LDM
160       - Offset: 0x00000000000000A4
161         Type:   R_MIPS_TLS_DTPREL_HI16
162       - Offset: 0x00000000000000A8
163         Type:   R_MIPS_TLS_DTPREL_LO16
164       - Offset: 0x00000000000000AC
165         Type:   R_MIPS_TLS_GOTTPREL
166       - Offset: 0x00000000000000B0
167         Type:   R_MIPS_TLS_TPREL32
168       - Offset: 0x00000000000000B4
169         Type:   R_MIPS_TLS_TPREL64
170       - Offset: 0x00000000000000B8
171         Type:   R_MIPS_TLS_TPREL_HI16
172       - Offset: 0x00000000000000BC
173         Type:   R_MIPS_TLS_TPREL_LO16
174       - Offset: 0x00000000000000C0
175         Type:   R_MIPS_GLOB_DAT
176       - Offset: 0x00000000000000C4
177         Type:   R_MIPS_COPY
178       - Offset: 0x00000000000000C8
179         Type:   R_MIPS_JUMP_SLOT
180       - Offset: 0x00000000000000CC
181         Type:   R_MIPS_NUM