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 ]
153 AddressAlign: 0x0000000000000004
154 EntSize: 0x0000000000000008
157 - Offset: 0x0000000000000000
159 - Offset: 0x0000000000000004
161 - Offset: 0x0000000000000008
163 - Offset: 0x000000000000000C
165 - Offset: 0x0000000000000010
166 Type: R_ARM_LDR_PC_G0
167 - Offset: 0x0000000000000014
169 - Offset: 0x0000000000000018
171 - Offset: 0x000000000000001C
173 - Offset: 0x0000000000000020
175 - Offset: 0x0000000000000024
177 - Offset: 0x0000000000000028
179 - Offset: 0x000000000000002C
181 - Offset: 0x0000000000000030
183 - Offset: 0x0000000000000034
185 - Offset: 0x0000000000000038
187 - Offset: 0x000000000000003C
189 - Offset: 0x0000000000000040
190 Type: R_ARM_THM_XPC22
191 - Offset: 0x0000000000000044
192 Type: R_ARM_TLS_DTPMOD32
193 - Offset: 0x0000000000000048
194 Type: R_ARM_TLS_DTPOFF32
195 - Offset: 0x000000000000004C
196 Type: R_ARM_TLS_TPOFF32
197 - Offset: 0x0000000000000050
199 - Offset: 0x0000000000000054
201 - Offset: 0x0000000000000058
202 Type: R_ARM_JUMP_SLOT
203 - Offset: 0x000000000000005C
205 - Offset: 0x0000000000000060
207 - Offset: 0x0000000000000064
208 Type: R_ARM_BASE_PREL
209 - Offset: 0x0000000000000068
211 - Offset: 0x000000000000006C
213 - Offset: 0x0000000000000070
215 - Offset: 0x0000000000000074
217 - Offset: 0x0000000000000078
218 Type: R_ARM_THM_JUMP24
219 - Offset: 0x000000000000007C
221 - Offset: 0x0000000000000080
222 Type: R_ARM_ALU_PCREL_7_0
223 - Offset: 0x0000000000000084
224 Type: R_ARM_ALU_PCREL_15_8
225 - Offset: 0x0000000000000088
226 Type: R_ARM_ALU_PCREL_23_15
227 - Offset: 0x000000000000008C
228 Type: R_ARM_LDR_SBREL_11_0_NC
229 - Offset: 0x0000000000000090
230 Type: R_ARM_ALU_SBREL_19_12_NC
231 - Offset: 0x0000000000000094
232 Type: R_ARM_ALU_SBREL_27_20_CK
233 - Offset: 0x0000000000000098
235 - Offset: 0x000000000000009C
237 - Offset: 0x00000000000000A0
239 - Offset: 0x00000000000000A4
241 - Offset: 0x00000000000000A8
243 - Offset: 0x00000000000000AC
244 Type: R_ARM_MOVW_ABS_NC
245 - Offset: 0x00000000000000B0
247 - Offset: 0x00000000000000B4
248 Type: R_ARM_MOVW_PREL_NC
249 - Offset: 0x00000000000000B8
250 Type: R_ARM_MOVT_PREL
251 - Offset: 0x00000000000000BC
252 Type: R_ARM_THM_MOVW_ABS_NC
253 - Offset: 0x00000000000000C0
254 Type: R_ARM_THM_MOVT_ABS
255 - Offset: 0x00000000000000C4
256 Type: R_ARM_THM_MOVW_PREL_NC
257 - Offset: 0x00000000000000C8
258 Type: R_ARM_THM_MOVT_PREL
259 - Offset: 0x00000000000000CC
260 Type: R_ARM_THM_JUMP19
261 - Offset: 0x00000000000000D0
262 Type: R_ARM_THM_JUMP6
263 - Offset: 0x00000000000000D4
264 Type: R_ARM_THM_ALU_PREL_11_0
265 - Offset: 0x00000000000000D8
267 - Offset: 0x00000000000000DC
268 Type: R_ARM_ABS32_NOI
269 - Offset: 0x00000000000000E0
270 Type: R_ARM_REL32_NOI
271 - Offset: 0x00000000000000E4
272 Type: R_ARM_ALU_PC_G0_NC
273 - Offset: 0x00000000000000E8
274 Type: R_ARM_ALU_PC_G0
275 - Offset: 0x00000000000000EC
276 Type: R_ARM_ALU_PC_G1_NC
277 - Offset: 0x00000000000000F0
278 Type: R_ARM_ALU_PC_G1
279 - Offset: 0x00000000000000F4
280 Type: R_ARM_ALU_PC_G2
281 - Offset: 0x00000000000000F8
282 Type: R_ARM_LDR_PC_G1
283 - Offset: 0x00000000000000FC
284 Type: R_ARM_LDR_PC_G2
285 - Offset: 0x0000000000000100
286 Type: R_ARM_LDRS_PC_G0
287 - Offset: 0x0000000000000104
288 Type: R_ARM_LDRS_PC_G1
289 - Offset: 0x0000000000000108
290 Type: R_ARM_LDRS_PC_G2
291 - Offset: 0x000000000000010C
292 Type: R_ARM_LDC_PC_G0
293 - Offset: 0x0000000000000110
294 Type: R_ARM_LDC_PC_G1
295 - Offset: 0x0000000000000114
296 Type: R_ARM_LDC_PC_G2
297 - Offset: 0x0000000000000118
298 Type: R_ARM_ALU_SB_G0_NC
299 - Offset: 0x000000000000011C
300 Type: R_ARM_ALU_SB_G0
301 - Offset: 0x0000000000000120
302 Type: R_ARM_ALU_SB_G1_NC
303 - Offset: 0x0000000000000124
304 Type: R_ARM_ALU_SB_G1
305 - Offset: 0x0000000000000128
306 Type: R_ARM_ALU_SB_G2
307 - Offset: 0x000000000000012C
308 Type: R_ARM_LDR_SB_G0
309 - Offset: 0x0000000000000130
310 Type: R_ARM_LDR_SB_G1
311 - Offset: 0x0000000000000134
312 Type: R_ARM_LDR_SB_G2
313 - Offset: 0x0000000000000138
314 Type: R_ARM_LDRS_SB_G0
315 - Offset: 0x000000000000013C
316 Type: R_ARM_LDRS_SB_G1
317 - Offset: 0x0000000000000140
318 Type: R_ARM_LDRS_SB_G2
319 - Offset: 0x0000000000000144
320 Type: R_ARM_LDC_SB_G0
321 - Offset: 0x0000000000000148
322 Type: R_ARM_LDC_SB_G1
323 - Offset: 0x000000000000014C
324 Type: R_ARM_LDC_SB_G2
325 - Offset: 0x0000000000000150
326 Type: R_ARM_MOVW_BREL_NC
327 - Offset: 0x0000000000000154
328 Type: R_ARM_MOVT_BREL
329 - Offset: 0x0000000000000158
330 Type: R_ARM_MOVW_BREL
331 - Offset: 0x000000000000015C
332 Type: R_ARM_THM_MOVW_BREL_NC
333 - Offset: 0x0000000000000160
334 Type: R_ARM_THM_MOVT_BREL
335 - Offset: 0x0000000000000164
336 Type: R_ARM_THM_MOVW_BREL
337 - Offset: 0x0000000000000168
338 Type: R_ARM_TLS_GOTDESC
339 - Offset: 0x000000000000016C
341 - Offset: 0x0000000000000170
342 Type: R_ARM_TLS_DESCSEQ
343 - Offset: 0x0000000000000174
344 Type: R_ARM_THM_TLS_CALL
345 - Offset: 0x0000000000000178
346 Type: R_ARM_PLT32_ABS
347 - Offset: 0x000000000000017C
349 - Offset: 0x0000000000000180
351 - Offset: 0x0000000000000184
352 Type: R_ARM_GOT_BREL12
353 - Offset: 0x0000000000000188
355 - Offset: 0x000000000000018C
357 - Offset: 0x0000000000000190
358 Type: R_ARM_GNU_VTENTRY
359 - Offset: 0x0000000000000194
360 Type: R_ARM_GNU_VTINHERIT
361 - Offset: 0x0000000000000198
362 Type: R_ARM_THM_JUMP11
363 - Offset: 0x000000000000019C
364 Type: R_ARM_THM_JUMP8
365 - Offset: 0x00000000000001A0
367 - Offset: 0x00000000000001A4
368 Type: R_ARM_TLS_LDM32
369 - Offset: 0x00000000000001A8
370 Type: R_ARM_TLS_LDO32
371 - Offset: 0x00000000000001AC
373 - Offset: 0x00000000000001B0
375 - Offset: 0x00000000000001B4
376 Type: R_ARM_TLS_LDO12
377 - Offset: 0x00000000000001B8
379 - Offset: 0x00000000000001BC
380 Type: R_ARM_TLS_IE12GP
381 - Offset: 0x00000000000001C0
382 Type: R_ARM_PRIVATE_0
383 - Offset: 0x00000000000001C4
384 Type: R_ARM_PRIVATE_1
385 - Offset: 0x00000000000001C8
386 Type: R_ARM_PRIVATE_2
387 - Offset: 0x00000000000001CC
388 Type: R_ARM_PRIVATE_3
389 - Offset: 0x00000000000001D0
390 Type: R_ARM_PRIVATE_4
391 - Offset: 0x00000000000001D4
392 Type: R_ARM_PRIVATE_5
393 - Offset: 0x00000000000001D8
394 Type: R_ARM_PRIVATE_6
395 - Offset: 0x00000000000001DC
396 Type: R_ARM_PRIVATE_7
397 - Offset: 0x00000000000001E0
398 Type: R_ARM_PRIVATE_8
399 - Offset: 0x00000000000001E4
400 Type: R_ARM_PRIVATE_9
401 - Offset: 0x00000000000001E8
402 Type: R_ARM_PRIVATE_10
403 - Offset: 0x00000000000001EC
404 Type: R_ARM_PRIVATE_11
405 - Offset: 0x00000000000001F0
406 Type: R_ARM_PRIVATE_12
407 - Offset: 0x00000000000001F4
408 Type: R_ARM_PRIVATE_13
409 - Offset: 0x00000000000001F8
410 Type: R_ARM_PRIVATE_14
411 - Offset: 0x00000000000001FC
412 Type: R_ARM_PRIVATE_15
413 - Offset: 0x0000000000000200
415 - Offset: 0x0000000000000204
416 Type: R_ARM_THM_TLS_DESCSEQ16
417 - Offset: 0x0000000000000208
418 Type: R_ARM_THM_TLS_DESCSEQ32
419 - Offset: 0x000000000000020C
420 Type: R_ARM_IRELATIVE