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)
73 AddressAlign: 0x0000000000000004
74 EntSize: 0x0000000000000008
77 - Offset: 0x0000000000000000
79 - Offset: 0x0000000000000004
81 - Offset: 0x0000000000000008
83 - Offset: 0x000000000000000C
85 - Offset: 0x0000000000000010
87 - Offset: 0x0000000000000014
89 - Offset: 0x0000000000000018
91 - Offset: 0x000000000000001C
93 - Offset: 0x0000000000000020
95 - Offset: 0x0000000000000024
97 - Offset: 0x0000000000000028
99 - Offset: 0x000000000000002C
101 - Offset: 0x0000000000000030
103 - Offset: 0x0000000000000034
105 - Offset: 0x0000000000000038
107 - Offset: 0x000000000000003C
109 - Offset: 0x0000000000000040
110 Type: R_MIPS_GOT_DISP
111 - Offset: 0x0000000000000044
112 Type: R_MIPS_GOT_PAGE
113 - Offset: 0x0000000000000048
114 Type: R_MIPS_GOT_OFST
115 - Offset: 0x000000000000004C
116 Type: R_MIPS_GOT_HI16
117 - Offset: 0x0000000000000050
118 Type: R_MIPS_GOT_LO16
119 - Offset: 0x0000000000000054
121 - Offset: 0x0000000000000058
122 Type: R_MIPS_INSERT_A
123 - Offset: 0x000000000000005C
124 Type: R_MIPS_INSERT_B
125 - Offset: 0x0000000000000060
127 - Offset: 0x0000000000000064
129 - Offset: 0x0000000000000068
131 - Offset: 0x000000000000006C
132 Type: R_MIPS_CALL_HI16
133 - Offset: 0x0000000000000070
134 Type: R_MIPS_CALL_LO16
135 - Offset: 0x0000000000000074
136 Type: R_MIPS_SCN_DISP
137 - Offset: 0x0000000000000078
139 - Offset: 0x000000000000007C
140 Type: R_MIPS_ADD_IMMEDIATE
141 - Offset: 0x0000000000000080
143 - Offset: 0x0000000000000084
145 - Offset: 0x0000000000000088
147 - Offset: 0x000000000000008C
148 Type: R_MIPS_TLS_DTPMOD32
149 - Offset: 0x0000000000000090
150 Type: R_MIPS_TLS_DTPREL32
151 - Offset: 0x0000000000000094
152 Type: R_MIPS_TLS_DTPMOD64
153 - Offset: 0x0000000000000098
154 Type: R_MIPS_TLS_DTPREL64
155 - Offset: 0x000000000000009C
157 - Offset: 0x00000000000000A0
159 - Offset: 0x00000000000000A4
160 Type: R_MIPS_TLS_DTPREL_HI16
161 - Offset: 0x00000000000000A8
162 Type: R_MIPS_TLS_DTPREL_LO16
163 - Offset: 0x00000000000000AC
164 Type: R_MIPS_TLS_GOTTPREL
165 - Offset: 0x00000000000000B0
166 Type: R_MIPS_TLS_TPREL32
167 - Offset: 0x00000000000000B4
168 Type: R_MIPS_TLS_TPREL64
169 - Offset: 0x00000000000000B8
170 Type: R_MIPS_TLS_TPREL_HI16
171 - Offset: 0x00000000000000BC
172 Type: R_MIPS_TLS_TPREL_LO16
173 - Offset: 0x00000000000000C0
174 Type: R_MIPS_GLOB_DAT
175 - Offset: 0x00000000000000C4
177 - Offset: 0x00000000000000C8
178 Type: R_MIPS_JUMP_SLOT
179 - Offset: 0x00000000000000CC