llvm.org GIT mirror llvm / 8ed205f
Add extensive relocation tests for llvm-readobj This test ensures that relocation type names returned by libObject match the raw relocation type value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179360 91177308-0d34-0410-b5e6-96231b3b80d8 Nico Rieck 7 years ago
14 changed file(s) with 1749 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 #!/usr/bin/env python
1
2 # Generates ELF, COFF and MachO object files for different architectures
3 # containing all relocations:
4 #
5 # ELF: i386, x86_64, ppc64, aarch64, arm, mips, mips64el
6 # COFF: i386, x86_64
7 # MachO: i386, x86_64, arm
8 # (see end of file for triples)
9 #
10 # To simplify generation, object files are generated with just the proper
11 # number of relocations through repeated instructions. Afterwards, the
12 # relocations in the object file are patched to their proper value.
13
14 import operator
15 import shutil
16 import StringIO
17 import struct
18 import subprocess
19 import sys
20
21 class EnumType(type):
22 def __init__(self, name, bases = (), attributes = {}):
23 super(EnumType, self).__init__(name, bases, attributes)
24
25 type.__setattr__(self, '_map', {})
26 type.__setattr__(self, '_nameMap', {})
27
28 for symbol in attributes:
29 if symbol.startswith('__') or symbol.endswith('__'):
30 continue
31
32 value = attributes[symbol]
33
34 # MyEnum.symbol == value
35 type.__setattr__(self, symbol, value)
36 self._nameMap[symbol] = value
37
38 # The first symbol with the given value is authoritative.
39 if not (value in self._map):
40 # MyEnum[value] == symbol
41 self._map[value] = symbol
42
43 # Not supported (Enums are immutable).
44 def __setattr__(self, name, value):
45 raise NotSupportedException, self.__setattr__
46
47 # Not supported (Enums are immutable).
48 def __delattr__(self, name):
49 raise NotSupportedException, self.__delattr__
50
51 # Gets the enum symbol for the specified value.
52 def __getitem__(self, value):
53 symbol = self._map.get(value)
54 if symbol is None:
55 raise KeyError, value
56 return symbol
57
58 # Gets the enum symbol for the specified value or none.
59 def lookup(self, value):
60 symbol = self._map.get(value)
61 return symbol
62
63 # Not supported (Enums are immutable).
64 def __setitem__(self, value, symbol):
65 raise NotSupportedException, self.__setitem__
66
67 # Not supported (Enums are immutable).
68 def __delitem__(self, value):
69 raise NotSupportedException, self.__delitem__
70
71 def entries(self):
72 # sort by (value, name)
73 def makeKey(item):
74 return (item[1], item[0])
75 e = []
76 for pair in sorted(self._nameMap.iteritems(), key=makeKey):
77 e.append(pair)
78 return e
79
80 def __iter__(self):
81 for e in self.entries():
82 yield e
83
84 Enum = EnumType('Enum', (), {})
85
86 class BinaryReader:
87 def __init__(self, path):
88 self.file = open(path, "r+b", 0)
89 self.isLSB = None
90 self.is64Bit = None
91 self.isN64 = False
92
93 def tell(self):
94 return self.file.tell()
95
96 def seek(self, pos):
97 self.file.seek(pos)
98
99 def read(self, N):
100 data = self.file.read(N)
101 if len(data) != N:
102 raise ValueError, "Out of data!"
103 return data
104
105 def int8(self):
106 return ord(self.read(1))
107
108 def uint8(self):
109 return ord(self.read(1))
110
111 def int16(self):
112 return struct.unpack('><'[self.isLSB] + 'h', self.read(2))[0]
113
114 def uint16(self):
115 return struct.unpack('><'[self.isLSB] + 'H', self.read(2))[0]
116
117 def int32(self):
118 return struct.unpack('><'[self.isLSB] + 'i', self.read(4))[0]
119
120 def uint32(self):
121 return struct.unpack('><'[self.isLSB] + 'I', self.read(4))[0]
122
123 def int64(self):
124 return struct.unpack('><'[self.isLSB] + 'q', self.read(8))[0]
125
126 def uint64(self):
127 return struct.unpack('><'[self.isLSB] + 'Q', self.read(8))[0]
128
129 def writeUInt8(self, value):
130 self.file.write(struct.pack('><'[self.isLSB] + 'B', value))
131
132 def writeUInt16(self, value):
133 self.file.write(struct.pack('><'[self.isLSB] + 'H', value))
134
135 def writeUInt32(self, value):
136 self.file.write(struct.pack('><'[self.isLSB] + 'I', value))
137
138 def writeUInt64(self, value):
139 self.file.write(struct.pack('><'[self.isLSB] + 'Q', value))
140
141 def word(self):
142 if self.is64Bit:
143 return self.uint64()
144 else:
145 return self.uint32()
146
147 def writeWord(self, value):
148 if self.is64Bit:
149 self.writeUInt64(value)
150 else:
151 self.writeUInt32(value)
152
153 class StringTable:
154 def __init__(self, strings):
155 self.string_table = strings
156
157 def __getitem__(self, index):
158 end = self.string_table.index('\x00', index)
159 return self.string_table[index:end]
160
161 class ElfSection:
162 def __init__(self, f):
163 self.sh_name = f.uint32()
164 self.sh_type = f.uint32()
165 self.sh_flags = f.word()
166 self.sh_addr = f.word()
167 self.sh_offset = f.word()
168 self.sh_size = f.word()
169 self.sh_link = f.uint32()
170 self.sh_info = f.uint32()
171 self.sh_addralign = f.word()
172 self.sh_entsize = f.word()
173
174 def patch(self, f, relocs):
175 if self.sh_type == 4 or self.sh_type == 9: # SHT_RELA / SHT_REL
176 self.patchRelocs(f, relocs)
177
178 def patchRelocs(self, f, relocs):
179 entries = self.sh_size // self.sh_entsize
180
181 for index in range(entries):
182 f.seek(self.sh_offset + index * self.sh_entsize)
183 r_offset = f.word()
184
185 if index < len(relocs):
186 ri = index
187 else:
188 ri = 0
189
190 if f.isN64:
191 r_sym = f.uint32()
192 r_ssym = f.uint8()
193 f.seek(f.tell())
194 f.writeUInt8(relocs[ri][1])
195 f.writeUInt8(relocs[ri][1])
196 f.writeUInt8(relocs[ri][1])
197 else:
198 pos = f.tell()
199 r_info = f.word()
200
201 r_type = relocs[ri][1]
202 if f.is64Bit:
203 r_info = (r_info & 0xFFFFFFFF00000000) | (r_type & 0xFFFFFFFF)
204 else:
205 r_info = (r_info & 0xFF00) | (r_type & 0xFF)
206
207 print(" %s" % relocs[ri][0])
208 f.seek(pos)
209 f.writeWord(r_info)
210
211
212 class CoffSection:
213 def __init__(self, f):
214 self.raw_name = f.read(8)
215 self.virtual_size = f.uint32()
216 self.virtual_address = f.uint32()
217 self.raw_data_size = f.uint32()
218 self.pointer_to_raw_data = f.uint32()
219 self.pointer_to_relocations = f.uint32()
220 self.pointer_to_line_numbers = f.uint32()
221 self.relocation_count = f.uint16()
222 self.line_number_count = f.uint16()
223 self.characteristics = f.uint32()
224
225
226 def compileAsm(filename, triple, src):
227 cmd = ["llvm-mc", "-triple=" + triple, "-filetype=obj", "-o", filename]
228 print(" Running: " + " ".join(cmd))
229 p = subprocess.Popen(cmd, stdin=subprocess.PIPE)
230 p.communicate(input=src)
231 p.wait()
232
233 def compileIR(filename, triple, src):
234 cmd = ["llc", "-mtriple=" + triple, "-filetype=obj", "-o", filename]
235 print(" Running: " + " ".join(cmd))
236 p = subprocess.Popen(cmd, stdin=subprocess.PIPE)
237 p.communicate(input=src)
238 p.wait()
239
240
241 def craftElf(filename, triple, relocs, dummyReloc):
242 print("Crafting " + filename + " for " + triple)
243 if type(dummyReloc) is tuple:
244 preSrc, dummyReloc, relocsPerDummy = dummyReloc
245 src = preSrc + "\n"
246 for i in range((len(relocs) + relocsPerDummy - 1) / relocsPerDummy):
247 src += dummyReloc.format(i) + "\n"
248 compileIR(filename, triple, src)
249 else:
250 src = (dummyReloc + "\n") * len(relocs)
251 compileAsm(filename, triple, src)
252
253 print(" Patching relocations...")
254 patchElf(filename, relocs)
255
256 def patchElf(path, relocs):
257 f = BinaryReader(path)
258
259 magic = f.read(4)
260 assert magic == '\x7FELF'
261
262 fileclass = f.uint8()
263 if fileclass == 1:
264 f.is64Bit = False
265 elif fileclass == 2:
266 f.is64Bit = True
267 else:
268 raise ValueError, "Unknown file class %x" % fileclass
269
270 byteordering = f.uint8()
271 if byteordering == 1:
272 f.isLSB = True
273 elif byteordering == 2:
274 f.isLSB = False
275 else:
276 raise ValueError, "Unknown byte ordering %x" % byteordering
277
278 f.seek(18)
279 e_machine = f.uint16()
280 if e_machine == 0x0008 and f.is64Bit: # EM_MIPS && 64 bit
281 f.isN64 = True
282
283 e_version = f.uint32()
284 e_entry = f.word()
285 e_phoff = f.word()
286 e_shoff = f.word()
287 e_flags = f.uint32()
288 e_ehsize = f.uint16()
289 e_phentsize = f.uint16()
290 e_phnum = f.uint16()
291 e_shentsize = f.uint16()
292 e_shnum = f.uint16()
293 e_shstrndx = f.uint16()
294
295 sections = []
296 for index in range(e_shnum):
297 f.seek(e_shoff + index * e_shentsize)
298 s = ElfSection(f)
299 sections.append(s)
300
301 f.seek(sections[e_shstrndx].sh_offset)
302 shstrtab = StringTable(f.read(sections[e_shstrndx].sh_size))
303
304 strtab = None
305 for section in sections:
306 if shstrtab[section.sh_name] == ".strtab":
307 f.seek(section.sh_offset)
308 strtab = StringTable(f.read(section.sh_size))
309 break
310
311 for index in range(e_shnum):
312 sections[index].patch(f, relocs)
313
314
315 def craftCoff(filename, triple, relocs, dummyReloc):
316 print("Crafting " + filename + " for " + triple)
317 src = (dummyReloc + "\n") * len(relocs)
318 compileAsm(filename, triple, src)
319
320 print(" Patching relocations...")
321 patchCoff(filename, relocs)
322
323 def patchCoff(path, relocs):
324 f = BinaryReader(path)
325 f.isLSB = True
326
327 machine_type = f.uint16()
328 section_count = f.uint16()
329 f.seek(20)
330 sections = [CoffSection(f) for idx in range(section_count)]
331
332 section = sections[0]
333 f.seek(section.pointer_to_relocations)
334 for i in range(section.relocation_count):
335 virtual_addr = f.uint32()
336 symtab_idx = f.uint32()
337 print(" %s" % relocs[i][0])
338 f.writeUInt16(relocs[i][1])
339
340
341 def craftMacho(filename, triple, relocs, dummyReloc):
342 print("Crafting " + filename + " for " + triple)
343
344 if type(dummyReloc) is tuple:
345 srcType, preSrc, dummyReloc, relocsPerDummy = dummyReloc
346 src = preSrc + "\n"
347 for i in range((len(relocs) + relocsPerDummy - 1) / relocsPerDummy):
348 src += dummyReloc.format(i) + "\n"
349 if srcType == "asm":
350 compileAsm(filename, triple, src)
351 elif srcType == "ir":
352 compileIR(filename, triple, src)
353 else:
354 src = (dummyReloc + "\n") * len(relocs)
355 compileAsm(filename, triple, src)
356
357 print(" Patching relocations...")
358 patchMacho(filename, relocs)
359
360 def patchMacho(filename, relocs):
361 f = BinaryReader(filename)
362
363 magic = f.read(4)
364 if magic == '\xFE\xED\xFA\xCE':
365 f.isLSB, f.is64Bit = False, False
366 elif magic == '\xCE\xFA\xED\xFE':
367 f.isLSB, f.is64Bit = True, False
368 elif magic == '\xFE\xED\xFA\xCF':
369 f.isLSB, f.is64Bit = False, True
370 elif magic == '\xCF\xFA\xED\xFE':
371 f.isLSB, f.is64Bit = True, True
372 else:
373 raise ValueError,"Not a Mach-O object file: %r (bad magic)" % path
374
375 cputype = f.uint32()
376 cpusubtype = f.uint32()
377 filetype = f.uint32()
378 numLoadCommands = f.uint32()
379 loadCommandsSize = f.uint32()
380 flag = f.uint32()
381 if f.is64Bit:
382 reserved = f.uint32()
383
384 start = f.tell()
385
386 for i in range(numLoadCommands):
387 patchMachoLoadCommand(f, relocs)
388
389 if f.tell() - start != loadCommandsSize:
390 raise ValueError,"%s: warning: invalid load commands size: %r" % (
391 sys.argv[0], loadCommandsSize)
392
393 def patchMachoLoadCommand(f, relocs):
394 start = f.tell()
395 cmd = f.uint32()
396 cmdSize = f.uint32()
397
398 if cmd == 1:
399 patchMachoSegmentLoadCommand(f, relocs)
400 elif cmd == 25:
401 patchMachoSegmentLoadCommand(f, relocs)
402 else:
403 f.read(cmdSize - 8)
404
405 if f.tell() - start != cmdSize:
406 raise ValueError,"%s: warning: invalid load command size: %r" % (
407 sys.argv[0], cmdSize)
408
409 def patchMachoSegmentLoadCommand(f, relocs):
410 segment_name = f.read(16)
411 vm_addr = f.word()
412 vm_size = f.word()
413 file_offset = f.word()
414 file_size = f.word()
415 maxprot = f.uint32()
416 initprot = f.uint32()
417 numSections = f.uint32()
418 flags = f.uint32()
419 for i in range(numSections):
420 patchMachoSection(f, relocs)
421
422 def patchMachoSection(f, relocs):
423 section_name = f.read(16)
424 segment_name = f.read(16)
425 address = f.word()
426 size = f.word()
427 offset = f.uint32()
428 alignment = f.uint32()
429 relocOffset = f.uint32()
430 numReloc = f.uint32()
431 flags = f.uint32()
432 reserved1 = f.uint32()
433 reserved2 = f.uint32()
434 if f.is64Bit:
435 reserved3 = f.uint32()
436
437 prev_pos = f.tell()
438
439 f.seek(relocOffset)
440 for i in range(numReloc):
441 ri = i < len(relocs) and i or 0
442 print(" %s" % relocs[ri][0])
443 word1 = f.uint32()
444 pos = f.tell()
445 value = f.uint32()
446 f.seek(pos)
447 value = (value & 0x0FFFFFFF) | ((relocs[ri][1] & 0xF) << 28)
448 f.writeUInt32(value)
449 f.seek(prev_pos)
450
451
452 class Relocs_Elf_X86_64(Enum):
453 R_X86_64_NONE = 0
454 R_X86_64_64 = 1
455 R_X86_64_PC32 = 2
456 R_X86_64_GOT32 = 3
457 R_X86_64_PLT32 = 4
458 R_X86_64_COPY = 5
459 R_X86_64_GLOB_DAT = 6
460 R_X86_64_JUMP_SLOT = 7
461 R_X86_64_RELATIVE = 8
462 R_X86_64_GOTPCREL = 9
463 R_X86_64_32 = 10
464 R_X86_64_32S = 11
465 R_X86_64_16 = 12
466 R_X86_64_PC16 = 13
467 R_X86_64_8 = 14
468 R_X86_64_PC8 = 15
469 R_X86_64_DTPMOD64 = 16
470 R_X86_64_DTPOFF64 = 17
471 R_X86_64_TPOFF64 = 18
472 R_X86_64_TLSGD = 19
473 R_X86_64_TLSLD = 20
474 R_X86_64_DTPOFF32 = 21
475 R_X86_64_GOTTPOFF = 22
476 R_X86_64_TPOFF32 = 23
477 R_X86_64_PC64 = 24
478 R_X86_64_GOTOFF64 = 25
479 R_X86_64_GOTPC32 = 26
480 R_X86_64_GOT64 = 27
481 R_X86_64_GOTPCREL64 = 28
482 R_X86_64_GOTPC64 = 29
483 R_X86_64_GOTPLT64 = 30
484 R_X86_64_PLTOFF64 = 31
485 R_X86_64_SIZE32 = 32
486 R_X86_64_SIZE64 = 33
487 R_X86_64_GOTPC32_TLSDESC = 34
488 R_X86_64_TLSDESC_CALL = 35
489 R_X86_64_TLSDESC = 36
490 R_X86_64_IRELATIVE = 37
491
492 class Relocs_Elf_i386(Enum):
493 R_386_NONE = 0
494 R_386_32 = 1
495 R_386_PC32 = 2
496 R_386_GOT32 = 3
497 R_386_PLT32 = 4
498 R_386_COPY = 5
499 R_386_GLOB_DAT = 6
500 R_386_JUMP_SLOT = 7
501 R_386_RELATIVE = 8
502 R_386_GOTOFF = 9
503 R_386_GOTPC = 10
504 R_386_32PLT = 11
505 R_386_TLS_TPOFF = 14
506 R_386_TLS_IE = 15
507 R_386_TLS_GOTIE = 16
508 R_386_TLS_LE = 17
509 R_386_TLS_GD = 18
510 R_386_TLS_LDM = 19
511 R_386_16 = 20
512 R_386_PC16 = 21
513 R_386_8 = 22
514 R_386_PC8 = 23
515 R_386_TLS_GD_32 = 24
516 R_386_TLS_GD_PUSH = 25
517 R_386_TLS_GD_CALL = 26
518 R_386_TLS_GD_POP = 27
519 R_386_TLS_LDM_32 = 28
520 R_386_TLS_LDM_PUSH = 29
521 R_386_TLS_LDM_CALL = 30
522 R_386_TLS_LDM_POP = 31
523 R_386_TLS_LDO_32 = 32
524 R_386_TLS_IE_32 = 33
525 R_386_TLS_LE_32 = 34
526 R_386_TLS_DTPMOD32 = 35
527 R_386_TLS_DTPOFF32 = 36
528 R_386_TLS_TPOFF32 = 37
529 R_386_TLS_GOTDESC = 39
530 R_386_TLS_DESC_CALL = 40
531 R_386_TLS_DESC = 41
532 R_386_IRELATIVE = 42
533 R_386_NUM = 43
534
535 class Relocs_Elf_MBlaze(Enum):
536 R_MICROBLAZE_NONE = 0
537 R_MICROBLAZE_32 = 1
538 R_MICROBLAZE_32_PCREL = 2
539 R_MICROBLAZE_64_PCREL = 3
540 R_MICROBLAZE_32_PCREL_LO = 4
541 R_MICROBLAZE_64 = 5
542 R_MICROBLAZE_32_LO = 6
543 R_MICROBLAZE_SRO32 = 7
544 R_MICROBLAZE_SRW32 = 8
545 R_MICROBLAZE_64_NONE = 9
546 R_MICROBLAZE_32_SYM_OP_SYM = 10
547 R_MICROBLAZE_GNU_VTINHERIT = 11
548 R_MICROBLAZE_GNU_VTENTRY = 12
549 R_MICROBLAZE_GOTPC_64 = 13
550 R_MICROBLAZE_GOT_64 = 14
551 R_MICROBLAZE_PLT_64 = 15
552 R_MICROBLAZE_REL = 16
553 R_MICROBLAZE_JUMP_SLOT = 17
554 R_MICROBLAZE_GLOB_DAT = 18
555 R_MICROBLAZE_GOTOFF_64 = 19
556 R_MICROBLAZE_GOTOFF_32 = 20
557 R_MICROBLAZE_COPY = 21
558
559 class Relocs_Elf_PPC32(Enum):
560 R_PPC_NONE = 0
561 R_PPC_ADDR32 = 1
562 R_PPC_ADDR24 = 2
563 R_PPC_ADDR16 = 3
564 R_PPC_ADDR16_LO = 4
565 R_PPC_ADDR16_HI = 5
566 R_PPC_ADDR16_HA = 6
567 R_PPC_ADDR14 = 7
568 R_PPC_ADDR14_BRTAKEN = 8
569 R_PPC_ADDR14_BRNTAKEN = 9
570 R_PPC_REL24 = 10
571 R_PPC_REL14 = 11
572 R_PPC_REL14_BRTAKEN = 12
573 R_PPC_REL14_BRNTAKEN = 13
574 R_PPC_REL32 = 26
575 R_PPC_TPREL16_LO = 70
576 R_PPC_TPREL16_HA = 72
577
578 class Relocs_Elf_PPC64(Enum):
579 R_PPC64_NONE = 0
580 R_PPC64_ADDR32 = 1
581 R_PPC64_ADDR16_LO = 4
582 R_PPC64_ADDR16_HI = 5
583 R_PPC64_ADDR14 = 7
584 R_PPC64_REL24 = 10
585 R_PPC64_REL32 = 26
586 R_PPC64_ADDR64 = 38
587 R_PPC64_ADDR16_HIGHER = 39
588 R_PPC64_ADDR16_HIGHEST = 41
589 R_PPC64_REL64 = 44
590 R_PPC64_TOC16 = 47
591 R_PPC64_TOC16_LO = 48
592 R_PPC64_TOC16_HA = 50
593 R_PPC64_TOC = 51
594 R_PPC64_ADDR16_DS = 56
595 R_PPC64_ADDR16_LO_DS = 57
596 R_PPC64_TOC16_DS = 63
597 R_PPC64_TOC16_LO_DS = 64
598 R_PPC64_TLS = 67
599 R_PPC64_TPREL16_LO = 70
600 R_PPC64_TPREL16_HA = 72
601 R_PPC64_DTPREL16_LO = 75
602 R_PPC64_DTPREL16_HA = 77
603 R_PPC64_GOT_TLSGD16_LO = 80
604 R_PPC64_GOT_TLSGD16_HA = 82
605 R_PPC64_GOT_TLSLD16_LO = 84
606 R_PPC64_GOT_TLSLD16_HA = 86
607 R_PPC64_GOT_TPREL16_LO_DS = 88
608 R_PPC64_GOT_TPREL16_HA = 90
609 R_PPC64_TLSGD = 107
610 R_PPC64_TLSLD = 108
611
612 class Relocs_Elf_AArch64(Enum):
613 R_AARCH64_NONE = 0x100
614 R_AARCH64_ABS64 = 0x101
615 R_AARCH64_ABS32 = 0x102
616 R_AARCH64_ABS16 = 0x103
617 R_AARCH64_PREL64 = 0x104
618 R_AARCH64_PREL32 = 0x105
619 R_AARCH64_PREL16 = 0x106
620 R_AARCH64_MOVW_UABS_G0 = 0x107
621 R_AARCH64_MOVW_UABS_G0_NC = 0x108
622 R_AARCH64_MOVW_UABS_G1 = 0x109
623 R_AARCH64_MOVW_UABS_G1_NC = 0x10a
624 R_AARCH64_MOVW_UABS_G2 = 0x10b
625 R_AARCH64_MOVW_UABS_G2_NC = 0x10c
626 R_AARCH64_MOVW_UABS_G3 = 0x10d
627 R_AARCH64_MOVW_SABS_G0 = 0x10e
628 R_AARCH64_MOVW_SABS_G1 = 0x10f
629 R_AARCH64_MOVW_SABS_G2 = 0x110
630 R_AARCH64_LD_PREL_LO19 = 0x111
631 R_AARCH64_ADR_PREL_LO21 = 0x112
632 R_AARCH64_ADR_PREL_PG_HI21 = 0x113
633 R_AARCH64_ADD_ABS_LO12_NC = 0x115
634 R_AARCH64_LDST8_ABS_LO12_NC = 0x116
635 R_AARCH64_TSTBR14 = 0x117
636 R_AARCH64_CONDBR19 = 0x118
637 R_AARCH64_JUMP26 = 0x11a
638 R_AARCH64_CALL26 = 0x11b
639 R_AARCH64_LDST16_ABS_LO12_NC = 0x11c
640 R_AARCH64_LDST32_ABS_LO12_NC = 0x11d
641 R_AARCH64_LDST64_ABS_LO12_NC = 0x11e
642 R_AARCH64_LDST128_ABS_LO12_NC = 0x12b
643 R_AARCH64_ADR_GOT_PAGE = 0x137
644 R_AARCH64_LD64_GOT_LO12_NC = 0x138
645 R_AARCH64_TLSLD_MOVW_DTPREL_G2 = 0x20b
646 R_AARCH64_TLSLD_MOVW_DTPREL_G1 = 0x20c
647 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC = 0x20d
648 R_AARCH64_TLSLD_MOVW_DTPREL_G0 = 0x20e
649 R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC = 0x20f
650 R_AARCH64_TLSLD_ADD_DTPREL_HI12 = 0x210
651 R_AARCH64_TLSLD_ADD_DTPREL_LO12 = 0x211
652 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC = 0x212
653 R_AARCH64_TLSLD_LDST8_DTPREL_LO12 = 0x213
654 R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC = 0x214
655 R_AARCH64_TLSLD_LDST16_DTPREL_LO12 = 0x215
656 R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC = 0x216
657 R_AARCH64_TLSLD_LDST32_DTPREL_LO12 = 0x217
658 R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC = 0x218
659 R_AARCH64_TLSLD_LDST64_DTPREL_LO12 = 0x219
660 R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC = 0x21a
661 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 = 0x21b
662 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC = 0x21c
663 R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 = 0x21d
664 R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC = 0x21e
665 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 = 0x21f
666 R_AARCH64_TLSLE_MOVW_TPREL_G2 = 0x220
667 R_AARCH64_TLSLE_MOVW_TPREL_G1 = 0x221
668 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC = 0x222
669 R_AARCH64_TLSLE_MOVW_TPREL_G0 = 0x223
670 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC = 0x224
671 R_AARCH64_TLSLE_ADD_TPREL_HI12 = 0x225
672 R_AARCH64_TLSLE_ADD_TPREL_LO12 = 0x226
673 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC = 0x227
674 R_AARCH64_TLSLE_LDST8_TPREL_LO12 = 0x228
675 R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC = 0x229
676 R_AARCH64_TLSLE_LDST16_TPREL_LO12 = 0x22a
677 R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC = 0x22b
678 R_AARCH64_TLSLE_LDST32_TPREL_LO12 = 0x22c
679 R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC = 0x22d
680 R_AARCH64_TLSLE_LDST64_TPREL_LO12 = 0x22e
681 R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC = 0x22f
682 R_AARCH64_TLSDESC_ADR_PAGE = 0x232
683 R_AARCH64_TLSDESC_LD64_LO12_NC = 0x233
684 R_AARCH64_TLSDESC_ADD_LO12_NC = 0x234
685 R_AARCH64_TLSDESC_CALL = 0x239
686
687 class Relocs_Elf_ARM(Enum):
688 R_ARM_NONE = 0x00
689 R_ARM_PC24 = 0x01
690 R_ARM_ABS32 = 0x02
691 R_ARM_REL32 = 0x03
692 R_ARM_LDR_PC_G0 = 0x04
693 R_ARM_ABS16 = 0x05
694 R_ARM_ABS12 = 0x06
695 R_ARM_THM_ABS5 = 0x07
696 R_ARM_ABS8 = 0x08
697 R_ARM_SBREL32 = 0x09
698 R_ARM_THM_CALL = 0x0a
699 R_ARM_THM_PC8 = 0x0b
700 R_ARM_BREL_ADJ = 0x0c
701 R_ARM_TLS_DESC = 0x0d
702 R_ARM_THM_SWI8 = 0x0e
703 R_ARM_XPC25 = 0x0f
704 R_ARM_THM_XPC22 = 0x10
705 R_ARM_TLS_DTPMOD32 = 0x11
706 R_ARM_TLS_DTPOFF32 = 0x12
707 R_ARM_TLS_TPOFF32 = 0x13
708 R_ARM_COPY = 0x14
709 R_ARM_GLOB_DAT = 0x15
710 R_ARM_JUMP_SLOT = 0x16
711 R_ARM_RELATIVE = 0x17
712 R_ARM_GOTOFF32 = 0x18
713 R_ARM_BASE_PREL = 0x19
714 R_ARM_GOT_BREL = 0x1a
715 R_ARM_PLT32 = 0x1b
716 R_ARM_CALL = 0x1c
717 R_ARM_JUMP24 = 0x1d
718 R_ARM_THM_JUMP24 = 0x1e
719 R_ARM_BASE_ABS = 0x1f
720 R_ARM_ALU_PCREL_7_0 = 0x20
721 R_ARM_ALU_PCREL_15_8 = 0x21
722 R_ARM_ALU_PCREL_23_15 = 0x22
723 R_ARM_LDR_SBREL_11_0_NC = 0x23
724 R_ARM_ALU_SBREL_19_12_NC = 0x24
725 R_ARM_ALU_SBREL_27_20_CK = 0x25
726 R_ARM_TARGET1 = 0x26
727 R_ARM_SBREL31 = 0x27
728 R_ARM_V4BX = 0x28
729 R_ARM_TARGET2 = 0x29
730 R_ARM_PREL31 = 0x2a
731 R_ARM_MOVW_ABS_NC = 0x2b
732 R_ARM_MOVT_ABS = 0x2c
733 R_ARM_MOVW_PREL_NC = 0x2d
734 R_ARM_MOVT_PREL = 0x2e
735 R_ARM_THM_MOVW_ABS_NC = 0x2f
736 R_ARM_THM_MOVT_ABS = 0x30
737 R_ARM_THM_MOVW_PREL_NC = 0x31
738 R_ARM_THM_MOVT_PREL = 0x32
739 R_ARM_THM_JUMP19 = 0x33
740 R_ARM_THM_JUMP6 = 0x34
741 R_ARM_THM_ALU_PREL_11_0 = 0x35
742 R_ARM_THM_PC12 = 0x36
743 R_ARM_ABS32_NOI = 0x37
744 R_ARM_REL32_NOI = 0x38
745 R_ARM_ALU_PC_G0_NC = 0x39
746 R_ARM_ALU_PC_G0 = 0x3a
747 R_ARM_ALU_PC_G1_NC = 0x3b
748 R_ARM_ALU_PC_G1 = 0x3c
749 R_ARM_ALU_PC_G2 = 0x3d
750 R_ARM_LDR_PC_G1 = 0x3e
751 R_ARM_LDR_PC_G2 = 0x3f
752 R_ARM_LDRS_PC_G0 = 0x40
753 R_ARM_LDRS_PC_G1 = 0x41
754 R_ARM_LDRS_PC_G2 = 0x42
755 R_ARM_LDC_PC_G0 = 0x43
756 R_ARM_LDC_PC_G1 = 0x44
757 R_ARM_LDC_PC_G2 = 0x45
758 R_ARM_ALU_SB_G0_NC = 0x46
759 R_ARM_ALU_SB_G0 = 0x47
760 R_ARM_ALU_SB_G1_NC = 0x48
761 R_ARM_ALU_SB_G1 = 0x49
762 R_ARM_ALU_SB_G2 = 0x4a
763 R_ARM_LDR_SB_G0 = 0x4b
764 R_ARM_LDR_SB_G1 = 0x4c
765 R_ARM_LDR_SB_G2 = 0x4d
766 R_ARM_LDRS_SB_G0 = 0x4e
767 R_ARM_LDRS_SB_G1 = 0x4f
768 R_ARM_LDRS_SB_G2 = 0x50
769 R_ARM_LDC_SB_G0 = 0x51
770 R_ARM_LDC_SB_G1 = 0x52
771 R_ARM_LDC_SB_G2 = 0x53
772 R_ARM_MOVW_BREL_NC = 0x54
773 R_ARM_MOVT_BREL = 0x55
774 R_ARM_MOVW_BREL = 0x56
775 R_ARM_THM_MOVW_BREL_NC = 0x57
776 R_ARM_THM_MOVT_BREL = 0x58
777 R_ARM_THM_MOVW_BREL = 0x59
778 R_ARM_TLS_GOTDESC = 0x5a
779 R_ARM_TLS_CALL = 0x5b
780 R_ARM_TLS_DESCSEQ = 0x5c
781 R_ARM_THM_TLS_CALL = 0x5d
782 R_ARM_PLT32_ABS = 0x5e
783 R_ARM_GOT_ABS = 0x5f
784 R_ARM_GOT_PREL = 0x60
785 R_ARM_GOT_BREL12 = 0x61
786 R_ARM_GOTOFF12 = 0x62
787 R_ARM_GOTRELAX = 0x63
788 R_ARM_GNU_VTENTRY = 0x64
789 R_ARM_GNU_VTINHERIT = 0x65
790 R_ARM_THM_JUMP11 = 0x66
791 R_ARM_THM_JUMP8 = 0x67
792 R_ARM_TLS_GD32 = 0x68
793 R_ARM_TLS_LDM32 = 0x69
794 R_ARM_TLS_LDO32 = 0x6a
795 R_ARM_TLS_IE32 = 0x6b
796 R_ARM_TLS_LE32 = 0x6c
797 R_ARM_TLS_LDO12 = 0x6d
798 R_ARM_TLS_LE12 = 0x6e
799 R_ARM_TLS_IE12GP = 0x6f
800 R_ARM_PRIVATE_0 = 0x70
801 R_ARM_PRIVATE_1 = 0x71
802 R_ARM_PRIVATE_2 = 0x72
803 R_ARM_PRIVATE_3 = 0x73
804 R_ARM_PRIVATE_4 = 0x74
805 R_ARM_PRIVATE_5 = 0x75
806 R_ARM_PRIVATE_6 = 0x76
807 R_ARM_PRIVATE_7 = 0x77
808 R_ARM_PRIVATE_8 = 0x78
809 R_ARM_PRIVATE_9 = 0x79
810 R_ARM_PRIVATE_10 = 0x7a
811 R_ARM_PRIVATE_11 = 0x7b
812 R_ARM_PRIVATE_12 = 0x7c
813 R_ARM_PRIVATE_13 = 0x7d
814 R_ARM_PRIVATE_14 = 0x7e
815 R_ARM_PRIVATE_15 = 0x7f
816 R_ARM_ME_TOO = 0x80
817 R_ARM_THM_TLS_DESCSEQ16 = 0x81
818 R_ARM_THM_TLS_DESCSEQ32 = 0x82
819
820 class Relocs_Elf_Mips(Enum):
821 R_MIPS_NONE = 0
822 R_MIPS_16 = 1
823 R_MIPS_32 = 2
824 R_MIPS_REL32 = 3
825 R_MIPS_26 = 4
826 R_MIPS_HI16 = 5
827 R_MIPS_LO16 = 6
828 R_MIPS_GPREL16 = 7
829 R_MIPS_LITERAL = 8
830 R_MIPS_GOT16 = 9
831 R_MIPS_PC16 = 10
832 R_MIPS_CALL16 = 11
833 R_MIPS_GPREL32 = 12
834 R_MIPS_SHIFT5 = 16
835 R_MIPS_SHIFT6 = 17
836 R_MIPS_64 = 18
837 R_MIPS_GOT_DISP = 19
838 R_MIPS_GOT_PAGE = 20
839 R_MIPS_GOT_OFST = 21
840 R_MIPS_GOT_HI16 = 22
841 R_MIPS_GOT_LO16 = 23
842 R_MIPS_SUB = 24
843 R_MIPS_INSERT_A = 25
844 R_MIPS_INSERT_B = 26
845 R_MIPS_DELETE = 27
846 R_MIPS_HIGHER = 28
847 R_MIPS_HIGHEST = 29
848 R_MIPS_CALL_HI16 = 30
849 R_MIPS_CALL_LO16 = 31
850 R_MIPS_SCN_DISP = 32
851 R_MIPS_REL16 = 33
852 R_MIPS_ADD_IMMEDIATE = 34
853 R_MIPS_PJUMP = 35
854 R_MIPS_RELGOT = 36
855 R_MIPS_JALR = 37
856 R_MIPS_TLS_DTPMOD32 = 38
857 R_MIPS_TLS_DTPREL32 = 39
858 R_MIPS_TLS_DTPMOD64 = 40
859 R_MIPS_TLS_DTPREL64 = 41
860 R_MIPS_TLS_GD = 42
861 R_MIPS_TLS_LDM = 43
862 R_MIPS_TLS_DTPREL_HI16 = 44
863 R_MIPS_TLS_DTPREL_LO16 = 45
864 R_MIPS_TLS_GOTTPREL = 46
865 R_MIPS_TLS_TPREL32 = 47
866 R_MIPS_TLS_TPREL64 = 48
867 R_MIPS_TLS_TPREL_HI16 = 49
868 R_MIPS_TLS_TPREL_LO16 = 50
869 R_MIPS_GLOB_DAT = 51
870 R_MIPS_COPY = 126
871 R_MIPS_JUMP_SLOT = 127
872 R_MIPS_NUM = 218
873
874 class Relocs_Elf_Hexagon(Enum):
875 R_HEX_NONE = 0
876 R_HEX_B22_PCREL = 1
877 R_HEX_B15_PCREL = 2
878 R_HEX_B7_PCREL = 3
879 R_HEX_LO16 = 4
880 R_HEX_HI16 = 5
881 R_HEX_32 = 6
882 R_HEX_16 = 7
883 R_HEX_8 = 8
884 R_HEX_GPREL16_0 = 9
885 R_HEX_GPREL16_1 = 10
886 R_HEX_GPREL16_2 = 11
887 R_HEX_GPREL16_3 = 12
888 R_HEX_HL16 = 13
889 R_HEX_B13_PCREL = 14
890 R_HEX_B9_PCREL = 15
891 R_HEX_B32_PCREL_X = 16
892 R_HEX_32_6_X = 17
893 R_HEX_B22_PCREL_X = 18
894 R_HEX_B15_PCREL_X = 19
895 R_HEX_B13_PCREL_X = 20
896 R_HEX_B9_PCREL_X = 21
897 R_HEX_B7_PCREL_X = 22
898 R_HEX_16_X = 23
899 R_HEX_12_X = 24
900 R_HEX_11_X = 25
901 R_HEX_10_X = 26
902 R_HEX_9_X = 27
903 R_HEX_8_X = 28
904 R_HEX_7_X = 29
905 R_HEX_6_X = 30
906 R_HEX_32_PCREL = 31
907 R_HEX_COPY = 32
908 R_HEX_GLOB_DAT = 33
909 R_HEX_JMP_SLOT = 34
910 R_HEX_RELATIVE = 35
911 R_HEX_PLT_B22_PCREL = 36
912 R_HEX_GOTREL_LO16 = 37
913 R_HEX_GOTREL_HI16 = 38
914 R_HEX_GOTREL_32 = 39
915 R_HEX_GOT_LO16 = 40
916 R_HEX_GOT_HI16 = 41
917 R_HEX_GOT_32 = 42
918 R_HEX_GOT_16 = 43
919 R_HEX_DTPMOD_32 = 44
920 R_HEX_DTPREL_LO16 = 45
921 R_HEX_DTPREL_HI16 = 46
922 R_HEX_DTPREL_32 = 47
923 R_HEX_DTPREL_16 = 48
924 R_HEX_GD_PLT_B22_PCREL = 49
925 R_HEX_GD_GOT_LO16 = 50
926 R_HEX_GD_GOT_HI16 = 51
927 R_HEX_GD_GOT_32 = 52
928 R_HEX_GD_GOT_16 = 53
929 R_HEX_IE_LO16 = 54
930 R_HEX_IE_HI16 = 55
931 R_HEX_IE_32 = 56
932 R_HEX_IE_GOT_LO16 = 57
933 R_HEX_IE_GOT_HI16 = 58
934 R_HEX_IE_GOT_32 = 59
935 R_HEX_IE_GOT_16 = 60
936 R_HEX_TPREL_LO16 = 61
937 R_HEX_TPREL_HI16 = 62
938 R_HEX_TPREL_32 = 63
939 R_HEX_TPREL_16 = 64
940 R_HEX_6_PCREL_X = 65
941 R_HEX_GOTREL_32_6_X = 66
942 R_HEX_GOTREL_16_X = 67
943 R_HEX_GOTREL_11_X = 68
944 R_HEX_GOT_32_6_X = 69
945 R_HEX_GOT_16_X = 70
946 R_HEX_GOT_11_X = 71
947 R_HEX_DTPREL_32_6_X = 72
948 R_HEX_DTPREL_16_X = 73
949 R_HEX_DTPREL_11_X = 74
950 R_HEX_GD_GOT_32_6_X = 75
951 R_HEX_GD_GOT_16_X = 76
952 R_HEX_GD_GOT_11_X = 77
953 R_HEX_IE_32_6_X = 78
954 R_HEX_IE_16_X = 79
955 R_HEX_IE_GOT_32_6_X = 80
956 R_HEX_IE_GOT_16_X = 81
957 R_HEX_IE_GOT_11_X = 82
958 R_HEX_TPREL_32_6_X = 83
959 R_HEX_TPREL_16_X = 84
960 R_HEX_TPREL_11_X = 85
961
962
963 class Relocs_Coff_i386(Enum):
964 IMAGE_REL_I386_ABSOLUTE = 0x0000
965 IMAGE_REL_I386_DIR16 = 0x0001
966 IMAGE_REL_I386_REL16 = 0x0002
967 IMAGE_REL_I386_DIR32 = 0x0006
968 IMAGE_REL_I386_DIR32NB = 0x0007
969 IMAGE_REL_I386_SEG12 = 0x0009
970 IMAGE_REL_I386_SECTION = 0x000A
971 IMAGE_REL_I386_SECREL = 0x000B
972 IMAGE_REL_I386_TOKEN = 0x000C
973 IMAGE_REL_I386_SECREL7 = 0x000D
974 IMAGE_REL_I386_REL32 = 0x0014
975
976 class Relocs_Coff_X86_64(Enum):
977 IMAGE_REL_AMD64_ABSOLUTE = 0x0000
978 IMAGE_REL_AMD64_ADDR64 = 0x0001
979 IMAGE_REL_AMD64_ADDR32 = 0x0002
980 IMAGE_REL_AMD64_ADDR32NB = 0x0003
981 IMAGE_REL_AMD64_REL32 = 0x0004
982 IMAGE_REL_AMD64_REL32_1 = 0x0005
983 IMAGE_REL_AMD64_REL32_2 = 0x0006
984 IMAGE_REL_AMD64_REL32_3 = 0x0007
985 IMAGE_REL_AMD64_REL32_4 = 0x0008
986 IMAGE_REL_AMD64_REL32_5 = 0x0009
987 IMAGE_REL_AMD64_SECTION = 0x000A
988 IMAGE_REL_AMD64_SECREL = 0x000B
989 IMAGE_REL_AMD64_SECREL7 = 0x000C
990 IMAGE_REL_AMD64_TOKEN = 0x000D
991 IMAGE_REL_AMD64_SREL32 = 0x000E
992 IMAGE_REL_AMD64_PAIR = 0x000F
993 IMAGE_REL_AMD64_SSPAN32 = 0x0010
994
995 class Relocs_Coff_ARM(Enum):
996 IMAGE_REL_ARM_ABSOLUTE = 0x0000
997 IMAGE_REL_ARM_ADDR32 = 0x0001
998 IMAGE_REL_ARM_ADDR32NB = 0x0002
999 IMAGE_REL_ARM_BRANCH24 = 0x0003
1000 IMAGE_REL_ARM_BRANCH11 = 0x0004
1001 IMAGE_REL_ARM_TOKEN = 0x0005
1002 IMAGE_REL_ARM_BLX24 = 0x0008
1003 IMAGE_REL_ARM_BLX11 = 0x0009
1004 IMAGE_REL_ARM_SECTION = 0x000E
1005 IMAGE_REL_ARM_SECREL = 0x000F
1006 IMAGE_REL_ARM_MOV32A = 0x0010
1007 IMAGE_REL_ARM_MOV32T = 0x0011
1008 IMAGE_REL_ARM_BRANCH20T = 0x0012
1009 IMAGE_REL_ARM_BRANCH24T = 0x0014
1010 IMAGE_REL_ARM_BLX23T = 0x0015
1011
1012
1013 class Relocs_Macho_i386(Enum):
1014 RIT_Vanilla = 0
1015 RIT_Pair = 1
1016 RIT_Difference = 2
1017 RIT_Generic_PreboundLazyPointer = 3
1018 RIT_Generic_LocalDifference = 4
1019 RIT_Generic_TLV = 5
1020
1021 class Relocs_Macho_X86_64(Enum):
1022 RIT_X86_64_Unsigned = 0
1023 RIT_X86_64_Signed = 1
1024 RIT_X86_64_Branch = 2
1025 RIT_X86_64_GOTLoad = 3
1026 RIT_X86_64_GOT = 4
1027 RIT_X86_64_Subtractor = 5
1028 RIT_X86_64_Signed1 = 6
1029 RIT_X86_64_Signed2 = 7
1030 RIT_X86_64_Signed4 = 8
1031 RIT_X86_64_TLV = 9
1032
1033 class Relocs_Macho_ARM(Enum):
1034 RIT_Vanilla = 0
1035 RIT_Pair = 1
1036 RIT_Difference = 2
1037 RIT_ARM_LocalDifference = 3
1038 RIT_ARM_PreboundLazyPointer = 4
1039 RIT_ARM_Branch24Bit = 5
1040 RIT_ARM_ThumbBranch22Bit = 6
1041 RIT_ARM_ThumbBranch32Bit = 7
1042 RIT_ARM_Half = 8
1043 RIT_ARM_HalfDifference = 9
1044
1045 class Relocs_Macho_PPC(Enum):
1046 PPC_RELOC_VANILLA = 0
1047 PPC_RELOC_PAIR = 1
1048 PPC_RELOC_BR14 = 2
1049 PPC_RELOC_BR24 = 3
1050 PPC_RELOC_HI16 = 4
1051 PPC_RELOC_LO16 = 5
1052 PPC_RELOC_HA16 = 6
1053 PPC_RELOC_LO14 = 7
1054 PPC_RELOC_SECTDIFF = 8
1055 PPC_RELOC_PB_LA_PTR = 9
1056 PPC_RELOC_HI16_SECTDIFF = 10
1057 PPC_RELOC_LO16_SECTDIFF = 11
1058 PPC_RELOC_HA16_SECTDIFF = 12
1059 PPC_RELOC_JBSR = 13
1060 PPC_RELOC_LO14_SECTDIFF = 14
1061 PPC_RELOC_LOCAL_SECTDIFF = 15
1062
1063
1064 craftElf("relocs.obj.elf-x86_64", "x86_64-pc-linux-gnu", Relocs_Elf_X86_64.entries(), "leaq sym@GOTTPOFF(%rip), %rax")
1065 craftElf("relocs.obj.elf-i386", "i386-pc-linux-gnu", Relocs_Elf_i386.entries(), "mov sym@GOTOFF(%ebx), %eax")
1066 #craftElf("relocs-elf-ppc32", "powerpc-unknown-linux-gnu", Relocs_Elf_PPC32.entries(), ...)
1067 craftElf("relocs.obj.elf-ppc64", "powerpc64-unknown-linux-gnu", Relocs_Elf_PPC64.entries(),
1068 ("@t = thread_local global i32 0, align 4", "define i32* @f{0}() nounwind {{ ret i32* @t }}", 2))
1069 craftElf("relocs.obj.elf-aarch64", "aarch64", Relocs_Elf_AArch64.entries(), "movz x0, #:abs_g0:sym")
1070 craftElf("relocs.obj.elf-arm", "arm-unknown-unknown", Relocs_Elf_ARM.entries(), "b sym")
1071 craftElf("relocs.obj.elf-mips", "mips-unknown-linux", Relocs_Elf_Mips.entries(), "lui $2, %hi(sym)")
1072 craftElf("relocs.obj.elf-mips64el", "mips64el-unknown-linux", Relocs_Elf_Mips.entries(), "lui $2, %hi(sym)")
1073 #craftElf("relocs.obj.elf-mblaze", "mblaze-unknown-unknown", Relocs_Elf_MBlaze.entries(), ...)
1074 #craftElf("relocs.obj.elf-hexagon", "hexagon-unknown-unknown", Relocs_Elf_Hexagon.entries(), ...)
1075
1076 craftCoff("relocs.obj.coff-i386", "i386-pc-win32", Relocs_Coff_i386.entries(), "mov foo@imgrel(%ebx, %ecx, 4), %eax")
1077 craftCoff("relocs.obj.coff-x86_64", "x86_64-pc-win32", Relocs_Coff_X86_64.entries(), "mov foo@imgrel(%ebx, %ecx, 4), %eax")
1078 #craftCoff("relocs.obj.coff-arm", "arm-pc-win32", Relocs_Coff_ARM.entries(), "...")
1079
1080 craftMacho("relocs.obj.macho-i386", "i386-apple-darwin9", Relocs_Macho_i386.entries(),
1081 ("asm", ".subsections_via_symbols; .text; a: ; b:", "call a", 1))
1082 craftMacho("relocs.obj.macho-x86_64", "x86_64-apple-darwin9", Relocs_Macho_X86_64.entries(),
1083 ("asm", ".subsections_via_symbols; .text; a: ; b:", "call a", 1))
1084 craftMacho("relocs.obj.macho-arm", "armv7-apple-darwin10", Relocs_Macho_ARM.entries(), "bl sym")
1085 #craftMacho("relocs.obj.macho-ppc", "powerpc-apple-darwin10", Relocs_Macho_PPC.entries(), ...)
0 // Test that libObject and subsequently llvm-readobj shows proper relocation type
1 // names and values.
2
3 // Todo: ELF-PPC, ELF-HEXAGON
4
5 RUN: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-i386 | FileCheck %s -check-prefix ELF-32
6 RUN: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-x86_64 | FileCheck %s -check-prefix ELF-64
7 RUN: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-aarch64 | FileCheck %s -check-prefix ELF-AARCH64
8 RUN: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-arm | FileCheck %s -check-prefix ELF-ARM
9 RUN: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-mips | FileCheck %s -check-prefix ELF-MIPS
10 RUN: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-mips64el | FileCheck %s -check-prefix ELF-MIPS64EL
11 RUN: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-ppc64 | FileCheck %s -check-prefix ELF-PPC64
12 RUN: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.coff-i386 | FileCheck %s -check-prefix COFF-32
13 RUN: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.coff-x86_64 | FileCheck %s -check-prefix COFF-64
14 RUN: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.macho-arm | FileCheck %s -check-prefix MACHO-ARM
15 RUN: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.macho-i386 | FileCheck %s -check-prefix MACHO-32
16 RUN: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.macho-x86_64 | FileCheck %s -check-prefix MACHO-64
17
18
19 ELF-32: Type: R_386_NONE (0)
20 ELF-32: Type: R_386_32 (1)
21 ELF-32: Type: R_386_PC32 (2)
22 ELF-32: Type: R_386_GOT32 (3)
23 ELF-32: Type: R_386_PLT32 (4)
24 ELF-32: Type: R_386_COPY (5)
25 ELF-32: Type: R_386_GLOB_DAT (6)
26 ELF-32: Type: R_386_JUMP_SLOT (7)
27 ELF-32: Type: R_386_RELATIVE (8)
28 ELF-32: Type: R_386_GOTOFF (9)
29 ELF-32: Type: R_386_GOTPC (10)
30 ELF-32: Type: R_386_32PLT (11)
31 ELF-32: Type: R_386_TLS_TPOFF (14)
32 ELF-32: Type: R_386_TLS_IE (15)
33 ELF-32: Type: R_386_TLS_GOTIE (16)
34 ELF-32: Type: R_386_TLS_LE (17)
35 ELF-32: Type: R_386_TLS_GD (18)
36 ELF-32: Type: R_386_TLS_LDM (19)
37 ELF-32: Type: R_386_16 (20)
38 ELF-32: Type: R_386_PC16 (21)
39 ELF-32: Type: R_386_8 (22)
40 ELF-32: Type: R_386_PC8 (23)
41 ELF-32: Type: R_386_TLS_GD_32 (24)
42 ELF-32: Type: R_386_TLS_GD_PUSH (25)
43 ELF-32: Type: R_386_TLS_GD_CALL (26)
44 ELF-32: Type: R_386_TLS_GD_POP (27)
45 ELF-32: Type: R_386_TLS_LDM_32 (28)
46 ELF-32: Type: R_386_TLS_LDM_PUSH (29)
47 ELF-32: Type: R_386_TLS_LDM_CALL (30)
48 ELF-32: Type: R_386_TLS_LDM_POP (31)
49 ELF-32: Type: R_386_TLS_LDO_32 (32)
50 ELF-32: Type: R_386_TLS_IE_32 (33)
51 ELF-32: Type: R_386_TLS_LE_32 (34)
52 ELF-32: Type: R_386_TLS_DTPMOD32 (35)
53 ELF-32: Type: R_386_TLS_DTPOFF32 (36)
54 ELF-32: Type: R_386_TLS_TPOFF32 (37)
55 ELF-32: Type: R_386_TLS_GOTDESC (39)
56 ELF-32: Type: R_386_TLS_DESC_CALL (40)
57 ELF-32: Type: R_386_TLS_DESC (41)
58 ELF-32: Type: R_386_IRELATIVE (42)
59 _LF-32: Type: R_386_NUM (43)
60
61 ELF-64: Type: R_X86_64_NONE (0)
62 ELF-64: Type: R_X86_64_64 (1)
63 ELF-64: Type: R_X86_64_PC32 (2)
64 ELF-64: Type: R_X86_64_GOT32 (3)
65 ELF-64: Type: R_X86_64_PLT32 (4)
66 ELF-64: Type: R_X86_64_COPY (5)
67 ELF-64: Type: R_X86_64_GLOB_DAT (6)
68 ELF-64: Type: R_X86_64_JUMP_SLOT (7)
69 ELF-64: Type: R_X86_64_RELATIVE (8)
70 ELF-64: Type: R_X86_64_GOTPCREL (9)
71 ELF-64: Type: R_X86_64_32 (10)
72 ELF-64: Type: R_X86_64_32S (11)
73 ELF-64: Type: R_X86_64_16 (12)
74 ELF-64: Type: R_X86_64_PC16 (13)
75 ELF-64: Type: R_X86_64_8 (14)
76 ELF-64: Type: R_X86_64_PC8 (15)
77 ELF-64: Type: R_X86_64_DTPMOD64 (16)
78 ELF-64: Type: R_X86_64_DTPOFF64 (17)
79 ELF-64: Type: R_X86_64_TPOFF64 (18)
80 ELF-64: Type: R_X86_64_TLSGD (19)
81 ELF-64: Type: R_X86_64_TLSLD (20)
82 ELF-64: Type: R_X86_64_DTPOFF32 (21)
83 ELF-64: Type: R_X86_64_GOTTPOFF (22)
84 ELF-64: Type: R_X86_64_TPOFF32 (23)
85 ELF-64: Type: R_X86_64_PC64 (24)
86 ELF-64: Type: R_X86_64_GOTOFF64 (25)
87 ELF-64: Type: R_X86_64_GOTPC32 (26)
88 ELF-64: Type: R_X86_64_GOT64 (27)
89 ELF-64: Type: R_X86_64_GOTPCREL64 (28)
90 ELF-64: Type: R_X86_64_GOTPC64 (29)
91 ELF-64: Type: R_X86_64_GOTPLT64 (30)
92 ELF-64: Type: R_X86_64_PLTOFF64 (31)
93 ELF-64: Type: R_X86_64_SIZE32 (32)
94 ELF-64: Type: R_X86_64_SIZE64 (33)
95 ELF-64: Type: R_X86_64_GOTPC32_TLSDESC (34)
96 ELF-64: Type: R_X86_64_TLSDESC_CALL (35)
97 ELF-64: Type: R_X86_64_TLSDESC (36)
98 ELF-64: Type: R_X86_64_IRELATIVE (37)
99
100 ELF-PPC: Type: R_PPC_NONE (0)
101 ELF-PPC: Type: R_PPC_ADDR32 (1)
102 ELF-PPC: Type: R_PPC_ADDR24 (2)
103 ELF-PPC: Type: R_PPC_ADDR16 (3)
104 ELF-PPC: Type: R_PPC_ADDR16_LO (4)
105 ELF-PPC: Type: R_PPC_ADDR16_HI (5)
106 ELF-PPC: Type: R_PPC_ADDR16_HA (6)
107 ELF-PPC: Type: R_PPC_ADDR14 (7)
108 ELF-PPC: Type: R_PPC_ADDR14_BRTAKEN (8)
109 ELF-PPC: Type: R_PPC_ADDR14_BRNTAKEN (9)
110 ELF-PPC: Type: R_PPC_REL24 (10)
111 ELF-PPC: Type: R_PPC_REL14 (11)
112 ELF-PPC: Type: R_PPC_REL14_BRTAKEN (12)
113 ELF-PPC: Type: R_PPC_REL14_BRNTAKEN (13)
114 ELF-PPC: Type: R_PPC_REL32 (26)
115 ELF-PPC: Type: R_PPC_TPREL16_LO (70)
116 ELF-PPC: Type: R_PPC_TPREL16_HA (72)
117
118 ELF-PPC64: Type: R_PPC64_NONE (0)
119 ELF-PPC64: Type: R_PPC64_ADDR32 (1)
120 ELF-PPC64: Type: R_PPC64_ADDR16_LO (4)
121 ELF-PPC64: Type: R_PPC64_ADDR16_HI (5)
122 ELF-PPC64: Type: R_PPC64_ADDR14 (7)
123 ELF-PPC64: Type: R_PPC64_REL24 (10)
124 ELF-PPC64: Type: R_PPC64_REL32 (26)
125 ELF-PPC64: Type: R_PPC64_ADDR64 (38)
126 ELF-PPC64: Type: R_PPC64_ADDR16_HIGHER (39)
127 ELF-PPC64: Type: R_PPC64_ADDR16_HIGHEST (41)
128 ELF-PPC64: Type: R_PPC64_REL64 (44)
129 ELF-PPC64: Type: R_PPC64_TOC16 (47)
130 ELF-PPC64: Type: R_PPC64_TOC16_LO (48)
131 ELF-PPC64: Type: R_PPC64_TOC16_HA (50)
132 ELF-PPC64: Type: R_PPC64_TOC (51)
133 ELF-PPC64: Type: R_PPC64_ADDR16_DS (56)
134 ELF-PPC64: Type: R_PPC64_ADDR16_LO_DS (57)
135 ELF-PPC64: Type: R_PPC64_TOC16_DS (63)
136 ELF-PPC64: Type: R_PPC64_TOC16_LO_DS (64)
137 ELF-PPC64: Type: R_PPC64_TLS (67)
138 ELF-PPC64: Type: R_PPC64_TPREL16_LO (70)
139 ELF-PPC64: Type: R_PPC64_TPREL16_HA (72)
140 ELF-PPC64: Type: R_PPC64_DTPREL16_LO (75)
141 ELF-PPC64: Type: R_PPC64_DTPREL16_HA (77)
142 ELF-PPC64: Type: R_PPC64_GOT_TLSGD16_LO (80)
143 ELF-PPC64: Type: R_PPC64_GOT_TLSGD16_HA (82)
144 ELF-PPC64: Type: R_PPC64_GOT_TLSLD16_LO (84)
145 ELF-PPC64: Type: R_PPC64_GOT_TLSLD16_HA (86)
146 ELF-PPC64: Type: R_PPC64_GOT_TPREL16_LO_DS (88)
147 ELF-PPC64: Type: R_PPC64_GOT_TPREL16_HA (90)
148 ELF-PPC64: Type: R_PPC64_TLSGD (107)
149 ELF-PPC64: Type: R_PPC64_TLSLD (108)
150
151 ELF-AARCH64: Type: R_AARCH64_NONE (256)
152 ELF-AARCH64: Type: R_AARCH64_ABS64 (257)
153 ELF-AARCH64: Type: R_AARCH64_ABS32 (258)
154 ELF-AARCH64: Type: R_AARCH64_ABS16 (259)
155 ELF-AARCH64: Type: R_AARCH64_PREL64 (260)
156 ELF-AARCH64: Type: R_AARCH64_PREL32 (261)
157 ELF-AARCH64: Type: R_AARCH64_PREL16 (262)
158 ELF-AARCH64: Type: R_AARCH64_MOVW_UABS_G0 (263)
159 ELF-AARCH64: Type: R_AARCH64_MOVW_UABS_G0_NC (264)
160 ELF-AARCH64: Type: R_AARCH64_MOVW_UABS_G1 (265)
161 ELF-AARCH64: Type: R_AARCH64_MOVW_UABS_G1_NC (266)
162 ELF-AARCH64: Type: R_AARCH64_MOVW_UABS_G2 (267)
163 ELF-AARCH64: Type: R_AARCH64_MOVW_UABS_G2_NC (268)
164 ELF-AARCH64: Type: R_AARCH64_MOVW_UABS_G3 (269)
165 ELF-AARCH64: Type: R_AARCH64_MOVW_SABS_G0 (270)
166 ELF-AARCH64: Type: R_AARCH64_MOVW_SABS_G1 (271)
167 ELF-AARCH64: Type: R_AARCH64_MOVW_SABS_G2 (272)
168 ELF-AARCH64: Type: R_AARCH64_LD_PREL_LO19 (273)
169 ELF-AARCH64: Type: R_AARCH64_ADR_PREL_LO21 (274)
170 ELF-AARCH64: Type: R_AARCH64_ADR_PREL_PG_HI21 (275)
171 ELF-AARCH64: Type: R_AARCH64_ADD_ABS_LO12_NC (277)
172 ELF-AARCH64: Type: R_AARCH64_LDST8_ABS_LO12_NC (278)
173 ELF-AARCH64: Type: R_AARCH64_TSTBR14 (279)
174 ELF-AARCH64: Type: R_AARCH64_CONDBR19 (280)
175 ELF-AARCH64: Type: R_AARCH64_JUMP26 (282)
176 ELF-AARCH64: Type: R_AARCH64_CALL26 (283)
177 ELF-AARCH64: Type: R_AARCH64_LDST16_ABS_LO12_NC (284)
178 ELF-AARCH64: Type: R_AARCH64_LDST32_ABS_LO12_NC (285)
179 ELF-AARCH64: Type: R_AARCH64_LDST64_ABS_LO12_NC (286)
180 ELF-AARCH64: Type: R_AARCH64_LDST128_ABS_LO12_NC (299)
181 ELF-AARCH64: Type: R_AARCH64_ADR_GOT_PAGE (311)
182 ELF-AARCH64: Type: R_AARCH64_LD64_GOT_LO12_NC (312)
183 ELF-AARCH64: Type: R_AARCH64_TLSLD_MOVW_DTPREL_G2 (523)
184 ELF-AARCH64: Type: R_AARCH64_TLSLD_MOVW_DTPREL_G1 (524)
185 ELF-AARCH64: Type: R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC (525)
186 ELF-AARCH64: Type: R_AARCH64_TLSLD_MOVW_DTPREL_G0 (526)
187 ELF-AARCH64: Type: R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC (527)
188 ELF-AARCH64: Type: R_AARCH64_TLSLD_ADD_DTPREL_HI12 (528)
189 ELF-AARCH64: Type: R_AARCH64_TLSLD_ADD_DTPREL_LO12 (529)
190 ELF-AARCH64: Type: R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC (530)
191 ELF-AARCH64: Type: R_AARCH64_TLSLD_LDST8_DTPREL_LO12 (531)
192 ELF-AARCH64: Type: R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC (532)
193 ELF-AARCH64: Type: R_AARCH64_TLSLD_LDST16_DTPREL_LO12 (533)
194 ELF-AARCH64: Type: R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC (534)
195 ELF-AARCH64: Type: R_AARCH64_TLSLD_LDST32_DTPREL_LO12 (535)
196 ELF-AARCH64: Type: R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC (536)
197 ELF-AARCH64: Type: R_AARCH64_TLSLD_LDST64_DTPREL_LO12 (537)
198 ELF-AARCH64: Type: R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC (538)
199 ELF-AARCH64: Type: R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 (539)
200 ELF-AARCH64: Type: R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC (540)
201 ELF-AARCH64: Type: R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 (541)
202 ELF-AARCH64: Type: R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC (542)
203 ELF-AARCH64: Type: R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 (543)
204 ELF-AARCH64: Type: R_AARCH64_TLSLE_MOVW_TPREL_G2 (544)
205 ELF-AARCH64: Type: R_AARCH64_TLSLE_MOVW_TPREL_G1 (545)
206 ELF-AARCH64: Type: R_AARCH64_TLSLE_MOVW_TPREL_G1_NC (546)
207 ELF-AARCH64: Type: R_AARCH64_TLSLE_MOVW_TPREL_G0 (547)
208 ELF-AARCH64: Type: R_AARCH64_TLSLE_MOVW_TPREL_G0_NC (548)
209 ELF-AARCH64: Type: R_AARCH64_TLSLE_ADD_TPREL_HI12 (549)
210 ELF-AARCH64: Type: R_AARCH64_TLSLE_ADD_TPREL_LO12 (550)
211 ELF-AARCH64: Type: R_AARCH64_TLSLE_ADD_TPREL_LO12_NC (551)
212 ELF-AARCH64: Type: R_AARCH64_TLSLE_LDST8_TPREL_LO12 (552)
213 ELF-AARCH64: Type: R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC (553)
214 ELF-AARCH64: Type: R_AARCH64_TLSLE_LDST16_TPREL_LO12 (554)
215 ELF-AARCH64: Type: R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC (555)
216 ELF-AARCH64: Type: R_AARCH64_TLSLE_LDST32_TPREL_LO12 (556)
217 ELF-AARCH64: Type: R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC (557)
218 ELF-AARCH64: Type: R_AARCH64_TLSLE_LDST64_TPREL_LO12 (558)
219 ELF-AARCH64: Type: R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC (559)
220 ELF-AARCH64: Type: R_AARCH64_TLSDESC_ADR_PAGE (562)
221 ELF-AARCH64: Type: R_AARCH64_TLSDESC_LD64_LO12_NC (563)
222 ELF-AARCH64: Type: R_AARCH64_TLSDESC_ADD_LO12_NC (564)
223 ELF-AARCH64: Type: R_AARCH64_TLSDESC_CALL (569)
224
225 ELF-ARM: Type: R_ARM_NONE (0)
226 ELF-ARM: Type: R_ARM_PC24 (1)
227 ELF-ARM: Type: R_ARM_ABS32 (2)
228 ELF-ARM: Type: R_ARM_REL32 (3)
229 ELF-ARM: Type: R_ARM_LDR_PC_G0 (4)
230 ELF-ARM: Type: R_ARM_ABS16 (5)
231 ELF-ARM: Type: R_ARM_ABS12 (6)
232 ELF-ARM: Type: R_ARM_THM_ABS5 (7)
233 ELF-ARM: Type: R_ARM_ABS8 (8)
234 ELF-ARM: Type: R_ARM_SBREL32 (9)
235 ELF-ARM: Type: R_ARM_THM_CALL (10)
236 ELF-ARM: Type: R_ARM_THM_PC8 (11)
237 ELF-ARM: Type: R_ARM_BREL_ADJ (12)
238 ELF-ARM: Type: R_ARM_TLS_DESC (13)
239 ELF-ARM: Type: R_ARM_THM_SWI8 (14)
240 ELF-ARM: Type: R_ARM_XPC25 (15)
241 ELF-ARM: Type: R_ARM_THM_XPC22 (16)
242 ELF-ARM: Type: R_ARM_TLS_DTPMOD32 (17)
243 ELF-ARM: Type: R_ARM_TLS_DTPOFF32 (18)
244 ELF-ARM: Type: R_ARM_TLS_TPOFF32 (19)
245 ELF-ARM: Type: R_ARM_COPY (20)
246 ELF-ARM: Type: R_ARM_GLOB_DAT (21)
247 ELF-ARM: Type: R_ARM_JUMP_SLOT (22)
248 ELF-ARM: Type: R_ARM_RELATIVE (23)
249 ELF-ARM: Type: R_ARM_GOTOFF32 (24)
250 ELF-ARM: Type: R_ARM_BASE_PREL (25)
251 ELF-ARM: Type: R_ARM_GOT_BREL (26)
252 ELF-ARM: Type: R_ARM_PLT32 (27)
253 ELF-ARM: Type: R_ARM_CALL (28)
254 ELF-ARM: Type: R_ARM_JUMP24 (29)
255 ELF-ARM: Type: R_ARM_THM_JUMP24 (30)
256 ELF-ARM: Type: R_ARM_BASE_ABS (31)
257 ELF-ARM: Type: R_ARM_ALU_PCREL_7_0 (32)
258 ELF-ARM: Type: R_ARM_ALU_PCREL_15_8 (33)
259 ELF-ARM: Type: R_ARM_ALU_PCREL_23_15 (34)
260 ELF-ARM: Type: R_ARM_LDR_SBREL_11_0_NC (35)
261 ELF-ARM: Type: R_ARM_ALU_SBREL_19_12_NC (36)
262 ELF-ARM: Type: R_ARM_ALU_SBREL_27_20_CK (37)
263 ELF-ARM: Type: R_ARM_TARGET1 (38)
264 ELF-ARM: Type: R_ARM_SBREL31 (39)
265 ELF-ARM: Type: R_ARM_V4BX (40)
266 ELF-ARM: Type: R_ARM_TARGET2 (41)
267 ELF-ARM: Type: R_ARM_PREL31 (42)
268 ELF-ARM: Type: R_ARM_MOVW_ABS_NC (43)
269 ELF-ARM: Type: R_ARM_MOVT_ABS (44)
270 ELF-ARM: Type: R_ARM_MOVW_PREL_NC (45)
271 ELF-ARM: Type: R_ARM_MOVT_PREL (46)
272 ELF-ARM: Type: R_ARM_THM_MOVW_ABS_NC (47)
273 ELF-ARM: Type: R_ARM_THM_MOVT_ABS (48)
274 ELF-ARM: Type: R_ARM_THM_MOVW_PREL_NC (49)
275 ELF-ARM: Type: R_ARM_THM_MOVT_PREL (50)
276 ELF-ARM: Type: R_ARM_THM_JUMP19 (51)
277 ELF-ARM: Type: R_ARM_THM_JUMP6 (52)
278 ELF-ARM: Type: R_ARM_THM_ALU_PREL_11_0 (53)
279 ELF-ARM: Type: R_ARM_THM_PC12 (54)
280 ELF-ARM: Type: R_ARM_ABS32_NOI (55)
281 ELF-ARM: Type: R_ARM_REL32_NOI (56)
282 ELF-ARM: Type: R_ARM_ALU_PC_G0_NC (57)
283 ELF-ARM: Type: R_ARM_ALU_PC_G0 (58)
284 ELF-ARM: Type: R_ARM_ALU_PC_G1_NC (59)
285 ELF-ARM: Type: R_ARM_ALU_PC_G1 (60)
286 ELF-ARM: Type: R_ARM_ALU_PC_G2 (61)
287 ELF-ARM: Type: R_ARM_LDR_PC_G1 (62)
288 ELF-ARM: Type: R_ARM_LDR_PC_G2 (63)
289 ELF-ARM: Type: R_ARM_LDRS_PC_G0 (64)
290 ELF-ARM: Type: R_ARM_LDRS_PC_G1 (65)
291 ELF-ARM: Type: R_ARM_LDRS_PC_G2 (66)
292 ELF-ARM: Type: R_ARM_LDC_PC_G0 (67)
293 ELF-ARM: Type: R_ARM_LDC_PC_G1 (68)
294 ELF-ARM: Type: R_ARM_LDC_PC_G2 (69)
295 ELF-ARM: Type: R_ARM_ALU_SB_G0_NC (70)
296 ELF-ARM: Type: R_ARM_ALU_SB_G0 (71)
297 ELF-ARM: Type: R_ARM_ALU_SB_G1_NC (72)
298 ELF-ARM: Type: R_ARM_ALU_SB_G1 (73)
299 ELF-ARM: Type: R_ARM_ALU_SB_G2 (74)
300 ELF-ARM: Type: R_ARM_LDR_SB_G0 (75)
301 ELF-ARM: Type: R_ARM_LDR_SB_G1 (76)
302 ELF-ARM: Type: R_ARM_LDR_SB_G2 (77)
303 ELF-ARM: Type: R_ARM_LDRS_SB_G0 (78)
304 ELF-ARM: Type: R_ARM_LDRS_SB_G1 (79)
305 ELF-ARM: Type: R_ARM_LDRS_SB_G2 (80)
306 ELF-ARM: Type: R_ARM_LDC_SB_G0 (81)
307 ELF-ARM: Type: R_ARM_LDC_SB_G1 (82)
308 ELF-ARM: Type: R_ARM_LDC_SB_G2 (83)
309 ELF-ARM: Type: R_ARM_MOVW_BREL_NC (84)
310 ELF-ARM: Type: R_ARM_MOVT_BREL (85)
311 ELF-ARM: Type: R_ARM_MOVW_BREL (86)
312 ELF-ARM: Type: R_ARM_THM_MOVW_BREL_NC (87)
313 ELF-ARM: Type: R_ARM_THM_MOVT_BREL (88)
314 ELF-ARM: Type: R_ARM_THM_MOVW_BREL (89)
315 ELF-ARM: Type: R_ARM_TLS_GOTDESC (90)
316 ELF-ARM: Type: R_ARM_TLS_CALL (91)
317 ELF-ARM: Type: R_ARM_TLS_DESCSEQ (92)
318 ELF-ARM: Type: R_ARM_THM_TLS_CALL (93)
319 ELF-ARM: Type: R_ARM_PLT32_ABS (94)
320 ELF-ARM: Type: R_ARM_GOT_ABS (95)
321 ELF-ARM: Type: R_ARM_GOT_PREL (96)
322 ELF-ARM: Type: R_ARM_GOT_BREL12 (97)
323 ELF-ARM: Type: R_ARM_GOTOFF12 (98)
324 ELF-ARM: Type: R_ARM_GOTRELAX (99)
325 ELF-ARM: Type: R_ARM_GNU_VTENTRY (100)
326 ELF-ARM: Type: R_ARM_GNU_VTINHERIT (101)
327 ELF-ARM: Type: R_ARM_THM_JUMP11 (102)
328 ELF-ARM: Type: R_ARM_THM_JUMP8 (103)
329 ELF-ARM: Type: R_ARM_TLS_GD32 (104)
330 ELF-ARM: Type: R_ARM_TLS_LDM32 (105)
331 ELF-ARM: Type: R_ARM_TLS_LDO32 (106)
332 ELF-ARM: Type: R_ARM_TLS_IE32 (107)
333 ELF-ARM: Type: R_ARM_TLS_LE32 (108)
334 ELF-ARM: Type: R_ARM_TLS_LDO12 (109)
335 ELF-ARM: Type: R_ARM_TLS_LE12 (110)
336 ELF-ARM: Type: R_ARM_TLS_IE12GP (111)
337 ELF-ARM: Type: R_ARM_PRIVATE_0 (112)
338 ELF-ARM: Type: R_ARM_PRIVATE_1 (113)
339 ELF-ARM: Type: R_ARM_PRIVATE_2 (114)
340 ELF-ARM: Type: R_ARM_PRIVATE_3 (115)
341 ELF-ARM: Type: R_ARM_PRIVATE_4 (116)
342 ELF-ARM: Type: R_ARM_PRIVATE_5 (117)
343 ELF-ARM: Type: R_ARM_PRIVATE_6 (118)
344 ELF-ARM: Type: R_ARM_PRIVATE_7 (119)
345 ELF-ARM: Type: R_ARM_PRIVATE_8 (120)
346 ELF-ARM: Type: R_ARM_PRIVATE_9 (121)
347 ELF-ARM: Type: R_ARM_PRIVATE_10 (122)
348 ELF-ARM: Type: R_ARM_PRIVATE_11 (123)
349 ELF-ARM: Type: R_ARM_PRIVATE_12 (124)
350 ELF-ARM: Type: R_ARM_PRIVATE_13 (125)
351 ELF-ARM: Type: R_ARM_PRIVATE_14 (126)
352 ELF-ARM: Type: R_ARM_PRIVATE_15 (127)
353 ELF-ARM: Type: R_ARM_ME_TOO (128)
354 ELF-ARM: Type: R_ARM_THM_TLS_DESCSEQ16 (129)
355 ELF-ARM: Type: R_ARM_THM_TLS_DESCSEQ32 (130)
356
357 ELF-MIPS: Type: R_MIPS_NONE (0)
358 ELF-MIPS: Type: R_MIPS_16 (1)
359 ELF-MIPS: Type: R_MIPS_32 (2)
360 ELF-MIPS: Type: R_MIPS_REL32 (3)
361 ELF-MIPS: Type: R_MIPS_26 (4)
362 ELF-MIPS: Type: R_MIPS_HI16 (5)
363 ELF-MIPS: Type: R_MIPS_LO16 (6)
364 ELF-MIPS: Type: R_MIPS_GPREL16 (7)
365 ELF-MIPS: Type: R_MIPS_LITERAL (8)
366 ELF-MIPS: Type: R_MIPS_GOT16 (9)
367 ELF-MIPS: Type: R_MIPS_PC16 (10)
368 ELF-MIPS: Type: R_MIPS_CALL16 (11)
369 ELF-MIPS: Type: R_MIPS_GPREL32 (12)
370 ELF-MIPS: Type: R_MIPS_SHIFT5 (16)
371 ELF-MIPS: Type: R_MIPS_SHIFT6 (17)
372 ELF-MIPS: Type: R_MIPS_64 (18)
373 ELF-MIPS: Type: R_MIPS_GOT_DISP (19)
374 ELF-MIPS: Type: R_MIPS_GOT_PAGE (20)
375 ELF-MIPS: Type: R_MIPS_GOT_OFST (21)
376 ELF-MIPS: Type: R_MIPS_GOT_HI16 (22)
377 ELF-MIPS: Type: R_MIPS_GOT_LO16 (23)
378 ELF-MIPS: Type: R_MIPS_SUB (24)
379 ELF-MIPS: Type: R_MIPS_INSERT_A (25)
380 ELF-MIPS: Type: R_MIPS_INSERT_B (26)
381 ELF-MIPS: Type: R_MIPS_DELETE (27)
382 ELF-MIPS: Type: R_MIPS_HIGHER (28)
383 ELF-MIPS: Type: R_MIPS_HIGHEST (29)
384 ELF-MIPS: Type: R_MIPS_CALL_HI16 (30)
385 ELF-MIPS: Type: R_MIPS_CALL_LO16 (31)
386 ELF-MIPS: Type: R_MIPS_SCN_DISP (32)
387 ELF-MIPS: Type: R_MIPS_REL16 (33)
388 ELF-MIPS: Type: R_MIPS_ADD_IMMEDIATE (34)
389 ELF-MIPS: Type: R_MIPS_PJUMP (35)
390 ELF-MIPS: Type: R_MIPS_RELGOT (36)
391 ELF-MIPS: Type: R_MIPS_JALR (37)
392 ELF-MIPS: Type: R_MIPS_TLS_DTPMOD32 (38)
393 ELF-MIPS: Type: R_MIPS_TLS_DTPREL32 (39)
394 ELF-MIPS: Type: R_MIPS_TLS_DTPMOD64 (40)
395 ELF-MIPS: Type: R_MIPS_TLS_DTPREL64 (41)
396 ELF-MIPS: Type: R_MIPS_TLS_GD (42)
397 ELF-MIPS: Type: R_MIPS_TLS_LDM (43)
398 ELF-MIPS: Type: R_MIPS_TLS_DTPREL_HI16 (44)
399 ELF-MIPS: Type: R_MIPS_TLS_DTPREL_LO16 (45)
400 ELF-MIPS: Type: R_MIPS_TLS_GOTTPREL (46)
401 ELF-MIPS: Type: R_MIPS_TLS_TPREL32 (47)
402 ELF-MIPS: Type: R_MIPS_TLS_TPREL64 (48)
403 ELF-MIPS: Type: R_MIPS_TLS_TPREL_HI16 (49)
404 ELF-MIPS: Type: R_MIPS_TLS_TPREL_LO16 (50)
405 ELF-MIPS: Type: R_MIPS_GLOB_DAT (51)
406 ELF-MIPS: Type: R_MIPS_COPY (126)
407 ELF-MIPS: Type: R_MIPS_JUMP_SLOT (127)
408 ELF-MIPS: Type: R_MIPS_NUM (218)
409 ELF-MIPS64EL: Type: R_MIPS_NONE/R_MIPS_NONE/R_MIPS_NONE (0)
410 ELF-MIPS64EL: Type: R_MIPS_16/R_MIPS_16/R_MIPS_16 (65793)
411 ELF-MIPS64EL: Type: R_MIPS_32/R_MIPS_32/R_MIPS_32 (131586)
412 ELF-MIPS64EL: Type: R_MIPS_REL32/R_MIPS_REL32/R_MIPS_REL32 (197379)
413 ELF-MIPS64EL: Type: R_MIPS_26/R_MIPS_26/R_MIPS_26 (263172)
414 ELF-MIPS64EL: Type: R_MIPS_HI16/R_MIPS_HI16/R_MIPS_HI16 (328965)
415 ELF-MIPS64EL: Type: R_MIPS_LO16/R_MIPS_LO16/R_MIPS_LO16 (394758)
416 ELF-MIPS64EL: Type: R_MIPS_GPREL16/R_MIPS_GPREL16/R_MIPS_GPREL16 (460551)
417 ELF-MIPS64EL: Type: R_MIPS_LITERAL/R_MIPS_LITERAL/R_MIPS_LITERAL (526344)
418 ELF-MIPS64EL: Type: R_MIPS_GOT16/R_MIPS_GOT16/R_MIPS_GOT16 (592137)
419 ELF-MIPS64EL: Type: R_MIPS_PC16/R_MIPS_PC16/R_MIPS_PC16 (657930)
420 ELF-MIPS64EL: Type: R_MIPS_CALL16/R_MIPS_CALL16/R_MIPS_CALL16 (723723)
421 ELF-MIPS64EL: Type: R_MIPS_GPREL32/R_MIPS_GPREL32/R_MIPS_GPREL32 (789516)
422 ELF-MIPS64EL: Type: R_MIPS_SHIFT5/R_MIPS_SHIFT5/R_MIPS_SHIFT5 (1052688)
423 ELF-MIPS64EL: Type: R_MIPS_SHIFT6/R_MIPS_SHIFT6/R_MIPS_SHIFT6 (1118481)
424 ELF-MIPS64EL: Type: R_MIPS_64/R_MIPS_64/R_MIPS_64 (1184274)
425 ELF-MIPS64EL: Type: R_MIPS_GOT_DISP/R_MIPS_GOT_DISP/R_MIPS_GOT_DISP (1250067)
426 ELF-MIPS64EL: Type: R_MIPS_GOT_PAGE/R_MIPS_GOT_PAGE/R_MIPS_GOT_PAGE (1315860)
427 ELF-MIPS64EL: Type: R_MIPS_GOT_OFST/R_MIPS_GOT_OFST/R_MIPS_GOT_OFST (1381653)
428 ELF-MIPS64EL: Type: R_MIPS_GOT_HI16/R_MIPS_GOT_HI16/R_MIPS_GOT_HI16 (1447446)
429 ELF-MIPS64EL: Type: R_MIPS_GOT_LO16/R_MIPS_GOT_LO16/R_MIPS_GOT_LO16 (1513239)
430 ELF-MIPS64EL: Type: R_MIPS_SUB/R_MIPS_SUB/R_MIPS_SUB (1579032)
431 ELF-MIPS64EL: Type: R_MIPS_INSERT_A/R_MIPS_INSERT_A/R_MIPS_INSERT_A (1644825)
432 ELF-MIPS64EL: Type: R_MIPS_INSERT_B/R_MIPS_INSERT_B/R_MIPS_INSERT_B (1710618)
433 ELF-MIPS64EL: Type: R_MIPS_DELETE/R_MIPS_DELETE/R_MIPS_DELETE (1776411)
434 ELF-MIPS64EL: Type: R_MIPS_HIGHER/R_MIPS_HIGHER/R_MIPS_HIGHER (1842204)
435 ELF-MIPS64EL: Type: R_MIPS_HIGHEST/R_MIPS_HIGHEST/R_MIPS_HIGHEST (1907997)
436 ELF-MIPS64EL: Type: R_MIPS_CALL_HI16/R_MIPS_CALL_HI16/R_MIPS_CALL_HI16 (1973790)
437 ELF-MIPS64EL: Type: R_MIPS_CALL_LO16/R_MIPS_CALL_LO16/R_MIPS_CALL_LO16 (2039583)
438 ELF-MIPS64EL: Type: R_MIPS_SCN_DISP/R_MIPS_SCN_DISP/R_MIPS_SCN_DISP (2105376)
439 ELF-MIPS64EL: Type: R_MIPS_REL16/R_MIPS_REL16/R_MIPS_REL16 (2171169)
440 ELF-MIPS64EL: Type: R_MIPS_ADD_IMMEDIATE/R_MIPS_ADD_IMMEDIATE/R_MIPS_ADD_IMMEDIATE (2236962)
441 ELF-MIPS64EL: Type: R_MIPS_PJUMP/R_MIPS_PJUMP/R_MIPS_PJUMP (2302755)
442 ELF-MIPS64EL: Type: R_MIPS_RELGOT/R_MIPS_RELGOT/R_MIPS_RELGOT (2368548)
443 ELF-MIPS64EL: Type: R_MIPS_JALR/R_MIPS_JALR/R_MIPS_JALR (2434341)
444 ELF-MIPS64EL: Type: R_MIPS_TLS_DTPMOD32/R_MIPS_TLS_DTPMOD32/R_MIPS_TLS_DTPMOD32 (2500134)
445 ELF-MIPS64EL: Type: R_MIPS_TLS_DTPREL32/R_MIPS_TLS_DTPREL32/R_MIPS_TLS_DTPREL32 (2565927)
446 ELF-MIPS64EL: Type: R_MIPS_TLS_DTPMOD64/R_MIPS_TLS_DTPMOD64/R_MIPS_TLS_DTPMOD64 (2631720)
447 ELF-MIPS64EL: Type: R_MIPS_TLS_DTPREL64/R_MIPS_TLS_DTPREL64/R_MIPS_TLS_DTPREL64 (2697513)
448 ELF-MIPS64EL: Type: R_MIPS_TLS_GD/R_MIPS_TLS_GD/R_MIPS_TLS_GD (2763306)
449 ELF-MIPS64EL: Type: R_MIPS_TLS_LDM/R_MIPS_TLS_LDM/R_MIPS_TLS_LDM (2829099)
450 ELF-MIPS64EL: Type: R_MIPS_TLS_DTPREL_HI16/R_MIPS_TLS_DTPREL_HI16/R_MIPS_TLS_DTPREL_HI16 (2894892)
451 ELF-MIPS64EL: Type: R_MIPS_TLS_DTPREL_LO16/R_MIPS_TLS_DTPREL_LO16/R_MIPS_TLS_DTPREL_LO16 (2960685)
452 ELF-MIPS64EL: Type: R_MIPS_TLS_GOTTPREL/R_MIPS_TLS_GOTTPREL/R_MIPS_TLS_GOTTPREL (3026478)
453 ELF-MIPS64EL: Type: R_MIPS_TLS_TPREL32/R_MIPS_TLS_TPREL32/R_MIPS_TLS_TPREL32 (3092271)
454 ELF-MIPS64EL: Type: R_MIPS_TLS_TPREL64/R_MIPS_TLS_TPREL64/R_MIPS_TLS_TPREL64 (3158064)
455 ELF-MIPS64EL: Type: R_MIPS_TLS_TPREL_HI16/R_MIPS_TLS_TPREL_HI16/R_MIPS_TLS_TPREL_HI16 (3223857)
456 ELF-MIPS64EL: Type: R_MIPS_TLS_TPREL_LO16/R_MIPS_TLS_TPREL_LO16/R_MIPS_TLS_TPREL_LO16 (3289650)
457 ELF-MIPS64EL: Type: R_MIPS_GLOB_DAT/R_MIPS_GLOB_DAT/R_MIPS_GLOB_DAT (3355443)
458 ELF-MIPS64EL: Type: R_MIPS_COPY/R_MIPS_COPY/R_MIPS_COPY (8289918)
459 ELF-MIPS64EL: Type: R_MIPS_JUMP_SLOT/R_MIPS_JUMP_SLOT/R_MIPS_JUMP_SLOT (8355711)
460 ELF-MIPS64EL: Type: R_MIPS_NUM/R_MIPS_NUM/R_MIPS_NUM (14342874)
461
462 ELF-MBLAZE: Type: R_MICROBLAZE_NONE (0)
463 ELF-MBLAZE: Type: R_MICROBLAZE_32 (1)
464 ELF-MBLAZE: Type: R_MICROBLAZE_32_PCREL (2)
465 ELF-MBLAZE: Type: R_MICROBLAZE_64_PCREL (3)
466 ELF-MBLAZE: Type: R_MICROBLAZE_32_PCREL_LO (4)
467 ELF-MBLAZE: Type: R_MICROBLAZE_64 (5)
468 ELF-MBLAZE: Type: R_MICROBLAZE_32_LO (6)
469 ELF-MBLAZE: Type: R_MICROBLAZE_SRO32 (7)
470 ELF-MBLAZE: Type: R_MICROBLAZE_SRW32 (8)
471 ELF-MBLAZE: Type: R_MICROBLAZE_64_NONE (9)
472 ELF-MBLAZE: Type: R_MICROBLAZE_32_SYM_OP_SYM (10)
473 ELF-MBLAZE: Type: R_MICROBLAZE_GNU_VTINHERIT (11)
474 ELF-MBLAZE: Type: R_MICROBLAZE_GNU_VTENTRY (12)
475 ELF-MBLAZE: Type: R_MICROBLAZE_GOTPC_64 (13)
476 ELF-MBLAZE: Type: R_MICROBLAZE_GOT_64 (14)
477 ELF-MBLAZE: Type: R_MICROBLAZE_PLT_64 (15)
478 ELF-MBLAZE: Type: R_MICROBLAZE_REL (16)
479 ELF-MBLAZE: Type: R_MICROBLAZE_JUMP_SLOT (17)
480 ELF-MBLAZE: Type: R_MICROBLAZE_GLOB_DAT (18)
481 ELF-MBLAZE: Type: R_MICROBLAZE_GOTOFF_64 (19)
482 ELF-MBLAZE: Type: R_MICROBLAZE_GOTOFF_32 (20)
483 ELF-MBLAZE: Type: R_MICROBLAZE_COPY (21)
484
485 ELF-HEXAGON: Type: R_HEX_NONE (0)
486 ELF-HEXAGON: Type: R_HEX_B22_PCREL (1)
487 ELF-HEXAGON: Type: R_HEX_B15_PCREL (2)
488 ELF-HEXAGON: Type: R_HEX_B7_PCREL (3)
489 ELF-HEXAGON: Type: R_HEX_LO16 (4)
490 ELF-HEXAGON: Type: R_HEX_HI16 (5)
491 ELF-HEXAGON: Type: R_HEX_32 (6)
492 ELF-HEXAGON: Type: R_HEX_16 (7)
493 ELF-HEXAGON: Type: R_HEX_8 (8)
494 ELF-HEXAGON: Type: R_HEX_GPREL16_0 (9)
495 ELF-HEXAGON: Type: R_HEX_GPREL16_1 (10)
496 ELF-HEXAGON: Type: R_HEX_GPREL16_2 (11)
497 ELF-HEXAGON: Type: R_HEX_GPREL16_3 (12)
498 ELF-HEXAGON: Type: R_HEX_HL16 (13)
499 ELF-HEXAGON: Type: R_HEX_B13_PCREL (14)
500 ELF-HEXAGON: Type: R_HEX_B9_PCREL (15)
501 ELF-HEXAGON: Type: R_HEX_B32_PCREL_X (16)
502 ELF-HEXAGON: Type: R_HEX_32_6_X (17)
503 ELF-HEXAGON: Type: R_HEX_B22_PCREL_X (18)
504 ELF-HEXAGON: Type: R_HEX_B15_PCREL_X (19)
505 ELF-HEXAGON: Type: R_HEX_B13_PCREL_X (20)
506 ELF-HEXAGON: Type: R_HEX_B9_PCREL_X (21)
507 ELF-HEXAGON: Type: R_HEX_B7_PCREL_X (22)
508 ELF-HEXAGON: Type: R_HEX_16_X (23)
509 ELF-HEXAGON: Type: R_HEX_12_X (24)
510 ELF-HEXAGON: Type: R_HEX_11_X (25)
511 ELF-HEXAGON: Type: R_HEX_10_X (26)
512 ELF-HEXAGON: Type: R_HEX_9_X (27)
513 ELF-HEXAGON: Type: R_HEX_8_X (28)
514 ELF-HEXAGON: Type: R_HEX_7_X (29)
515 ELF-HEXAGON: Type: R_HEX_6_X (30)
516 ELF-HEXAGON: Type: R_HEX_32_PCREL (31)
517 ELF-HEXAGON: Type: R_HEX_COPY (32)
518 ELF-HEXAGON: Type: R_HEX_GLOB_DAT (33)
519 ELF-HEXAGON: Type: R_HEX_JMP_SLOT (34)
520 ELF-HEXAGON: Type: R_HEX_RELATIVE (35)
521 ELF-HEXAGON: Type: R_HEX_PLT_B22_PCREL (36)
522 ELF-HEXAGON: Type: R_HEX_GOTREL_LO16 (37)
523 ELF-HEXAGON: Type: R_HEX_GOTREL_HI16 (38)
524 ELF-HEXAGON: Type: R_HEX_GOTREL_32 (39)
525 ELF-HEXAGON: Type: R_HEX_GOT_LO16 (40)
526 ELF-HEXAGON: Type: R_HEX_GOT_HI16 (41)
527 ELF-HEXAGON: Type: R_HEX_GOT_32 (42)
528 ELF-HEXAGON: Type: R_HEX_GOT_16 (43)
529 ELF-HEXAGON: Type: R_HEX_DTPMOD_32 (44)
530 ELF-HEXAGON: Type: R_HEX_DTPREL_LO16 (45)
531 ELF-HEXAGON: Type: R_HEX_DTPREL_HI16 (46)
532 ELF-HEXAGON: Type: R_HEX_DTPREL_32 (47)
533 ELF-HEXAGON: Type: R_HEX_DTPREL_16 (48)
534 ELF-HEXAGON: Type: R_HEX_GD_PLT_B22_PCREL (49)
535 ELF-HEXAGON: Type: R_HEX_GD_GOT_LO16 (50)
536 ELF-HEXAGON: Type: R_HEX_GD_GOT_HI16 (51)
537 ELF-HEXAGON: Type: R_HEX_GD_GOT_32 (52)
538 ELF-HEXAGON: Type: R_HEX_GD_GOT_16 (53)
539 ELF-HEXAGON: Type: R_HEX_IE_LO16 (54)
540 ELF-HEXAGON: Type: R_HEX_IE_HI16 (55)
541 ELF-HEXAGON: Type: R_HEX_IE_32 (56)
542 ELF-HEXAGON: Type: R_HEX_IE_GOT_LO16 (57)
543 ELF-HEXAGON: Type: R_HEX_IE_GOT_HI16 (58)
544 ELF-HEXAGON: Type: R_HEX_IE_GOT_32 (59)
545 ELF-HEXAGON: Type: R_HEX_IE_GOT_16 (60)
546 ELF-HEXAGON: Type: R_HEX_TPREL_LO16 (61)
547 ELF-HEXAGON: Type: R_HEX_TPREL_HI16 (62)
548 ELF-HEXAGON: Type: R_HEX_TPREL_32 (63)
549 ELF-HEXAGON: Type: R_HEX_TPREL_16 (64)
550 ELF-HEXAGON: Type: R_HEX_6_PCREL_X (65)
551 ELF-HEXAGON: Type: R_HEX_GOTREL_32_6_X (66)
552 ELF-HEXAGON: Type: R_HEX_GOTREL_16_X (67)
553 ELF-HEXAGON: Type: R_HEX_GOTREL_11_X (68)
554 ELF-HEXAGON: Type: R_HEX_GOT_32_6_X (69)
555 ELF-HEXAGON: Type: R_HEX_GOT_16_X (70)
556 ELF-HEXAGON: Type: R_HEX_GOT_11_X (71)
557 ELF-HEXAGON: Type: R_HEX_DTPREL_32_6_X (72)
558 ELF-HEXAGON: Type: R_HEX_DTPREL_16_X (73)
559 ELF-HEXAGON: Type: R_HEX_DTPREL_11_X (74)
560 ELF-HEXAGON: Type: R_HEX_GD_GOT_32_6_X (75)
561 ELF-HEXAGON: Type: R_HEX_GD_GOT_16_X (76)
562 ELF-HEXAGON: Type: R_HEX_GD_GOT_11_X (77)
563 ELF-HEXAGON: Type: R_HEX_IE_32_6_X (78)
564 ELF-HEXAGON: Type: R_HEX_IE_16_X (79)
565 ELF-HEXAGON: Type: R_HEX_IE_GOT_32_6_X (80)
566 ELF-HEXAGON: Type: R_HEX_IE_GOT_16_X (81)
567 ELF-HEXAGON: Type: R_HEX_IE_GOT_11_X (82)
568 ELF-HEXAGON: Type: R_HEX_TPREL_32_6_X (83)
569 ELF-HEXAGON: Type: R_HEX_TPREL_16_X (84)
570 ELF-HEXAGON: Type: R_HEX_TPREL_11_X (85)
571
572 COFF-32: Type: IMAGE_REL_I386_ABSOLUTE (0)
573 COFF-32: Type: IMAGE_REL_I386_DIR16 (1)
574 COFF-32: Type: IMAGE_REL_I386_REL16 (2)
575 COFF-32: Type: IMAGE_REL_I386_DIR32 (6)
576 COFF-32: Type: IMAGE_REL_I386_DIR32NB (7)
577 COFF-32: Type: IMAGE_REL_I386_SEG12 (9)
578 COFF-32: Type: IMAGE_REL_I386_SECTION (10)
579 COFF-32: Type: IMAGE_REL_I386_SECREL (11)
580 COFF-32: Type: IMAGE_REL_I386_TOKEN (12)
581 COFF-32: Type: IMAGE_REL_I386_SECREL7 (13)
582 COFF-32: Type: IMAGE_REL_I386_REL32 (20)
583
584 COFF-64: Type: IMAGE_REL_AMD64_ABSOLUTE (0)
585 COFF-64: Type: IMAGE_REL_AMD64_ADDR64 (1)
586 COFF-64: Type: IMAGE_REL_AMD64_ADDR32 (2)
587 COFF-64: Type: IMAGE_REL_AMD64_ADDR32NB (3)
588 COFF-64: Type: IMAGE_REL_AMD64_REL32 (4)
589 COFF-64: Type: IMAGE_REL_AMD64_REL32_1 (5)
590 COFF-64: Type: IMAGE_REL_AMD64_REL32_2 (6)
591 COFF-64: Type: IMAGE_REL_AMD64_REL32_3 (7)
592 COFF-64: Type: IMAGE_REL_AMD64_REL32_4 (8)
593 COFF-64: Type: IMAGE_REL_AMD64_REL32_5 (9)
594 COFF-64: Type: IMAGE_REL_AMD64_SECTION (10)
595 COFF-64: Type: IMAGE_REL_AMD64_SECREL (11)
596 COFF-64: Type: IMAGE_REL_AMD64_SECREL7 (12)
597 COFF-64: Type: IMAGE_REL_AMD64_TOKEN (13)
598 COFF-64: Type: IMAGE_REL_AMD64_SREL32 (14)
599 COFF-64: Type: IMAGE_REL_AMD64_PAIR (15)
600 COFF-64: Type: IMAGE_REL_AMD64_SSPAN32 (16)
601
602 COFF-ARM: Type: IMAGE_REL_ARM_ABSOLUTE (0x0000)
603 COFF-ARM: Type: IMAGE_REL_ARM_ADDR32 (0x0001)
604 COFF-ARM: Type: IMAGE_REL_ARM_ADDR32NB (0x0002)
605 COFF-ARM: Type: IMAGE_REL_ARM_BRANCH24 (0x0003)
606 COFF-ARM: Type: IMAGE_REL_ARM_BRANCH11 (0x0004)
607 COFF-ARM: Type: IMAGE_REL_ARM_TOKEN (0x0005)
608 COFF-ARM: Type: IMAGE_REL_ARM_BLX24 (0x0008)
609 COFF-ARM: Type: IMAGE_REL_ARM_BLX11 (0x0009)
610 COFF-ARM: Type: IMAGE_REL_ARM_SECTION (0x000E)
611 COFF-ARM: Type: IMAGE_REL_ARM_SECREL (0x000F)
612 COFF-ARM: Type: IMAGE_REL_ARM_MOV32A (0x0010)
613 COFF-ARM: Type: IMAGE_REL_ARM_MOV32T (0x0011)
614 COFF-ARM: Type: IMAGE_REL_ARM_BRANCH20T (0x0012)
615 COFF-ARM: Type: IMAGE_REL_ARM_BRANCH24T (0x0014)
616 COFF-ARM: Type: IMAGE_REL_ARM_BLX23T (0x0015)
617
618 MACHO-32: Type: GENERIC_RELOC_VANILLA (0)
619 MACHO-32: Type: GENERIC_RELOC_PAIR (1)
620 MACHO-32: Type: GENERIC_RELOC_SECTDIFF (2)
621 MACHO-32: Type: GENERIC_RELOC_PB_LA_PTR (3)
622 MACHO-32: Type: GENERIC_RELOC_LOCAL_SECTDIFF (4)
623 MACHO-32: Type: GENERIC_RELOC_TLV (5)
624
625 MACHO-64: Type: X86_64_RELOC_UNSIGNED (0)
626 MACHO-64: Type: X86_64_RELOC_SIGNED (1)
627 MACHO-64: Type: X86_64_RELOC_BRANCH (2)
628 MACHO-64: Type: X86_64_RELOC_GOT_LOAD (3)
629 MACHO-64: Type: X86_64_RELOC_GOT (4)
630 MACHO-64: Type: X86_64_RELOC_SUBTRACTOR (5)
631 MACHO-64: Type: X86_64_RELOC_SIGNED_1 (6)
632 MACHO-64: Type: X86_64_RELOC_SIGNED_2 (7)
633 MACHO-64: Type: X86_64_RELOC_SIGNED_4 (8)
634 MACHO-64: Type: X86_64_RELOC_TLV (9)
635
636 MACHO-ARM: Type: ARM_RELOC_VANILLA (0)
637 MACHO-ARM: Type: ARM_RELOC_PAIR (1)
638 MACHO-ARM: Type: ARM_RELOC_SECTDIFF (2)
639 MACHO-ARM: Type: ARM_RELOC_LOCAL_SECTDIFF (3)
640 MACHO-ARM: Type: ARM_RELOC_PB_LA_PTR (4)
641 MACHO-ARM: Type: ARM_RELOC_BR24 (5)
642 MACHO-ARM: Type: ARM_THUMB_RELOC_BR22 (6)
643 MACHO-ARM: Type: ARM_THUMB_32BIT_BRANCH (7)
644 MACHO-ARM: Type: ARM_RELOC_HALF (8)
645 MACHO-ARM: Type: ARM_RELOC_HALF_SECTDIFF (9)
646
647 MACHO-PPC: PPC_RELOC_VANILLA (0)
648 MACHO-PPC: PPC_RELOC_PAIR (1)
649 MACHO-PPC: PPC_RELOC_BR14 (2)
650 MACHO-PPC: PPC_RELOC_BR24 (3)
651 MACHO-PPC: PPC_RELOC_HI16 (4)
652 MACHO-PPC: PPC_RELOC_LO16 (5)
653 MACHO-PPC: PPC_RELOC_HA16 (6)
654 MACHO-PPC: PPC_RELOC_LO14 (7)
655 MACHO-PPC: PPC_RELOC_SECTDIFF (8)
656 MACHO-PPC: PPC_RELOC_PB_LA_PTR (9)
657 MACHO-PPC: PPC_RELOC_HI16_SECTDIFF (10)
658 MACHO-PPC: PPC_RELOC_LO16_SECTDIFF (11)
659 MACHO-PPC: PPC_RELOC_HA16_SECTDIFF (12)
660 MACHO-PPC: PPC_RELOC_JBSR (13)
661 MACHO-PPC: PPC_RELOC_LO14_SECTDIFF (14)
662 MACHO-PPC: PPC_RELOC_LOCAL_SECTDIFF (15)