Symbol tables (SHT_SYMTAB, SHT_DYNSYM) name the functions
and data of a file; relocation sections (SHT_REL, SHT_RELA)
say how to patch code and data once addresses are known. Structures follow the gABI
chapter 4; relocation types are defined per processor, and this page lists those for
x86-64 and AArch64 from glibc’s elf.h.
Symbol table entry
| Offset 32 | Offset 64 | Type 32 / 64 | Field | Meaning |
|---|---|---|---|---|
0x00 | 0x00 | Word | st_name | Offset of the name in the symbol string table (sh_link); 0 for none. |
0x04 | 0x08 | Addr | st_value | Value, below. |
0x08 | 0x10 | Word / Xword | st_size | Size in bytes, or 0 if none or unknown. |
0x0C | 0x04 | unsigned char | st_info | Binding in the high four bits, type in the low four. |
0x0D | 0x05 | unsigned char | st_other | Visibility in the low two bits; the gABI sets the rest to 0. |
0x0E | 0x06 | Half | st_shndx | Index of the section the symbol is defined in, or a special index. |
An entry is 16 bytes in 32-bit files and 24 bytes in 64-bit files; the 64-bit layout
moves st_info, st_other and st_shndx ahead.
ST_BIND(i) = i >> 4, ST_TYPE(i) = i & 0xF,
ST_INFO(b, t) = (b << 4) + (t & 0xF),
ST_VISIBILITY(o) = o & 0x3.
Entry 0 (STN_UNDEF) is all zeros. Local symbols come first; the
section’s sh_info is the index of the first non-local one.
Binding
| Value | Name | Meaning |
|---|---|---|
0 | STB_LOCAL | Local symbol |
1 | STB_GLOBAL | Global symbol; two definitions are an error |
2 | STB_WEAK | Global with lower precedence: a global or common definition wins; an unresolved weak symbol is 0; weak references do not pull members out of archives |
10–12 | STB_LOOS–STB_HIOS | OS-specific; GNU uses 10 as STB_GNU_UNIQUE |
13–15 | STB_LOPROC–STB_HIPROC | Processor-specific |
Type
| Value | Name | Meaning |
|---|---|---|
0 | STT_NOTYPE | No type |
1 | STT_OBJECT | Data object |
2 | STT_FUNC | Function; in shared objects the linker makes PLT entries for referenced functions |
3 | STT_SECTION | A section |
4 | STT_FILE | Source file name: local, SHN_ABS, before the file’s other local symbols |
5 | STT_COMMON | Uninitialised common block; SHN_COMMON in relocatable files |
6 | STT_TLS | Thread-local entity; st_value is an offset, and only TLS relocations may refer to it |
10–12 | STT_LOOS–STT_HIOS | OS-specific; GNU uses 10 as STT_GNU_IFUNC |
13–15 | STT_LOPROC–STT_HIPROC | Processor-specific |
Visibility
| Value | Name | Meaning |
|---|---|---|
0 | STV_DEFAULT | As the binding says |
1 | STV_INTERNAL | Defined by the processor supplement |
2 | STV_HIDDEN | Not visible to other components |
3 | STV_PROTECTED | Visible to other components but not preemptable |
When visibilities differ, the most constraining wins (protected, then hidden, then
internal). Hidden and internal symbols in relocatable files become local or are
removed when linked. AArch64 uses st_other bit 0x80 as
STO_AARCH64_VARIANT_PCS (glibc).
st_value
- Relocatable files: for
SHN_COMMONsymbols, the alignment; otherwise an offset in the sectionst_shndx. - Executables and shared objects: a virtual address.
SHN_ABS: an absolute value;SHN_UNDEF: undefined, to be resolved by the linker;SHN_XINDEX: the real section index is in theSHT_SYMTAB_SHNDXsection.
Relocation entries
| Offset 32 | Offset 64 | Type 32 / 64 | Field | Meaning |
|---|---|---|---|---|
0x00 | 0x00 | Addr | r_offset | Where to apply it: a byte offset in the section (relocatable files) or a virtual address (executables, shared objects). |
0x04 | 0x08 | Word / Xword | r_info | Symbol index and relocation type. |
0x08 | 0x10 | Sword / Sxword | r_addend | Rela only: the addend. In Rel entries the addend is in the field being patched. |
| Class | Symbol | Type | Pack |
|---|---|---|---|
| 32-bit | r_info >> 8 | r_info & 0xFF | (sym << 8) + type |
| 64-bit | r_info >> 32 | r_info & 0xFFFFFFFF | (sym << 32) + type |
A symbol index of STN_UNDEF means a value of 0. Several relocations at
the same r_offset are composed: intermediate results keep full
precision and only the last is stored. Rel entries are 8 or 16 bytes,
Rela entries 12 or 24.
x86-64 relocation types
| Value | R_X86_64_ | Meaning | Value | R_X86_64_ | Meaning |
|---|---|---|---|---|---|
| 0 | NONE | none | 22 | GOTTPOFF | PC-relative offset to an initial-exec GOT entry |
| 1 | 64 | direct 64-bit | 23 | TPOFF32 | offset in the initial TLS block |
| 2 | PC32 | PC-relative 32-bit signed | 24 | PC64 | PC-relative 64-bit |
| 3 | GOT32 | 32-bit GOT entry | 25 | GOTOFF64 | 64-bit offset to the GOT |
| 4 | PLT32 | 32-bit PLT address | 26 | GOTPC32 | 32-bit signed PC-relative offset to the GOT |
| 5 | COPY | copy the symbol at run time | 27 | GOT64 | 64-bit GOT entry offset |
| 6 | GLOB_DAT | create a GOT entry | 28 | GOTPCREL64 | 64-bit PC-relative offset to a GOT entry |
| 7 | JUMP_SLOT | create a PLT entry | 29 | GOTPC64 | 64-bit PC-relative offset to the GOT |
| 8 | RELATIVE | adjust by the program base | 30 | GOTPLT64 | like GOT64, says a PLT entry is needed |
| 9 | GOTPCREL | 32-bit signed PC-relative offset to the GOT entry | 31 | PLTOFF64 | 64-bit GOT-relative offset to a PLT entry |
| 10 | 32 | direct 32-bit, zero-extended | 32 | SIZE32 | symbol size plus 32-bit addend |
| 11 | 32S | direct 32-bit, sign-extended | 33 | SIZE64 | symbol size plus 64-bit addend |
| 12 | 16 | direct 16-bit, zero-extended | 34 | GOTPC32_TLSDESC | GOT offset for a TLS descriptor |
| 13 | PC16 | 16-bit sign-extended PC-relative | 35 | TLSDESC_CALL | marks a call through a TLS descriptor |
| 14 | 8 | direct 8-bit, sign-extended | 36 | TLSDESC | TLS descriptor |
| 15 | PC8 | 8-bit sign-extended PC-relative | 37 | IRELATIVE | adjust indirectly by the program base |
| 16 | DTPMOD64 | ID of the module holding the symbol | 38 | RELATIVE64 | 64-bit adjust by the program base |
| 17 | DTPOFF64 | offset in the module’s TLS block | 39, 40 | — | reserved |
| 18 | TPOFF64 | offset in the initial TLS block | 41 | GOTPCRELX | relaxable GOT load, no REX prefix |
| 19 | TLSGD | PC-relative offset to two general-dynamic GOT entries | 42 | REX_GOTPCRELX | relaxable GOT load with a REX prefix |
| 20 | TLSLD | PC-relative offset to two local-dynamic GOT entries | 43 | (NUM) | count |
| 21 | DTPOFF32 | offset in the TLS block |
x86-64 also uses SHT_X86_64_UNWIND (0x70000001) and the
dynamic tags DT_X86_64_PLT, DT_X86_64_PLTSZ and
DT_X86_64_PLTENT (DT_LOPROC + 0, 1 and 3).
AArch64 relocation types
| Value | R_AARCH64_ | Meaning |
|---|---|---|
| 0 | NONE | none |
| 257–259 | ABS64, ABS32, ABS16 | direct absolute |
| 260–262 | PREL64, PREL32, PREL16 | PC-relative |
| 263–269 | MOVW_UABS_G0, _G0_NC, _G1, _G1_NC, _G2, _G2_NC, _G3 | MOVZ/MOVK immediate, unsigned absolute |
| 270–272 | MOVW_SABS_G0, _G1, _G2 | MOVN/MOVZ immediate, signed absolute |
| 273 | LD_PREL_LO19 | PC-relative LD immediate |
| 274 | ADR_PREL_LO21 | PC-relative ADR immediate |
| 275, 276 | ADR_PREL_PG_HI21, _NC | page-relative ADRP (checked, unchecked) |
| 277 | ADD_ABS_LO12_NC | ADD immediate, bits 11:0 |
| 278 | LDST8_ABS_LO12_NC | LD/ST, byte |
| 279 | TSTBR14 | TBZ/TBNZ immediate |
| 280 | CONDBR19 | conditional branch immediate |
| 282 | JUMP26 | B immediate |
| 283 | CALL26 | BL immediate |
| 284–286 | LDST16_ABS_LO12_NC, LDST32_…, LDST64_… | LD/ST by access size |
| 287–293 | MOVW_PREL_G0, _G0_NC, _G1, _G1_NC, _G2, _G2_NC, _G3 | PC-relative MOVZ/MOVK |
| 299 | LDST128_ABS_LO12_NC | LD/ST, 128-bit |
| 300–306 | MOVW_GOTOFF_G0, _G0_NC, _G1, _G1_NC, _G2, _G2_NC, _G3 | GOT-relative MOVZ/MOVK |
| 307, 308 | GOTREL64, GOTREL32 | GOT-relative data |
| 309 | GOT_LD_PREL19 | PC-relative GOT load |
| 310 | LD64_GOTOFF_LO15 | GOT-relative LD/ST |
| 311 | ADR_GOT_PAGE | page-relative GOT ADRP |
| 312 | LD64_GOT_LO12_NC | direct GOT LD/ST |
| 313 | LD64_GOTPAGE_LO15 | GOT-page-relative LD/ST |
| 512–516 | TLSGD_ADR_PREL21, TLSGD_ADR_PAGE21, TLSGD_ADD_LO12_NC, TLSGD_MOVW_G1, TLSGD_MOVW_G0_NC | TLS general dynamic |
| 517–522 | TLSLD_ADR_PREL21, TLSLD_ADR_PAGE21, TLSLD_ADD_LO12_NC, TLSLD_MOVW_G1, TLSLD_MOVW_G0_NC, TLSLD_LD_PREL19 | TLS local dynamic |
| 523–527 | TLSLD_MOVW_DTPREL_G2, _G1, _G1_NC, _G0, _G0_NC | DTP-relative MOV |
| 528–530 | TLSLD_ADD_DTPREL_HI12, _LO12, _LO12_NC | DTP-relative ADD |
| 531–538 | TLSLD_LDST8_DTPREL_LO12 to TLSLD_LDST64_DTPREL_LO12_NC: sizes 8, 16, 32, 64, each followed by its _NC form | DTP-relative LD/ST |
| 539–543 | TLSIE_MOVW_GOTTPREL_G1, _G0_NC, TLSIE_ADR_GOTTPREL_PAGE21, TLSIE_LD64_GOTTPREL_LO12_NC, TLSIE_LD_GOTTPREL_PREL19 | TLS initial exec |
| 544–548 | TLSLE_MOVW_TPREL_G2, _G1, _G1_NC, _G0, _G0_NC | TLS local exec, MOV |
| 549–551 | TLSLE_ADD_TPREL_HI12, _LO12, _LO12_NC | TLS local exec, ADD |
| 552–559 | TLSLE_LDST8_TPREL_LO12 to TLSLE_LDST64_TPREL_LO12_NC, as above | TLS local exec, LD/ST |
| 560–566 | TLSDESC_LD_PREL19, TLSDESC_ADR_PREL21, TLSDESC_ADR_PAGE21, TLSDESC_LD64_LO12, TLSDESC_ADD_LO12, TLSDESC_OFF_G1, TLSDESC_OFF_G0_NC | TLS descriptor |
| 567–569 | TLSDESC_LDR, TLSDESC_ADD, TLSDESC_CALL | relaxation hints |
| 570, 571 | TLSLE_LDST128_TPREL_LO12, _NC | TLS local exec, 128-bit LD/ST |
| 572, 573 | TLSLD_LDST128_DTPREL_LO12, _NC | DTP-relative 128-bit LD/ST |
| 1024 | COPY | copy the symbol at run time |
| 1025 | GLOB_DAT | create a GOT entry |
| 1026 | JUMP_SLOT | create a PLT entry |
| 1027 | RELATIVE | adjust by the program base |
| 1028 | TLS_DTPMOD | 64-bit module number |
| 1029 | TLS_DTPREL | 64-bit module-relative offset |
| 1030 | TLS_TPREL | 64-bit TP-relative offset |
| 1031 | TLSDESC | TLS descriptor |
| 1032 | IRELATIVE | STT_GNU_IFUNC relocation |
Values within each group run in the order the names are listed. AArch64 also defines
PT_AARCH64_MEMTAG_MTE (PT_LOPROC + 2) and the dynamic tags
DT_AARCH64_BTI_PLT, DT_AARCH64_PAC_PLT and
DT_AARCH64_VARIANT_PCS (DT_LOPROC + 1, 3 and 5).
Other processors’ relocation types (i386, ARM, RISC-V, PowerPC and the rest) are defined in their own processor supplements and are not listed here.
i386 relocation types
Names, numbers and the comments of glibc’s elf.h; i386 relocations use
Rel entries. Rows with no comment in the header have none here.
| Value | R_386_ | Meaning | Value | R_386_ | Meaning |
|---|---|---|---|---|---|
| 0 | NONE | no relocation | 22 | 8 | |
| 1 | 32 | direct 32-bit | 23 | PC8 | |
| 2 | PC32 | PC-relative 32-bit | 24 | TLS_GD_32 | direct 32-bit for general dynamic thread-local data |
| 3 | GOT32 | 32-bit GOT entry | 25 | TLS_GD_PUSH | tag for pushl in GD TLS code |
| 4 | PLT32 | 32-bit PLT address | 26 | TLS_GD_CALL | relocation for the call to __tls_get_addr() |
| 5 | COPY | copy the symbol at run time | 27 | TLS_GD_POP | tag for popl in GD TLS code |
| 6 | GLOB_DAT | create a GOT entry | 28 | TLS_LDM_32 | direct 32-bit for local dynamic thread-local data in LE code |
| 7 | JMP_SLOT | create a PLT entry | 29 | TLS_LDM_PUSH | tag for pushl in LDM TLS code |
| 8 | RELATIVE | adjust by the program base | 30 | TLS_LDM_CALL | relocation for the call to __tls_get_addr() in LDM code |
| 9 | GOTOFF | 32-bit offset to the GOT | 31 | TLS_LDM_POP | tag for popl in LDM TLS code |
| 10 | GOTPC | 32-bit PC-relative offset to the GOT | 32 | TLS_LDO_32 | offset relative to the TLS block |
| 11 | 32PLT | 33 | TLS_IE_32 | GOT entry for negated static TLS block offset | |
| 12, 13 | — | no name in the header | 34 | TLS_LE_32 | negated offset relative to the static TLS block |
| 14 | TLS_TPOFF | offset in the static TLS block | 35 | TLS_DTPMOD32 | ID of the module containing the symbol |
| 15 | TLS_IE | address of the GOT entry for a static TLS block offset | 36 | TLS_DTPOFF32 | offset in the TLS block |
| 16 | TLS_GOTIE | GOT entry for a static TLS block offset | 37 | TLS_TPOFF32 | negated offset in the static TLS block |
| 17 | TLS_LE | offset relative to the static TLS block | 38 | SIZE32 | 32-bit symbol size |
| 18 | TLS_GD | direct 32-bit for the GNU version of general dynamic thread-local data | 39 | TLS_GOTDESC | GOT offset for a TLS descriptor |
| 19 | TLS_LDM | direct 32-bit for the GNU version of local dynamic thread-local data in LE code | 40 | TLS_DESC_CALL | marker of a call through a TLS descriptor, for relaxation |
| 20 | 16 | 41 | TLS_DESC | TLS descriptor holding a pointer to code and to an argument, returning the TLS offset | |
| 21 | PC16 | 42 | IRELATIVE | adjust indirectly by the program base | |
| 43 | GOT32X | load from a 32-bit GOT entry, relaxable | |||
| 44 | (NUM) | count |
RISC-V relocation types
All R_RISCV_ types of the RISC-V psABI. Type says whether a static linker
(static), the run-time linker (dynamic) or both process it. Calculation uses
the psABI’s symbols: S the symbol value, A the addend, P the place, B the load base,
G the GOT offset, GOT the GOT address, V the existing value at the place; the
calculation column is blank where the psABI gives none. RISC-V uses Rela
entries.
| Value | R_RISCV_ | Type | Field | Calculation | Meaning |
|---|---|---|---|---|---|
| 0 | NONE | none | |||
| 1 | 32 | both | word32 | S + A | 32-bit relocation |
| 2 | 64 | both | word64 | S + A | 64-bit relocation |
| 3 | RELATIVE | dynamic | wordclass | B + A | adjust a link address to its load address |
| 4 | COPY | dynamic | must be in an executable; not allowed in a shared library | ||
| 5 | JUMP_SLOT | dynamic | wordclass | S | symbol associated with a PLT entry |
| 6 | TLS_DTPMOD32 | dynamic | word32 | TLSMODULE | |
| 7 | TLS_DTPMOD64 | dynamic | word64 | TLSMODULE | |
| 8 | TLS_DTPREL32 | dynamic | word32 | S + A − TLS_DTV_OFFSET | |
| 9 | TLS_DTPREL64 | dynamic | word64 | S + A − TLS_DTV_OFFSET | |
| 10 | TLS_TPREL32 | dynamic | word32 | S + A + TLSOFFSET | |
| 11 | TLS_TPREL64 | dynamic | word64 | S + A + TLSOFFSET | |
| 12 | TLSDESC | dynamic | see psABI “TLS Descriptors” | TLSDESC(S+A) | |
| 13–15 | — | not listed in the psABI table | |||
| 16 | BRANCH | static | B-type | S + A − P | 12-bit PC-relative branch offset |
| 17 | JAL | static | J-type | S + A − P | 20-bit PC-relative jump offset |
| 18 | CALL | static | U+I-type | S + A − P | deprecated, use CALL_PLT: 32-bit PC-relative function call, macros call, tail |
| 19 | CALL_PLT | static | U+I-type | S + A − P | 32-bit PC-relative function call, macros call, tail (PIC) |
| 20 | GOT_HI20 | static | U-type | G + GOT − P | high 20 bits of a 32-bit PC-relative GOT access, %got_pcrel_hi; addend must be 0 |
| 21 | TLS_GOT_HI20 | static | U-type | high 20 bits of a 32-bit PC-relative TLS initial-exec GOT access, macro la.tls.ie; addend must be 0 | |
| 22 | TLS_GD_HI20 | static | U-type | high 20 bits of a 32-bit PC-relative TLS general-dynamic GOT reference, macro la.tls.gd; addend must be 0 | |
| 23 | PCREL_HI20 | static | U-type | S + A − P | high 20 bits of a 32-bit PC-relative reference, %pcrel_hi |
| 24 | PCREL_LO12_I | static | I-type | as the paired high part | low 12 bits of a 32-bit PC-relative reference, %pcrel_lo; addend must be 0 |
| 25 | PCREL_LO12_S | static | S-type | as the paired high part | as above, store form |
| 26 | HI20 | static | U-type | S + A | high 20 bits of a 32-bit absolute address, %hi |
| 27 | LO12_I | static | I-type | S + A | low 12 bits of a 32-bit absolute address, %lo |
| 28 | LO12_S | static | S-type | S + A | as above, store form |
| 29 | TPREL_HI20 | static | U-type | high 20 bits of a TLS local-exec thread-pointer offset, %tprel_hi | |
| 30 | TPREL_LO12_I | static | I-type | low 12 bits of the same, %tprel_lo | |
| 31 | TPREL_LO12_S | static | S-type | as above, store form | |
| 32 | TPREL_ADD | static | TLS local-exec thread-pointer usage, %tprel_add | ||
| 33–36 | ADD8, ADD16, ADD32, ADD64 | static | word8, 16, 32, 64 | V + S + A | label addition |
| 37–40 | SUB8, SUB16, SUB32, SUB64 | static | word8, 16, 32, 64 | V − S − A | label subtraction |
| 41 | GOT32_PCREL | static | word32 | G + GOT + A − P | 32-bit difference between a symbol’s GOT entry and the current location |
| 42 | — | reserved | |||
| 43 | ALIGN | static | alignment statement: the addend is the number of bytes of nop at the offset; the boundary is the addend rounded up to the next power of two (the psABI text continues beyond this) | ||
| 44 | RVC_BRANCH | static | CB-type | S + A − P | 8-bit PC-relative branch offset |
| 45 | RVC_JUMP | static | CJ-type | S + A − P | 11-bit PC-relative jump offset |
| 46–50 | — | reserved | |||
| 51 | RELAX | static | the instruction can be relaxed; paired with a normal relocation at the same address | ||
| 52 | SUB6 | static | word6 | V − S − A | local label subtraction |
| 53 | SET6 | static | word6 | S + A | local label assignment |
| 54–56 | SET8, SET16, SET32 | static | word8, 16, 32 | S + A | local label assignment |
| 57 | 32_PCREL | static | word32 | S + A − P | 32-bit PC-relative |
| 58 | IRELATIVE | dynamic | wordclass | ifunc_resolver(B + A) | against a non-preemptible ifunc symbol |
| 59 | PLT32 | static | word32 | S + A − P | 32-bit relative offset to a function or its PLT entry |
| 60 | SET_ULEB128 | static | ULEB128 | S + A | must come immediately before a SUB_ULEB128 at the same offset; local label assignment |
| 61 | SUB_ULEB128 | static | ULEB128 | V − S − A | must come immediately after a SET_ULEB128 at the same offset; local label subtraction |
| 62 | TLSDESC_HI20 | static | U-type | S − P | high 20 bits of a 32-bit PC-relative offset into a TLS descriptor, %tlsdesc_hi; addend must be 0 |
| 63 | TLSDESC_LOAD_LO12 | static | I-type | as the paired high part | low 12 bits of that offset, %tlsdesc_load_lo; addend must be 0 |
| 64 | TLSDESC_ADD_LO12 | static | I-type | as the paired high part | low 12 bits of that offset, %tlsdesc_add_lo; addend must be 0 |
| 65 | TLSDESC_CALL | static | annotates the call to the TLS descriptor resolver, for relaxation only | ||
| 66–76 | — | reserved (67–76 for a Y base ISA) | |||
| 77–190 | — | reserved for future standard use | |||
| 191 | VENDOR | static | paired with, and placed immediately before, a vendor-specific relocation; says which vendor owns it | ||
| 192–255 | — | reserved for nonstandard ABI extensions |
The psABI says a SET_ULEB128/SUB_ULEB128 pair must have enough space reserved for the final value, filled by a single ULEB128 value with redundant 0x80 bytes prepended as needed; the linker must not change the length.
ARM (32-bit) relocation types
Names and numbers from glibc’s elf.h (EM_ARM, 40). Where a number appears twice, glibc defines both
names for it (glibc’s comments call SWI24 the obsolete static relocation and TLS_DESC
the dynamic one). The operand arithmetic of each type is in the ARM ELF ABI document, which was
not read; only the names and numbers are given.
| Value | R_ARM_ | Value | R_ARM_ | Value | R_ARM_ | Value | R_ARM_ |
|---|---|---|---|---|---|---|---|
| 0 | NONE | 1 | PC24 | 2 | ABS32 | 3 | REL32 |
| 4 | PC13 | 5 | ABS16 | 6 | ABS12 | 7 | THM_ABS5 |
| 8 | ABS8 | 9 | SBREL32 | 10 | THM_PC22 | 11 | THM_PC8 |
| 12 | AMP_VCALL9 | 13 | SWI24, TLS_DESC | 14 | THM_SWI8 | 15 | XPC25 |
| 16 | THM_XPC22 | 17 | TLS_DTPMOD32 | 18 | TLS_DTPOFF32 | 19 | TLS_TPOFF32 |
| 20 | COPY | 21 | GLOB_DAT | 22 | JUMP_SLOT | 23 | RELATIVE |
| 24 | GOTOFF | 25 | GOTPC | 26 | GOT32 | 27 | PLT32 |
| 28 | CALL | 29 | JUMP24 | 30 | THM_JUMP24 | 31 | BASE_ABS |
| 32 | ALU_PCREL_7_0 | 33 | ALU_PCREL_15_8 | 34 | ALU_PCREL_23_15 | 35 | LDR_SBREL_11_0 |
| 36 | ALU_SBREL_19_12 | 37 | ALU_SBREL_27_20 | 38 | TARGET1 | 39 | SBREL31 |
| 40 | V4BX | 41 | TARGET2 | 42 | PREL31 | 43 | MOVW_ABS_NC |
| 44 | MOVT_ABS | 45 | MOVW_PREL_NC | 46 | MOVT_PREL | 47 | THM_MOVW_ABS_NC |
| 48 | THM_MOVT_ABS | 49 | THM_MOVW_PREL_NC | 50 | THM_MOVT_PREL | 51 | THM_JUMP19 |
| 52 | THM_JUMP6 | 53 | THM_ALU_PREL_11_0 | 54 | THM_PC12 | 55 | ABS32_NOI |
| 56 | REL32_NOI | 57 | ALU_PC_G0_NC | 58 | ALU_PC_G0 | 59 | ALU_PC_G1_NC |
| 60 | ALU_PC_G1 | 61 | ALU_PC_G2 | 62 | LDR_PC_G1 | 63 | LDR_PC_G2 |
| 64 | LDRS_PC_G0 | 65 | LDRS_PC_G1 | 66 | LDRS_PC_G2 | 67 | LDC_PC_G0 |
| 68 | LDC_PC_G1 | 69 | LDC_PC_G2 | 70 | ALU_SB_G0_NC | 71 | ALU_SB_G0 |
| 72 | ALU_SB_G1_NC | 73 | ALU_SB_G1 | 74 | ALU_SB_G2 | 75 | LDR_SB_G0 |
| 76 | LDR_SB_G1 | 77 | LDR_SB_G2 | 78 | LDRS_SB_G0 | 79 | LDRS_SB_G1 |
| 80 | LDRS_SB_G2 | 81 | LDC_SB_G0 | 82 | LDC_SB_G1 | 83 | LDC_SB_G2 |
| 84 | MOVW_BREL_NC | 85 | MOVT_BREL | 86 | MOVW_BREL | 87 | THM_MOVW_BREL_NC |
| 88 | THM_MOVT_BREL | 89 | THM_MOVW_BREL | 90 | TLS_GOTDESC | 91 | TLS_CALL |
| 92 | TLS_DESCSEQ | 93 | THM_TLS_CALL | 94 | PLT32_ABS | 95 | GOT_ABS |
| 96 | GOT_PREL | 97 | GOT_BREL12 | 98 | GOTOFF12 | 99 | GOTRELAX |
| 100 | GNU_VTENTRY | 101 | GNU_VTINHERIT | 102 | THM_PC11 | 103 | THM_PC9 |
| 104 | TLS_GD32 | 105 | TLS_LDM32 | 106 | TLS_LDO32 | 107 | TLS_IE32 |
| 108 | TLS_LE32 | 109 | TLS_LDO12 | 110 | TLS_LE12 | 111 | TLS_IE12GP |
| 128 | ME_TOO | 129 | THM_TLS_DESCSEQ, THM_TLS_DESCSEQ16 | 130 | THM_TLS_DESCSEQ32 | 131 | THM_GOT_BREL12 |
| 160 | IRELATIVE | 249 | RXPC25 | 250 | RSBREL32 | 251 | THM_RPC22 |
| 252 | RREL32 | 253 | RABS22 | 254 | RPC24 | 255 | RBASE |
PowerPC (32-bit) relocation types
Names and numbers from glibc’s elf.h (EM_PPC, 20). Operand arithmetic is in the
PowerPC ELF ABI, which was not read.
| Value | R_PPC_ | Value | R_PPC_ | Value | R_PPC_ | Value | R_PPC_ |
|---|---|---|---|---|---|---|---|
| 0 | NONE | 1 | ADDR32 | 2 | ADDR24 | 3 | ADDR16 |
| 4 | ADDR16_LO | 5 | ADDR16_HI | 6 | ADDR16_HA | 7 | ADDR14 |
| 8 | ADDR14_BRTAKEN | 9 | ADDR14_BRNTAKEN | 10 | REL24 | 11 | REL14 |
| 12 | REL14_BRTAKEN | 13 | REL14_BRNTAKEN | 14 | GOT16 | 15 | GOT16_LO |
| 16 | GOT16_HI | 17 | GOT16_HA | 18 | PLTREL24 | 19 | COPY |
| 20 | GLOB_DAT | 21 | JMP_SLOT | 22 | RELATIVE | 23 | LOCAL24PC |
| 24 | UADDR32 | 25 | UADDR16 | 26 | REL32 | 27 | PLT32 |
| 28 | PLTREL32 | 29 | PLT16_LO | 30 | PLT16_HI | 31 | PLT16_HA |
| 32 | SDAREL16 | 33 | SECTOFF | 34 | SECTOFF_LO | 35 | SECTOFF_HI |
| 36 | SECTOFF_HA | 67 | TLS | 68 | DTPMOD32 | 69 | TPREL16 |
| 70 | TPREL16_LO | 71 | TPREL16_HI | 72 | TPREL16_HA | 73 | TPREL32 |
| 74 | DTPREL16 | 75 | DTPREL16_LO | 76 | DTPREL16_HI | 77 | DTPREL16_HA |
| 78 | DTPREL32 | 79 | GOT_TLSGD16 | 80 | GOT_TLSGD16_LO | 81 | GOT_TLSGD16_HI |
| 82 | GOT_TLSGD16_HA | 83 | GOT_TLSLD16 | 84 | GOT_TLSLD16_LO | 85 | GOT_TLSLD16_HI |
| 86 | GOT_TLSLD16_HA | 87 | GOT_TPREL16 | 88 | GOT_TPREL16_LO | 89 | GOT_TPREL16_HI |
| 90 | GOT_TPREL16_HA | 91 | GOT_DTPREL16 | 92 | GOT_DTPREL16_LO | 93 | GOT_DTPREL16_HI |
| 94 | GOT_DTPREL16_HA | 95 | TLSGD | 96 | TLSLD | 101 | EMB_NADDR32 |
| 102 | EMB_NADDR16 | 103 | EMB_NADDR16_LO | 104 | EMB_NADDR16_HI | 105 | EMB_NADDR16_HA |
| 106 | EMB_SDAI16 | 107 | EMB_SDA2I16 | 108 | EMB_SDA2REL | 109 | EMB_SDA21 |
| 110 | EMB_MRKREF | 111 | EMB_RELSEC16 | 112 | EMB_RELST_LO | 113 | EMB_RELST_HI |
| 114 | EMB_RELST_HA | 115 | EMB_BIT_FLD | 116 | EMB_RELSDA | 180 | DIAB_SDA21_LO |
| 181 | DIAB_SDA21_HI | 182 | DIAB_SDA21_HA | 183 | DIAB_RELSDA_LO | 184 | DIAB_RELSDA_HI |
| 185 | DIAB_RELSDA_HA | 248 | IRELATIVE | 249 | REL16 | 250 | REL16_LO |
| 251 | REL16_HI | 252 | REL16_HA | 255 | TOC16 |
PowerPC64 relocation types
Names and numbers from glibc’s elf.h (EM_PPC64, 21). glibc defines the R_PPC64_ names for values 0 to 36
as aliases of the R_PPC_ names of the same value (the
PowerPC table: NONE to SECTOFF_HA, except
that 18, 23 and 32 are not defined for PowerPC64). The table lists
the values from 37 up as glibc names them for PowerPC64. Operand arithmetic is in the
PowerPC64 ELF ABI, which was not read.
| Value | R_PPC64_ | Value | R_PPC64_ | Value | R_PPC64_ | Value | R_PPC64_ |
|---|---|---|---|---|---|---|---|
| 37 | ADDR30 | 38 | ADDR64 | 39 | ADDR16_HIGHER | 40 | ADDR16_HIGHERA |
| 41 | ADDR16_HIGHEST | 42 | ADDR16_HIGHESTA | 43 | UADDR64 | 44 | REL64 |
| 45 | PLT64 | 46 | PLTREL64 | 47 | TOC16 | 48 | TOC16_LO |
| 49 | TOC16_HI | 50 | TOC16_HA | 51 | TOC | 52 | PLTGOT16 |
| 53 | PLTGOT16_LO | 54 | PLTGOT16_HI | 55 | PLTGOT16_HA | 56 | ADDR16_DS |
| 57 | ADDR16_LO_DS | 58 | GOT16_DS | 59 | GOT16_LO_DS | 60 | PLT16_LO_DS |
| 61 | SECTOFF_DS | 62 | SECTOFF_LO_DS | 63 | TOC16_DS | 64 | TOC16_LO_DS |
| 65 | PLTGOT16_DS | 66 | PLTGOT16_LO_DS | 67 | TLS | 68 | DTPMOD64 |
| 69 | TPREL16 | 70 | TPREL16_LO | 71 | TPREL16_HI | 72 | TPREL16_HA |
| 73 | TPREL64 | 74 | DTPREL16 | 75 | DTPREL16_LO | 76 | DTPREL16_HI |
| 77 | DTPREL16_HA | 78 | DTPREL64 | 79 | GOT_TLSGD16 | 80 | GOT_TLSGD16_LO |
| 81 | GOT_TLSGD16_HI | 82 | GOT_TLSGD16_HA | 83 | GOT_TLSLD16 | 84 | GOT_TLSLD16_LO |
| 85 | GOT_TLSLD16_HI | 86 | GOT_TLSLD16_HA | 87 | GOT_TPREL16_DS | 88 | GOT_TPREL16_LO_DS |
| 89 | GOT_TPREL16_HI | 90 | GOT_TPREL16_HA | 91 | GOT_DTPREL16_DS | 92 | GOT_DTPREL16_LO_DS |
| 93 | GOT_DTPREL16_HI | 94 | GOT_DTPREL16_HA | 95 | TPREL16_DS | 96 | TPREL16_LO_DS |
| 97 | TPREL16_HIGHER | 98 | TPREL16_HIGHERA | 99 | TPREL16_HIGHEST | 100 | TPREL16_HIGHESTA |
| 101 | DTPREL16_DS | 102 | DTPREL16_LO_DS | 103 | DTPREL16_HIGHER | 104 | DTPREL16_HIGHERA |
| 105 | DTPREL16_HIGHEST | 106 | DTPREL16_HIGHESTA | 107 | TLSGD | 108 | TLSLD |
| 109 | TOCSAVE | 110 | ADDR16_HIGH | 111 | ADDR16_HIGHA | 112 | TPREL16_HIGH |
| 113 | TPREL16_HIGHA | 114 | DTPREL16_HIGH | 115 | DTPREL16_HIGHA | 247 | JMP_IREL |
| 248 | IRELATIVE | 249 | REL16 | 250 | REL16_LO | 251 | REL16_HI |
| 252 | REL16_HA |
MIPS relocation types
Names and numbers from glibc’s elf.h (EM_MIPS, 8). The entry
format of MIPS (including its 64-bit r_info layout) is not described here
because no source for it was read. The operand
arithmetic of each type is in the MIPS ELF ABI, which was not read.
| Value | R_MIPS_ | Value | R_MIPS_ | Value | R_MIPS_ | Value | R_MIPS_ |
|---|---|---|---|---|---|---|---|
| 0 | NONE | 1 | 16 | 2 | 32 | 3 | REL32 |
| 4 | 26 | 5 | HI16 | 6 | LO16 | 7 | GPREL16 |
| 8 | LITERAL | 9 | GOT16 | 10 | PC16 | 11 | CALL16 |
| 12 | GPREL32 | 16 | SHIFT5 | 17 | SHIFT6 | 18 | 64 |
| 19 | GOT_DISP | 20 | GOT_PAGE | 21 | GOT_OFST | 22 | GOT_HI16 |
| 23 | GOT_LO16 | 24 | SUB | 25 | INSERT_A | 26 | INSERT_B |
| 27 | DELETE | 28 | HIGHER | 29 | HIGHEST | 30 | CALL_HI16 |
| 31 | CALL_LO16 | 32 | SCN_DISP | 33 | REL16 | 34 | ADD_IMMEDIATE |
| 35 | PJUMP | 36 | RELGOT | 37 | JALR | 38 | TLS_DTPMOD32 |
| 39 | TLS_DTPREL32 | 40 | TLS_DTPMOD64 | 41 | TLS_DTPREL64 | 42 | TLS_GD |
| 43 | TLS_LDM | 44 | TLS_DTPREL_HI16 | 45 | TLS_DTPREL_LO16 | 46 | TLS_GOTTPREL |
| 47 | TLS_TPREL32 | 48 | TLS_TPREL64 | 49 | TLS_TPREL_HI16 | 50 | TLS_TPREL_LO16 |
| 51 | GLOB_DAT | 60 | PC21_S2 | 61 | PC26_S2 | 62 | PC18_S3 |
| 63 | PC19_S2 | 64 | PCHI16 | 65 | PCLO16 | 126 | COPY |
| 127 | JUMP_SLOT | 128 | RELATIVE | 248 | PC32 | 249 | EH |
| 250 | GNU_REL16_S2 | 253 | GNU_VTINHERIT | 254 | GNU_VTENTRY |
s390 and s390x relocation types
Names and numbers from glibc’s elf.h (EM_S390, 22); the header
has one list for s390 and s390x. Operand arithmetic is in the s390x ELF ABI supplement, which was not read.
| Value | R_390_ | Value | R_390_ | Value | R_390_ | Value | R_390_ |
|---|---|---|---|---|---|---|---|
| 0 | NONE | 1 | 8 | 2 | 12 | 3 | 16 |
| 4 | 32 | 5 | PC32 | 6 | GOT12 | 7 | GOT32 |
| 8 | PLT32 | 9 | COPY | 10 | GLOB_DAT | 11 | JMP_SLOT |
| 12 | RELATIVE | 13 | GOTOFF32 | 14 | GOTPC | 15 | GOT16 |
| 16 | PC16 | 17 | PC16DBL | 18 | PLT16DBL | 19 | PC32DBL |
| 20 | PLT32DBL | 21 | GOTPCDBL | 22 | 64 | 23 | PC64 |
| 24 | GOT64 | 25 | PLT64 | 26 | GOTENT | 27 | GOTOFF16 |
| 28 | GOTOFF64 | 29 | GOTPLT12 | 30 | GOTPLT16 | 31 | GOTPLT32 |
| 32 | GOTPLT64 | 33 | GOTPLTENT | 34 | PLTOFF16 | 35 | PLTOFF32 |
| 36 | PLTOFF64 | 37 | TLS_LOAD | 38 | TLS_GDCALL | 39 | TLS_LDCALL |
| 40 | TLS_GD32 | 41 | TLS_GD64 | 42 | TLS_GOTIE12 | 43 | TLS_GOTIE32 |
| 44 | TLS_GOTIE64 | 45 | TLS_LDM32 | 46 | TLS_LDM64 | 47 | TLS_IE32 |
| 48 | TLS_IE64 | 49 | TLS_IEENT | 50 | TLS_LE32 | 51 | TLS_LE64 |
| 52 | TLS_LDO32 | 53 | TLS_LDO64 | 54 | TLS_DTPMOD | 55 | TLS_DTPOFF |
| 56 | TLS_TPOFF | 57 | 20 | 58 | GOT20 | 59 | GOTPLT20 |
| 60 | TLS_GOTIE20 | 61 | IRELATIVE |
SPARC relocation types
Names and numbers from glibc’s elf.h (EM_SPARC, 2); the
header has one list, which includes the 64-bit types. Operand arithmetic is in the SPARC psABI, which was not read.
| Value | R_SPARC_ | Value | R_SPARC_ | Value | R_SPARC_ | Value | R_SPARC_ |
|---|---|---|---|---|---|---|---|
| 0 | NONE | 1 | 8 | 2 | 16 | 3 | 32 |
| 4 | DISP8 | 5 | DISP16 | 6 | DISP32 | 7 | WDISP30 |
| 8 | WDISP22 | 9 | HI22 | 10 | 22 | 11 | 13 |
| 12 | LO10 | 13 | GOT10 | 14 | GOT13 | 15 | GOT22 |
| 16 | PC10 | 17 | PC22 | 18 | WPLT30 | 19 | COPY |
| 20 | GLOB_DAT | 21 | JMP_SLOT | 22 | RELATIVE | 23 | UA32 |
| 24 | PLT32 | 25 | HIPLT22 | 26 | LOPLT10 | 27 | PCPLT32 |
| 28 | PCPLT22 | 29 | PCPLT10 | 30 | 10 | 31 | 11 |
| 32 | 64 | 33 | OLO10 | 34 | HH22 | 35 | HM10 |
| 36 | LM22 | 37 | PC_HH22 | 38 | PC_HM10 | 39 | PC_LM22 |
| 40 | WDISP16 | 41 | WDISP19 | 42 | GLOB_JMP | 43 | 7 |
| 44 | 5 | 45 | 6 | 46 | DISP64 | 47 | PLT64 |
| 48 | HIX22 | 49 | LOX10 | 50 | H44 | 51 | M44 |
| 52 | L44 | 53 | REGISTER | 54 | UA64 | 55 | UA16 |
| 56 | TLS_GD_HI22 | 57 | TLS_GD_LO10 | 58 | TLS_GD_ADD | 59 | TLS_GD_CALL |
| 60 | TLS_LDM_HI22 | 61 | TLS_LDM_LO10 | 62 | TLS_LDM_ADD | 63 | TLS_LDM_CALL |
| 64 | TLS_LDO_HIX22 | 65 | TLS_LDO_LOX10 | 66 | TLS_LDO_ADD | 67 | TLS_IE_HI22 |
| 68 | TLS_IE_LO10 | 69 | TLS_IE_LD | 70 | TLS_IE_LDX | 71 | TLS_IE_ADD |
| 72 | TLS_LE_HIX22 | 73 | TLS_LE_LOX10 | 74 | TLS_DTPMOD32 | 75 | TLS_DTPMOD64 |
| 76 | TLS_DTPOFF32 | 77 | TLS_DTPOFF64 | 78 | TLS_TPOFF32 | 79 | TLS_TPOFF64 |
| 80 | GOTDATA_HIX22 | 81 | GOTDATA_LOX10 | 82 | GOTDATA_OP_HIX22 | 83 | GOTDATA_OP_LOX10 |
| 84 | GOTDATA_OP | 85 | H34 | 86 | SIZE32 | 87 | SIZE64 |
| 88 | WDISP10 | 248 | JMP_IREL | 249 | IRELATIVE | 250 | GNU_VTINHERIT |
| 251 | GNU_VTENTRY | 252 | REV32 |
LoongArch relocation types
Names and numbers from glibc’s elf.h (EM_LOONGARCH, 258);
values 20 to 46 are named SOP_ in the header. The operand arithmetic is in the LoongArch ELF psABI, which was not read.
| Value | R_LARCH_ | Value | R_LARCH_ | Value | R_LARCH_ | Value | R_LARCH_ |
|---|---|---|---|---|---|---|---|
| 0 | NONE | 1 | 32 | 2 | 64 | 3 | RELATIVE |
| 4 | COPY | 5 | JUMP_SLOT | 6 | TLS_DTPMOD32 | 7 | TLS_DTPMOD64 |
| 8 | TLS_DTPREL32 | 9 | TLS_DTPREL64 | 10 | TLS_TPREL32 | 11 | TLS_TPREL64 |
| 12 | IRELATIVE | 13 | TLS_DESC32 | 14 | TLS_DESC64 | 20 | MARK_LA |
| 21 | MARK_PCREL | 22 | SOP_PUSH_PCREL | 23 | SOP_PUSH_ABSOLUTE | 24 | SOP_PUSH_DUP |
| 25 | SOP_PUSH_GPREL | 26 | SOP_PUSH_TLS_TPREL | 27 | SOP_PUSH_TLS_GOT | 28 | SOP_PUSH_TLS_GD |
| 29 | SOP_PUSH_PLT_PCREL | 30 | SOP_ASSERT | 31 | SOP_NOT | 32 | SOP_SUB |
| 33 | SOP_SL | 34 | SOP_SR | 35 | SOP_ADD | 36 | SOP_AND |
| 37 | SOP_IF_ELSE | 38 | SOP_POP_32_S_10_5 | 39 | SOP_POP_32_U_10_12 | 40 | SOP_POP_32_S_10_12 |
| 41 | SOP_POP_32_S_10_16 | 42 | SOP_POP_32_S_10_16_S2 | 43 | SOP_POP_32_S_5_20 | 44 | SOP_POP_32_S_0_5_10_16_S2 |
| 45 | SOP_POP_32_S_0_10_10_16_S2 | 46 | SOP_POP_32_U | 47 | ADD8 | 48 | ADD16 |
| 49 | ADD24 | 50 | ADD32 | 51 | ADD64 | 52 | SUB8 |
| 53 | SUB16 | 54 | SUB24 | 55 | SUB32 | 56 | SUB64 |
| 57 | GNU_VTINHERIT | 58 | GNU_VTENTRY | 64 | B16 | 65 | B21 |
| 66 | B26 | 67 | ABS_HI20 | 68 | ABS_LO12 | 69 | ABS64_LO20 |
| 70 | ABS64_HI12 | 71 | PCALA_HI20 | 72 | PCALA_LO12 | 73 | PCALA64_LO20 |
| 74 | PCALA64_HI12 | 75 | GOT_PC_HI20 | 76 | GOT_PC_LO12 | 77 | GOT64_PC_LO20 |
| 78 | GOT64_PC_HI12 | 79 | GOT_HI20 | 80 | GOT_LO12 | 81 | GOT64_LO20 |
| 82 | GOT64_HI12 | 83 | TLS_LE_HI20 | 84 | TLS_LE_LO12 | 85 | TLS_LE64_LO20 |
| 86 | TLS_LE64_HI12 | 87 | TLS_IE_PC_HI20 | 88 | TLS_IE_PC_LO12 | 89 | TLS_IE64_PC_LO20 |
| 90 | TLS_IE64_PC_HI12 | 91 | TLS_IE_HI20 | 92 | TLS_IE_LO12 | 93 | TLS_IE64_LO20 |
| 94 | TLS_IE64_HI12 | 95 | TLS_LD_PC_HI20 | 96 | TLS_LD_HI20 | 97 | TLS_GD_PC_HI20 |
| 98 | TLS_GD_HI20 | 99 | 32_PCREL | 100 | RELAX | 101 | DELETE |
| 102 | ALIGN | 103 | PCREL20_S2 | 104 | CFA | 105 | ADD6 |
| 106 | SUB6 | 107 | ADD_ULEB128 | 108 | SUB_ULEB128 | 109 | 64_PCREL |
| 110 | CALL36 | 111 | TLS_DESC_PC_HI20 | 112 | TLS_DESC_PC_LO12 | 113 | TLS_DESC64_PC_LO20 |
| 114 | TLS_DESC64_PC_HI12 | 115 | TLS_DESC_HI20 | 116 | TLS_DESC_LO12 | 117 | TLS_DESC64_LO20 |
| 118 | TLS_DESC64_HI12 | 119 | TLS_DESC_LD | 120 | TLS_DESC_CALL | 121 | TLS_LE_HI20_R |
| 122 | TLS_LE_ADD_R | 123 | TLS_LE_LO12_R | 124 | TLS_LD_PCREL20_S2 | 125 | TLS_GD_PCREL20_S2 |
| 126 | TLS_DESC_PCREL20_S2 |
m68k and ColdFire relocation types
Names and numbers from LLVM’s ELFRelocs/M68k.def (EM_68K, 4; the explorer uses the same names for
ColdFire, EM_COLDFIRE, 52). Operand arithmetic is in the m68k System V ABI supplement, which was not read.
| Value | R_68K_ | Value | R_68K_ | Value | R_68K_ | Value | R_68K_ |
|---|---|---|---|---|---|---|---|
| 0 | NONE | 1 | 32 | 2 | 16 | 3 | 8 |
| 4 | PC32 | 5 | PC16 | 6 | PC8 | 7 | GOTPCREL32 |
| 8 | GOTPCREL16 | 9 | GOTPCREL8 | 10 | GOTOFF32 | 11 | GOTOFF16 |
| 12 | GOTOFF8 | 13 | PLT32 | 14 | PLT16 | 15 | PLT8 |
| 16 | PLTOFF32 | 17 | PLTOFF16 | 18 | PLTOFF8 | 19 | COPY |
| 20 | GLOB_DAT | 21 | JMP_SLOT | 22 | RELATIVE | 23 | GNU_VTINHERIT |
| 24 | GNU_VTENTRY | 25 | TLS_GD32 | 26 | TLS_GD16 | 27 | TLS_GD8 |
| 28 | TLS_LDM32 | 29 | TLS_LDM16 | 30 | TLS_LDM8 | 31 | TLS_LDO32 |
| 32 | TLS_LDO16 | 33 | TLS_LDO8 | 34 | TLS_IE32 | 35 | TLS_IE16 |
| 36 | TLS_IE8 | 37 | TLS_LE32 | 38 | TLS_LE16 | 39 | TLS_LE8 |
| 40 | TLS_DTPMOD32 | 41 | TLS_DTPREL32 | 42 | TLS_TPREL32 |
AVR relocation types
Names and numbers from LLVM’s ELFRelocs/AVR.def (EM_AVR, 83). AVR files use Rela entries; what each
type patches (the LO8, HI8 and PM forms) is in the AVR assembler’s documentation, which was not read.
| Value | R_AVR_ | Value | R_AVR_ | Value | R_AVR_ | Value | R_AVR_ |
|---|---|---|---|---|---|---|---|
| 0 | NONE | 1 | 32 | 2 | 7_PCREL | 3 | 13_PCREL |
| 4 | 16 | 5 | 16_PM | 6 | LO8_LDI | 7 | HI8_LDI |
| 8 | HH8_LDI | 9 | LO8_LDI_NEG | 10 | HI8_LDI_NEG | 11 | HH8_LDI_NEG |
| 12 | LO8_LDI_PM | 13 | HI8_LDI_PM | 14 | HH8_LDI_PM | 15 | LO8_LDI_PM_NEG |
| 16 | HI8_LDI_PM_NEG | 17 | HH8_LDI_PM_NEG | 18 | CALL | 19 | LDI |
| 20 | 6 | 21 | 6_ADIW | 22 | MS8_LDI | 23 | MS8_LDI_NEG |
| 24 | LO8_LDI_GS | 25 | HI8_LDI_GS | 26 | 8 | 27 | 8_LO8 |
| 28 | 8_HI8 | 29 | 8_HLO8 | 30 | DIFF8 | 31 | DIFF16 |
| 32 | DIFF32 | 33 | LDS_STS_16 | 34 | PORT6 | 35 | PORT5 |
MSP430 relocation types
Names and numbers from LLVM’s ELFRelocs/MSP430.def (EM_MSP430, 105). Operand arithmetic was not read.
| Value | R_MSP430_ | Value | R_MSP430_ | Value | R_MSP430_ | Value | R_MSP430_ |
|---|---|---|---|---|---|---|---|
| 0 | NONE | 1 | 32 | 2 | 10_PCREL | 3 | 16 |
| 4 | 16_PCREL | 5 | 16_BYTE | 6 | 16_PCREL_BYTE | 7 | 2X_PCREL |
| 8 | RL_PCREL | 9 | 8 | 10 | SYM_DIFF |
Xtensa relocation types
Names and numbers from LLVM’s ELFRelocs/Xtensa.def (EM_XTENSA, 94). Numbers 7 and 13 are not defined there. The
SLOTn_OP types (20 to 34) and SLOTn_ALT types (35 to 49) are numbered by slot, 0 to 14. Operand arithmetic was not read.
| Value | R_XTENSA_ | Value | R_XTENSA_ | Value | R_XTENSA_ | Value | R_XTENSA_ |
|---|---|---|---|---|---|---|---|
| 0 | NONE | 1 | 32 | 2 | RTLD | 3 | GLOB_DAT |
| 4 | JMP_SLOT | 5 | RELATIVE | 6 | PLT | 8 | OP0 |
| 9 | OP1 | 10 | OP2 | 11 | ASM_EXPAND | 12 | ASM_SIMPLIFY |
| 14 | 32_PCREL | 15 | GNU_VTINHERIT | 16 | GNU_VTENTRY | 17 | DIFF8 |
| 18 | DIFF16 | 19 | DIFF32 | 20 to 34 | SLOT0_OP to SLOT14_OP | 35 to 49 | SLOT0_ALT to SLOT14_ALT |
| 50 | TLSDESC_FN | 51 | TLSDESC_ARG | 52 | TLS_DTPOFF | 53 | TLS_TPOFF |
| 54 | TLS_FUNC | 55 | TLS_ARG | 56 | TLS_CALL |
Machines without a relocation table
The Z80 family (220) and the PDP-11 (65) are disassembled by the explorer, but no relocation type list for them was found in glibc’s
elf.h or in LLVM’s ELFRelocs folder, so their relocation types are shown as numbers.
Sources
- LLVM 21.1.8
include/llvm/BinaryFormat/ELFRelocs/{M68k,AVR,MSP430,Xtensa}.def(read in place on this machine, 14 November 2026) – theR_68K_*,R_AVR_*,R_MSP430_*andR_XTENSA_*names and numbers; the explorer’s names for PowerPC and PowerPC64 come from the same folder’sPowerPC.defandPowerPC64.def, which list fewer types than the glibc tables above - RISC-V ELF psABI (
riscv-elf.adoc, master, read 13 November 2026) – the RISC-V relocation table - glibc
elf.h(bminor/glibc, master, read 13 November 2026) – theR_386_*names, numbers and comments, and theR_ARM_*,R_PPC_*,R_PPC64_*,R_MIPS_*,R_390_*,R_SPARC_*andR_LARCH_*names and numbers (no comments copied). The i386 System V psABI itself was not read, so the i386 table is only as complete as glibc’s comments. - gABI chapter 4: Symbol Table – entry layouts, binding, type, visibility, entry 0, ordering, st_value
- gABI chapter 4: Relocation – Rel and Rela, r_info macros, composition
- glibc elf.h –
STB_GNU_UNIQUE,STT_GNU_IFUNC,STO_AARCH64_VARIANT_PCS, x86-64 and AArch64 relocation types and their comments, x86-64 and AArch64 section, segment and dynamic values