1 ## Test that llvm-readobj/llvm-readelf shows proper relocation type
2 ## names and values for arm target.
4 # RUN: yaml2obj %s -o %t-arm.o
5 # RUN: llvm-readobj -r --expand-relocs %t-arm.o | FileCheck %s
7 # CHECK: Type: R_ARM_NONE (0)
8 # CHECK: Type: R_ARM_PC24 (1)
9 # CHECK: Type: R_ARM_ABS32 (2)
10 # CHECK: Type: R_ARM_REL32 (3)
11 # CHECK: Type: R_ARM_LDR_PC_G0 (4)
12 # CHECK: Type: R_ARM_ABS16 (5)
13 # CHECK: Type: R_ARM_ABS12 (6)
14 # CHECK: Type: R_ARM_THM_ABS5 (7)
15 # CHECK: Type: R_ARM_ABS8 (8)
16 # CHECK: Type: R_ARM_SBREL32 (9)
17 # CHECK: Type: R_ARM_THM_CALL (10)
18 # CHECK: Type: R_ARM_THM_PC8 (11)
19 # CHECK: Type: R_ARM_BREL_ADJ (12)
20 # CHECK: Type: R_ARM_TLS_DESC (13)
21 # CHECK: Type: R_ARM_THM_SWI8 (14)
22 # CHECK: Type: R_ARM_XPC25 (15)
23 # CHECK: Type: R_ARM_THM_XPC22 (16)
24 # CHECK: Type: R_ARM_TLS_DTPMOD32 (17)
25 # CHECK: Type: R_ARM_TLS_DTPOFF32 (18)
26 # CHECK: Type: R_ARM_TLS_TPOFF32 (19)
27 # CHECK: Type: R_ARM_COPY (20)
28 # CHECK: Type: R_ARM_GLOB_DAT (21)
29 # CHECK: Type: R_ARM_JUMP_SLOT (22)
30 # CHECK: Type: R_ARM_RELATIVE (23)
31 # CHECK: Type: R_ARM_GOTOFF32 (24)
32 # CHECK: Type: R_ARM_BASE_PREL (25)
33 # CHECK: Type: R_ARM_GOT_BREL (26)
34 # CHECK: Type: R_ARM_CALL (28)
35 # CHECK: Type: R_ARM_JUMP24 (29)
36 # CHECK: Type: R_ARM_THM_JUMP24 (30)
37 # CHECK: Type: R_ARM_BASE_ABS (31)
38 # CHECK: Type: R_ARM_ALU_PCREL_7_0 (32)
39 # CHECK: Type: R_ARM_ALU_PCREL_15_8 (33)
40 # CHECK: Type: R_ARM_ALU_PCREL_23_15 (34)
41 # CHECK: Type: R_ARM_LDR_SBREL_11_0_NC (35)
42 # CHECK: Type: R_ARM_ALU_SBREL_19_12_NC (36)
43 # CHECK: Type: R_ARM_ALU_SBREL_27_20_CK (37)
44 # CHECK: Type: R_ARM_TARGET1 (38)
45 # CHECK: Type: R_ARM_SBREL31 (39)
46 # CHECK: Type: R_ARM_V4BX (40)
47 # CHECK: Type: R_ARM_TARGET2 (41)
48 # CHECK: Type: R_ARM_PREL31 (42)
49 # CHECK: Type: R_ARM_MOVW_ABS_NC (43)
50 # CHECK: Type: R_ARM_MOVT_ABS (44)
51 # CHECK: Type: R_ARM_MOVW_PREL_NC (45)
52 # CHECK: Type: R_ARM_MOVT_PREL (46)
53 # CHECK: Type: R_ARM_THM_MOVW_ABS_NC (47)
54 # CHECK: Type: R_ARM_THM_MOVT_ABS (48)
55 # CHECK: Type: R_ARM_THM_MOVW_PREL_NC (49)
56 # CHECK: Type: R_ARM_THM_MOVT_PREL (50)
57 # CHECK: Type: R_ARM_THM_JUMP19 (51)
58 # CHECK: Type: R_ARM_THM_JUMP6 (52)
59 # CHECK: Type: R_ARM_THM_ALU_PREL_11_0 (53)
60 # CHECK: Type: R_ARM_THM_PC12 (54)
61 # CHECK: Type: R_ARM_ABS32_NOI (55)
62 # CHECK: Type: R_ARM_REL32_NOI (56)
63 # CHECK: Type: R_ARM_ALU_PC_G0_NC (57)
64 # CHECK: Type: R_ARM_ALU_PC_G0 (58)
65 # CHECK: Type: R_ARM_ALU_PC_G1_NC (59)
66 # CHECK: Type: R_ARM_ALU_PC_G1 (60)
67 # CHECK: Type: R_ARM_ALU_PC_G2 (61)
68 # CHECK: Type: R_ARM_LDR_PC_G1 (62)
69 # CHECK: Type: R_ARM_LDR_PC_G2 (63)
70 # CHECK: Type: R_ARM_LDRS_PC_G0 (64)
71 # CHECK: Type: R_ARM_LDRS_PC_G1 (65)
72 # CHECK: Type: R_ARM_LDRS_PC_G2 (66)
73 # CHECK: Type: R_ARM_LDC_PC_G0 (67)
74 # CHECK: Type: R_ARM_LDC_PC_G1 (68)
75 # CHECK: Type: R_ARM_LDC_PC_G2 (69)
76 # CHECK: Type: R_ARM_ALU_SB_G0_NC (70)
77 # CHECK: Type: R_ARM_ALU_SB_G0 (71)
78 # CHECK: Type: R_ARM_ALU_SB_G1_NC (72)
79 # CHECK: Type: R_ARM_ALU_SB_G1 (73)
80 # CHECK: Type: R_ARM_ALU_SB_G2 (74)
81 # CHECK: Type: R_ARM_LDR_SB_G0 (75)
82 # CHECK: Type: R_ARM_LDR_SB_G1 (76)
83 # CHECK: Type: R_ARM_LDR_SB_G2 (77)
84 # CHECK: Type: R_ARM_LDRS_SB_G0 (78)
85 # CHECK: Type: R_ARM_LDRS_SB_G1 (79)
86 # CHECK: Type: R_ARM_LDRS_SB_G2 (80)
87 # CHECK: Type: R_ARM_LDC_SB_G0 (81)
88 # CHECK: Type: R_ARM_LDC_SB_G1 (82)
89 # CHECK: Type: R_ARM_LDC_SB_G2 (83)
90 # CHECK: Type: R_ARM_MOVW_BREL_NC (84)
91 # CHECK: Type: R_ARM_MOVT_BREL (85)
92 # CHECK: Type: R_ARM_MOVW_BREL (86)
93 # CHECK: Type: R_ARM_THM_MOVW_BREL_NC (87)
94 # CHECK: Type: R_ARM_THM_MOVT_BREL (88)
95 # CHECK: Type: R_ARM_THM_MOVW_BREL (89)
96 # CHECK: Type: R_ARM_TLS_GOTDESC (90)
97 # CHECK: Type: R_ARM_TLS_CALL (91)
98 # CHECK: Type: R_ARM_TLS_DESCSEQ (92)
99 # CHECK: Type: R_ARM_THM_TLS_CALL (93)
100 # CHECK: Type: R_ARM_PLT32_ABS (94)
101 # CHECK: Type: R_ARM_GOT_ABS (95)
102 # CHECK: Type: R_ARM_GOT_PREL (96)
103 # CHECK: Type: R_ARM_GOT_BREL12 (97)
104 # CHECK: Type: R_ARM_GOTOFF12 (98)
105 # CHECK: Type: R_ARM_GOTRELAX (99)
106 # CHECK: Type: R_ARM_GNU_VTENTRY (100)
107 # CHECK: Type: R_ARM_GNU_VTINHERIT (101)
108 # CHECK: Type: R_ARM_THM_JUMP11 (102)
109 # CHECK: Type: R_ARM_THM_JUMP8 (103)
110 # CHECK: Type: R_ARM_TLS_GD32 (104)
111 # CHECK: Type: R_ARM_TLS_LDM32 (105)
112 # CHECK: Type: R_ARM_TLS_LDO32 (106)
113 # CHECK: Type: R_ARM_TLS_IE32 (107)
114 # CHECK: Type: R_ARM_TLS_LE32 (108)
115 # CHECK: Type: R_ARM_TLS_LDO12 (109)
116 # CHECK: Type: R_ARM_TLS_LE12 (110)
117 # CHECK: Type: R_ARM_TLS_IE12GP (111)
118 # CHECK: Type: R_ARM_PRIVATE_0 (112)
119 # CHECK: Type: R_ARM_PRIVATE_1 (113)
120 # CHECK: Type: R_ARM_PRIVATE_2 (114)
121 # CHECK: Type: R_ARM_PRIVATE_3 (115)
122 # CHECK: Type: R_ARM_PRIVATE_4 (116)
123 # CHECK: Type: R_ARM_PRIVATE_5 (117)
124 # CHECK: Type: R_ARM_PRIVATE_6 (118)
125 # CHECK: Type: R_ARM_PRIVATE_7 (119)
126 # CHECK: Type: R_ARM_PRIVATE_8 (120)
127 # CHECK: Type: R_ARM_PRIVATE_9 (121)
128 # CHECK: Type: R_ARM_PRIVATE_10 (122)
129 # CHECK: Type: R_ARM_PRIVATE_11 (123)
130 # CHECK: Type: R_ARM_PRIVATE_12 (124)
131 # CHECK: Type: R_ARM_PRIVATE_13 (125)
132 # CHECK: Type: R_ARM_PRIVATE_14 (126)
133 # CHECK: Type: R_ARM_PRIVATE_15 (127)
134 # CHECK: Type: R_ARM_ME_TOO (128)
135 # CHECK: Type: R_ARM_THM_TLS_DESCSEQ16 (129)
136 # CHECK: Type: R_ARM_THM_TLS_DESCSEQ32 (130)
137 # CHECK: Type: R_ARM_IRELATIVE (160)
145 Flags: [ EF_ARM_EABI_VER5 ]
152 AddressAlign: 0x0000000000000004
153 EntSize: 0x0000000000000008
156 - Offset: 0x0000000000000000
158 - Offset: 0x0000000000000004
160 - Offset: 0x0000000000000008
162 - Offset: 0x000000000000000C
164 - Offset: 0x0000000000000010
165 Type: R_ARM_LDR_PC_G0
166 - Offset: 0x0000000000000014
168 - Offset: 0x0000000000000018
170 - Offset: 0x000000000000001C
172 - Offset: 0x0000000000000020
174 - Offset: 0x0000000000000024
176 - Offset: 0x0000000000000028
178 - Offset: 0x000000000000002C
180 - Offset: 0x0000000000000030
182 - Offset: 0x0000000000000034
184 - Offset: 0x0000000000000038
186 - Offset: 0x000000000000003C
188 - Offset: 0x0000000000000040
189 Type: R_ARM_THM_XPC22
190 - Offset: 0x0000000000000044
191 Type: R_ARM_TLS_DTPMOD32
192 - Offset: 0x0000000000000048
193 Type: R_ARM_TLS_DTPOFF32
194 - Offset: 0x000000000000004C
195 Type: R_ARM_TLS_TPOFF32
196 - Offset: 0x0000000000000050
198 - Offset: 0x0000000000000054
200 - Offset: 0x0000000000000058
201 Type: R_ARM_JUMP_SLOT
202 - Offset: 0x000000000000005C
204 - Offset: 0x0000000000000060
206 - Offset: 0x0000000000000064
207 Type: R_ARM_BASE_PREL
208 - Offset: 0x0000000000000068
210 - Offset: 0x000000000000006C
212 - Offset: 0x0000000000000070
214 - Offset: 0x0000000000000074
216 - Offset: 0x0000000000000078
217 Type: R_ARM_THM_JUMP24
218 - Offset: 0x000000000000007C
220 - Offset: 0x0000000000000080
221 Type: R_ARM_ALU_PCREL_7_0
222 - Offset: 0x0000000000000084
223 Type: R_ARM_ALU_PCREL_15_8
224 - Offset: 0x0000000000000088
225 Type: R_ARM_ALU_PCREL_23_15
226 - Offset: 0x000000000000008C
227 Type: R_ARM_LDR_SBREL_11_0_NC
228 - Offset: 0x0000000000000090
229 Type: R_ARM_ALU_SBREL_19_12_NC
230 - Offset: 0x0000000000000094
231 Type: R_ARM_ALU_SBREL_27_20_CK
232 - Offset: 0x0000000000000098
234 - Offset: 0x000000000000009C
236 - Offset: 0x00000000000000A0
238 - Offset: 0x00000000000000A4
240 - Offset: 0x00000000000000A8
242 - Offset: 0x00000000000000AC
243 Type: R_ARM_MOVW_ABS_NC
244 - Offset: 0x00000000000000B0
246 - Offset: 0x00000000000000B4
247 Type: R_ARM_MOVW_PREL_NC
248 - Offset: 0x00000000000000B8
249 Type: R_ARM_MOVT_PREL
250 - Offset: 0x00000000000000BC
251 Type: R_ARM_THM_MOVW_ABS_NC
252 - Offset: 0x00000000000000C0
253 Type: R_ARM_THM_MOVT_ABS
254 - Offset: 0x00000000000000C4
255 Type: R_ARM_THM_MOVW_PREL_NC
256 - Offset: 0x00000000000000C8
257 Type: R_ARM_THM_MOVT_PREL
258 - Offset: 0x00000000000000CC
259 Type: R_ARM_THM_JUMP19
260 - Offset: 0x00000000000000D0
261 Type: R_ARM_THM_JUMP6
262 - Offset: 0x00000000000000D4
263 Type: R_ARM_THM_ALU_PREL_11_0
264 - Offset: 0x00000000000000D8
266 - Offset: 0x00000000000000DC
267 Type: R_ARM_ABS32_NOI
268 - Offset: 0x00000000000000E0
269 Type: R_ARM_REL32_NOI
270 - Offset: 0x00000000000000E4
271 Type: R_ARM_ALU_PC_G0_NC
272 - Offset: 0x00000000000000E8
273 Type: R_ARM_ALU_PC_G0
274 - Offset: 0x00000000000000EC
275 Type: R_ARM_ALU_PC_G1_NC
276 - Offset: 0x00000000000000F0
277 Type: R_ARM_ALU_PC_G1
278 - Offset: 0x00000000000000F4
279 Type: R_ARM_ALU_PC_G2
280 - Offset: 0x00000000000000F8
281 Type: R_ARM_LDR_PC_G1
282 - Offset: 0x00000000000000FC
283 Type: R_ARM_LDR_PC_G2
284 - Offset: 0x0000000000000100
285 Type: R_ARM_LDRS_PC_G0
286 - Offset: 0x0000000000000104
287 Type: R_ARM_LDRS_PC_G1
288 - Offset: 0x0000000000000108
289 Type: R_ARM_LDRS_PC_G2
290 - Offset: 0x000000000000010C
291 Type: R_ARM_LDC_PC_G0
292 - Offset: 0x0000000000000110
293 Type: R_ARM_LDC_PC_G1
294 - Offset: 0x0000000000000114
295 Type: R_ARM_LDC_PC_G2
296 - Offset: 0x0000000000000118
297 Type: R_ARM_ALU_SB_G0_NC
298 - Offset: 0x000000000000011C
299 Type: R_ARM_ALU_SB_G0
300 - Offset: 0x0000000000000120
301 Type: R_ARM_ALU_SB_G1_NC
302 - Offset: 0x0000000000000124
303 Type: R_ARM_ALU_SB_G1
304 - Offset: 0x0000000000000128
305 Type: R_ARM_ALU_SB_G2
306 - Offset: 0x000000000000012C
307 Type: R_ARM_LDR_SB_G0
308 - Offset: 0x0000000000000130
309 Type: R_ARM_LDR_SB_G1
310 - Offset: 0x0000000000000134
311 Type: R_ARM_LDR_SB_G2
312 - Offset: 0x0000000000000138
313 Type: R_ARM_LDRS_SB_G0
314 - Offset: 0x000000000000013C
315 Type: R_ARM_LDRS_SB_G1
316 - Offset: 0x0000000000000140
317 Type: R_ARM_LDRS_SB_G2
318 - Offset: 0x0000000000000144
319 Type: R_ARM_LDC_SB_G0
320 - Offset: 0x0000000000000148
321 Type: R_ARM_LDC_SB_G1
322 - Offset: 0x000000000000014C
323 Type: R_ARM_LDC_SB_G2
324 - Offset: 0x0000000000000150
325 Type: R_ARM_MOVW_BREL_NC
326 - Offset: 0x0000000000000154
327 Type: R_ARM_MOVT_BREL
328 - Offset: 0x0000000000000158
329 Type: R_ARM_MOVW_BREL
330 - Offset: 0x000000000000015C
331 Type: R_ARM_THM_MOVW_BREL_NC
332 - Offset: 0x0000000000000160
333 Type: R_ARM_THM_MOVT_BREL
334 - Offset: 0x0000000000000164
335 Type: R_ARM_THM_MOVW_BREL
336 - Offset: 0x0000000000000168
337 Type: R_ARM_TLS_GOTDESC
338 - Offset: 0x000000000000016C
340 - Offset: 0x0000000000000170
341 Type: R_ARM_TLS_DESCSEQ
342 - Offset: 0x0000000000000174
343 Type: R_ARM_THM_TLS_CALL
344 - Offset: 0x0000000000000178
345 Type: R_ARM_PLT32_ABS
346 - Offset: 0x000000000000017C
348 - Offset: 0x0000000000000180
350 - Offset: 0x0000000000000184
351 Type: R_ARM_GOT_BREL12
352 - Offset: 0x0000000000000188
354 - Offset: 0x000000000000018C
356 - Offset: 0x0000000000000190
357 Type: R_ARM_GNU_VTENTRY
358 - Offset: 0x0000000000000194
359 Type: R_ARM_GNU_VTINHERIT
360 - Offset: 0x0000000000000198
361 Type: R_ARM_THM_JUMP11
362 - Offset: 0x000000000000019C
363 Type: R_ARM_THM_JUMP8
364 - Offset: 0x00000000000001A0
366 - Offset: 0x00000000000001A4
367 Type: R_ARM_TLS_LDM32
368 - Offset: 0x00000000000001A8
369 Type: R_ARM_TLS_LDO32
370 - Offset: 0x00000000000001AC
372 - Offset: 0x00000000000001B0
374 - Offset: 0x00000000000001B4
375 Type: R_ARM_TLS_LDO12
376 - Offset: 0x00000000000001B8
378 - Offset: 0x00000000000001BC
379 Type: R_ARM_TLS_IE12GP
380 - Offset: 0x00000000000001C0
381 Type: R_ARM_PRIVATE_0
382 - Offset: 0x00000000000001C4
383 Type: R_ARM_PRIVATE_1
384 - Offset: 0x00000000000001C8
385 Type: R_ARM_PRIVATE_2
386 - Offset: 0x00000000000001CC
387 Type: R_ARM_PRIVATE_3
388 - Offset: 0x00000000000001D0
389 Type: R_ARM_PRIVATE_4
390 - Offset: 0x00000000000001D4
391 Type: R_ARM_PRIVATE_5
392 - Offset: 0x00000000000001D8
393 Type: R_ARM_PRIVATE_6
394 - Offset: 0x00000000000001DC
395 Type: R_ARM_PRIVATE_7
396 - Offset: 0x00000000000001E0
397 Type: R_ARM_PRIVATE_8
398 - Offset: 0x00000000000001E4
399 Type: R_ARM_PRIVATE_9
400 - Offset: 0x00000000000001E8
401 Type: R_ARM_PRIVATE_10
402 - Offset: 0x00000000000001EC
403 Type: R_ARM_PRIVATE_11
404 - Offset: 0x00000000000001F0
405 Type: R_ARM_PRIVATE_12
406 - Offset: 0x00000000000001F4
407 Type: R_ARM_PRIVATE_13
408 - Offset: 0x00000000000001F8
409 Type: R_ARM_PRIVATE_14
410 - Offset: 0x00000000000001FC
411 Type: R_ARM_PRIVATE_15
412 - Offset: 0x0000000000000200
414 - Offset: 0x0000000000000204
415 Type: R_ARM_THM_TLS_DESCSEQ16
416 - Offset: 0x0000000000000208
417 Type: R_ARM_THM_TLS_DESCSEQ32
418 - Offset: 0x000000000000020C
419 Type: R_ARM_IRELATIVE