LIEF: Library to Instrument Executable Formats Version 0.16.0
Loading...
Searching...
No Matches
LIEF::ELF::Relocation Class Reference

Class that represents an ELF relocation. More...

#include <Relocation.hpp>

Inheritance diagram for LIEF::ELF::Relocation:
Collaboration diagram for LIEF::ELF::Relocation:

Public Types

enum class  PURPOSE { NONE = 0 , PLTGOT = 1 , DYNAMIC = 2 , OBJECT = 3 }
 The purpose of a relocation defines how this relocation is used by the loader. More...
 
enum class  ENCODING {
  UNKNOWN = 0 , REL , RELA , RELR ,
  ANDROID_SLEB
}
 
enum class  TYPE : uint32_t {
  UNKNOWN = uint32_t(-1) , X86_64_NONE = (0 | R_X64) , X86_64_64 = (1 | R_X64) , X86_64_PC32 = (2 | R_X64) ,
  X86_64_GOT32 = (3 | R_X64) , X86_64_PLT32 = (4 | R_X64) , X86_64_COPY = (5 | R_X64) , X86_64_GLOB_DAT = (6 | R_X64) ,
  X86_64_JUMP_SLOT = (7 | R_X64) , X86_64_RELATIVE = (8 | R_X64) , X86_64_GOTPCREL = (9 | R_X64) , X86_64_32 = (10 | R_X64) ,
  X86_64_32S = (11 | R_X64) , X86_64_16 = (12 | R_X64) , X86_64_PC16 = (13 | R_X64) , X86_64_8 = (14 | R_X64) ,
  X86_64_PC8 = (15 | R_X64) , X86_64_DTPMOD64 = (16 | R_X64) , X86_64_DTPOFF64 = (17 | R_X64) , X86_64_TPOFF64 = (18 | R_X64) ,
  X86_64_TLSGD = (19 | R_X64) , X86_64_TLSLD = (20 | R_X64) , X86_64_DTPOFF32 = (21 | R_X64) , X86_64_GOTTPOFF = (22 | R_X64) ,
  X86_64_TPOFF32 = (23 | R_X64) , X86_64_PC64 = (24 | R_X64) , X86_64_GOTOFF64 = (25 | R_X64) , X86_64_GOTPC32 = (26 | R_X64) ,
  X86_64_GOT64 = (27 | R_X64) , X86_64_GOTPCREL64 = (28 | R_X64) , X86_64_GOTPC64 = (29 | R_X64) , X86_64_GOTPLT64 = (30 | R_X64) ,
  X86_64_PLTOFF64 = (31 | R_X64) , X86_64_SIZE32 = (32 | R_X64) , X86_64_SIZE64 = (33 | R_X64) , X86_64_GOTPC32_TLSDESC = (34 | R_X64) ,
  X86_64_TLSDESC_CALL = (35 | R_X64) , X86_64_TLSDESC = (36 | R_X64) , X86_64_IRELATIVE = (37 | R_X64) , X86_64_RELATIVE64 = (38 | R_X64) ,
  X86_64_PC32_BND = (39 | R_X64) , X86_64_PLT32_BND = (40 | R_X64) , X86_64_GOTPCRELX = (41 | R_X64) , X86_64_REX_GOTPCRELX = (42 | R_X64) ,
  AARCH64_NONE = (0 | R_AARCH64) , AARCH64_ABS64 = (0x101 | R_AARCH64) , AARCH64_ABS32 = (0x102 | R_AARCH64) , AARCH64_ABS16 = (0x103 | R_AARCH64) ,
  AARCH64_PREL64 = (0x104 | R_AARCH64) , AARCH64_PREL32 = (0x105 | R_AARCH64) , AARCH64_PREL16 = (0x106 | R_AARCH64) , AARCH64_MOVW_UABS_G0 = (0x107 | R_AARCH64) ,
  AARCH64_MOVW_UABS_G0_NC = (0x108 | R_AARCH64) , AARCH64_MOVW_UABS_G1 = (0x109 | R_AARCH64) , AARCH64_MOVW_UABS_G1_NC = (0x10a | R_AARCH64) , AARCH64_MOVW_UABS_G2 = (0x10b | R_AARCH64) ,
  AARCH64_MOVW_UABS_G2_NC = (0x10c | R_AARCH64) , AARCH64_MOVW_UABS_G3 = (0x10d | R_AARCH64) , AARCH64_MOVW_SABS_G0 = (0x10e | R_AARCH64) , AARCH64_MOVW_SABS_G1 = (0x10f | R_AARCH64) ,
  AARCH64_MOVW_SABS_G2 = (0x110 | R_AARCH64) , AARCH64_LD_PREL_LO19 = (0x111 | R_AARCH64) , AARCH64_ADR_PREL_LO21 = (0x112 | R_AARCH64) , AARCH64_ADR_PREL_PG_HI21 = (0x113 | R_AARCH64) ,
  AARCH64_ADR_PREL_PG_HI21_NC = (0x114 | R_AARCH64) , AARCH64_ADD_ABS_LO12_NC = (0x115 | R_AARCH64) , AARCH64_LDST8_ABS_LO12_NC = (0x116 | R_AARCH64) , AARCH64_TSTBR14 = (0x117 | R_AARCH64) ,
  AARCH64_CONDBR19 = (0x118 | R_AARCH64) , AARCH64_JUMP26 = (0x11a | R_AARCH64) , AARCH64_CALL26 = (0x11b | R_AARCH64) , AARCH64_LDST16_ABS_LO12_NC = (0x11c | R_AARCH64) ,
  AARCH64_LDST32_ABS_LO12_NC = (0x11d | R_AARCH64) , AARCH64_LDST64_ABS_LO12_NC = (0x11e | R_AARCH64) , AARCH64_MOVW_PREL_G0 = (0x11f | R_AARCH64) , AARCH64_MOVW_PREL_G0_NC = (0x120 | R_AARCH64) ,
  AARCH64_MOVW_PREL_G1 = (0x121 | R_AARCH64) , AARCH64_MOVW_PREL_G1_NC = (0x122 | R_AARCH64) , AARCH64_MOVW_PREL_G2 = (0x123 | R_AARCH64) , AARCH64_MOVW_PREL_G2_NC = (0x124 | R_AARCH64) ,
  AARCH64_MOVW_PREL_G3 = (0x125 | R_AARCH64) , AARCH64_LDST128_ABS_LO12_NC = (0x12b | R_AARCH64) , AARCH64_MOVW_GOTOFF_G0 = (0x12c | R_AARCH64) , AARCH64_MOVW_GOTOFF_G0_NC = (0x12d | R_AARCH64) ,
  AARCH64_MOVW_GOTOFF_G1 = (0x12e | R_AARCH64) , AARCH64_MOVW_GOTOFF_G1_NC = (0x12f | R_AARCH64) , AARCH64_MOVW_GOTOFF_G2 = (0x130 | R_AARCH64) , AARCH64_MOVW_GOTOFF_G2_NC = (0x131 | R_AARCH64) ,
  AARCH64_MOVW_GOTOFF_G3 = (0x132 | R_AARCH64) , AARCH64_GOTREL64 = (0x133 | R_AARCH64) , AARCH64_GOTREL32 = (0x134 | R_AARCH64) , AARCH64_GOT_LD_PREL19 = (0x135 | R_AARCH64) ,
  AARCH64_LD64_GOTOFF_LO15 = (0x136 | R_AARCH64) , AARCH64_ADR_GOT_PAGE = (0x137 | R_AARCH64) , AARCH64_LD64_GOT_LO12_NC = (0x138 | R_AARCH64) , AARCH64_LD64_GOTPAGE_LO15 = (0x139 | R_AARCH64) ,
  AARCH64_TLSGD_ADR_PREL21 = (0x200 | R_AARCH64) , AARCH64_TLSGD_ADR_PAGE21 = (0x201 | R_AARCH64) , AARCH64_TLSGD_ADD_LO12_NC = (0x202 | R_AARCH64) , AARCH64_TLSGD_MOVW_G1 = (0x203 | R_AARCH64) ,
  AARCH64_TLSGD_MOVW_G0_NC = (0x204 | R_AARCH64) , AARCH64_TLSLD_ADR_PREL21 = (0x205 | R_AARCH64) , AARCH64_TLSLD_ADR_PAGE21 = (0x206 | R_AARCH64) , AARCH64_TLSLD_ADD_LO12_NC = (0x207 | R_AARCH64) ,
  AARCH64_TLSLD_MOVW_G1 = (0x208 | R_AARCH64) , AARCH64_TLSLD_MOVW_G0_NC = (0x209 | R_AARCH64) , AARCH64_TLSLD_LD_PREL19 = (0x20a | R_AARCH64) , AARCH64_TLSLD_MOVW_DTPREL_G2 = (0x20b | R_AARCH64) ,
  AARCH64_TLSLD_MOVW_DTPREL_G1 = (0x20c | R_AARCH64) , AARCH64_TLSLD_MOVW_DTPREL_G1_NC = (0x20d | R_AARCH64) , AARCH64_TLSLD_MOVW_DTPREL_G0 = (0x20e | R_AARCH64) , AARCH64_TLSLD_MOVW_DTPREL_G0_NC = (0x20f | R_AARCH64) ,
  AARCH64_TLSLD_ADD_DTPREL_HI12 = (0x210 | R_AARCH64) , AARCH64_TLSLD_ADD_DTPREL_LO12 = (0x211 | R_AARCH64) , AARCH64_TLSLD_ADD_DTPREL_LO12_NC = (0x212 | R_AARCH64) , AARCH64_TLSLD_LDST8_DTPREL_LO12 = (0x213 | R_AARCH64) ,
  AARCH64_TLSLD_LDST8_DTPREL_LO12_NC = (0x214 | R_AARCH64) , AARCH64_TLSLD_LDST16_DTPREL_LO12 = (0x215 | R_AARCH64) , AARCH64_TLSLD_LDST16_DTPREL_LO12_NC = (0x216 | R_AARCH64) , AARCH64_TLSLD_LDST32_DTPREL_LO12 = (0x217 | R_AARCH64) ,
  AARCH64_TLSLD_LDST32_DTPREL_LO12_NC = (0x218 | R_AARCH64) , AARCH64_TLSLD_LDST64_DTPREL_LO12 = (0x219 | R_AARCH64) , AARCH64_TLSLD_LDST64_DTPREL_LO12_NC = (0x21a | R_AARCH64) , AARCH64_TLSIE_MOVW_GOTTPREL_G1 = (0x21b | R_AARCH64) ,
  AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC = (0x21c | R_AARCH64) , AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 = (0x21d | R_AARCH64) , AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC = (0x21e | R_AARCH64) , AARCH64_TLSIE_LD_GOTTPREL_PREL19 = (0x21f | R_AARCH64) ,
  AARCH64_TLSLE_MOVW_TPREL_G2 = (0x220 | R_AARCH64) , AARCH64_TLSLE_MOVW_TPREL_G1 = (0x221 | R_AARCH64) , AARCH64_TLSLE_MOVW_TPREL_G1_NC = (0x222 | R_AARCH64) , AARCH64_TLSLE_MOVW_TPREL_G0 = (0x223 | R_AARCH64) ,
  AARCH64_TLSLE_MOVW_TPREL_G0_NC = (0x224 | R_AARCH64) , AARCH64_TLSLE_ADD_TPREL_HI12 = (0x225 | R_AARCH64) , AARCH64_TLSLE_ADD_TPREL_LO12 = (0x226 | R_AARCH64) , AARCH64_TLSLE_ADD_TPREL_LO12_NC = (0x227 | R_AARCH64) ,
  AARCH64_TLSLE_LDST8_TPREL_LO12 = (0x228 | R_AARCH64) , AARCH64_TLSLE_LDST8_TPREL_LO12_NC = (0x229 | R_AARCH64) , AARCH64_TLSLE_LDST16_TPREL_LO12 = (0x22a | R_AARCH64) , AARCH64_TLSLE_LDST16_TPREL_LO12_NC = (0x22b | R_AARCH64) ,
  AARCH64_TLSLE_LDST32_TPREL_LO12 = (0x22c | R_AARCH64) , AARCH64_TLSLE_LDST32_TPREL_LO12_NC = (0x22d | R_AARCH64) , AARCH64_TLSLE_LDST64_TPREL_LO12 = (0x22e | R_AARCH64) , AARCH64_TLSLE_LDST64_TPREL_LO12_NC = (0x22f | R_AARCH64) ,
  AARCH64_TLSDESC_LD_PREL19 = (0x230 | R_AARCH64) , AARCH64_TLSDESC_ADR_PREL21 = (0x231 | R_AARCH64) , AARCH64_TLSDESC_ADR_PAGE21 = (0x232 | R_AARCH64) , AARCH64_TLSDESC_LD64_LO12_NC = (0x233 | R_AARCH64) ,
  AARCH64_TLSDESC_ADD_LO12_NC = (0x234 | R_AARCH64) , AARCH64_TLSDESC_OFF_G1 = (0x235 | R_AARCH64) , AARCH64_TLSDESC_OFF_G0_NC = (0x236 | R_AARCH64) , AARCH64_TLSDESC_LDR = (0x237 | R_AARCH64) ,
  AARCH64_TLSDESC_ADD = (0x238 | R_AARCH64) , AARCH64_TLSDESC_CALL = (0x239 | R_AARCH64) , AARCH64_TLSLE_LDST128_TPREL_LO12 = (0x23a | R_AARCH64) , AARCH64_TLSLE_LDST128_TPREL_LO12_NC = (0x23b | R_AARCH64) ,
  AARCH64_TLSLD_LDST128_DTPREL_LO12 = (0x23c | R_AARCH64) , AARCH64_TLSLD_LDST128_DTPREL_LO12_NC = (0x23d | R_AARCH64) , AARCH64_COPY = (0x400 | R_AARCH64) , AARCH64_GLOB_DAT = (0x401 | R_AARCH64) ,
  AARCH64_JUMP_SLOT = (0x402 | R_AARCH64) , AARCH64_RELATIVE = (0x403 | R_AARCH64) , AARCH64_TLS_DTPREL64 = (0x404 | R_AARCH64) , AARCH64_TLS_DTPMOD64 = (0x405 | R_AARCH64) ,
  AARCH64_TLS_TPREL64 = (0x406 | R_AARCH64) , AARCH64_TLSDESC = (0x407 | R_AARCH64) , AARCH64_IRELATIVE = (0x408 | R_AARCH64) , ARM_NONE = (0x00 | R_ARM) ,
  ARM_PC24 = (0x01 | R_ARM) , ARM_ABS32 = (0x02 | R_ARM) , ARM_REL32 = (0x03 | R_ARM) , ARM_LDR_PC_G0 = (0x04 | R_ARM) ,
  ARM_ABS16 = (0x05 | R_ARM) , ARM_ABS12 = (0x06 | R_ARM) , ARM_THM_ABS5 = (0x07 | R_ARM) , ARM_ABS8 = (0x08 | R_ARM) ,
  ARM_SBREL32 = (0x09 | R_ARM) , ARM_THM_CALL = (0x0a | R_ARM) , ARM_THM_PC8 = (0x0b | R_ARM) , ARM_BREL_ADJ = (0x0c | R_ARM) ,
  ARM_TLS_DESC = (0x0d | R_ARM) , ARM_THM_SWI8 = (0x0e | R_ARM) , ARM_XPC25 = (0x0f | R_ARM) , ARM_THM_XPC22 = (0x10 | R_ARM) ,
  ARM_TLS_DTPMOD32 = (0x11 | R_ARM) , ARM_TLS_DTPOFF32 = (0x12 | R_ARM) , ARM_TLS_TPOFF32 = (0x13 | R_ARM) , ARM_COPY = (0x14 | R_ARM) ,
  ARM_GLOB_DAT = (0x15 | R_ARM) , ARM_JUMP_SLOT = (0x16 | R_ARM) , ARM_RELATIVE = (0x17 | R_ARM) , ARM_GOTOFF32 = (0x18 | R_ARM) ,
  ARM_BASE_PREL = (0x19 | R_ARM) , ARM_GOT_BREL = (0x1a | R_ARM) , ARM_PLT32 = (0x1b | R_ARM) , ARM_CALL = (0x1c | R_ARM) ,
  ARM_JUMP24 = (0x1d | R_ARM) , ARM_THM_JUMP24 = (0x1e | R_ARM) , ARM_BASE_ABS = (0x1f | R_ARM) , ARM_ALU_PCREL_7_0 = (0x20 | R_ARM) ,
  ARM_ALU_PCREL_15_8 = (0x21 | R_ARM) , ARM_ALU_PCREL_23_15 = (0x22 | R_ARM) , ARM_LDR_SBREL_11_0_NC = (0x23 | R_ARM) , ARM_ALU_SBREL_19_12_NC = (0x24 | R_ARM) ,
  ARM_ALU_SBREL_27_20_CK = (0x25 | R_ARM) , ARM_TARGET1 = (0x26 | R_ARM) , ARM_SBREL31 = (0x27 | R_ARM) , ARM_V4BX = (0x28 | R_ARM) ,
  ARM_TARGET2 = (0x29 | R_ARM) , ARM_PREL31 = (0x2a | R_ARM) , ARM_MOVW_ABS_NC = (0x2b | R_ARM) , ARM_MOVT_ABS = (0x2c | R_ARM) ,
  ARM_MOVW_PREL_NC = (0x2d | R_ARM) , ARM_MOVT_PREL = (0x2e | R_ARM) , ARM_THM_MOVW_ABS_NC = (0x2f | R_ARM) , ARM_THM_MOVT_ABS = (0x30 | R_ARM) ,
  ARM_THM_MOVW_PREL_NC = (0x31 | R_ARM) , ARM_THM_MOVT_PREL = (0x32 | R_ARM) , ARM_THM_JUMP19 = (0x33 | R_ARM) , ARM_THM_JUMP6 = (0x34 | R_ARM) ,
  ARM_THM_ALU_PREL_11_0 = (0x35 | R_ARM) , ARM_THM_PC12 = (0x36 | R_ARM) , ARM_ABS32_NOI = (0x37 | R_ARM) , ARM_REL32_NOI = (0x38 | R_ARM) ,
  ARM_ALU_PC_G0_NC = (0x39 | R_ARM) , ARM_ALU_PC_G0 = (0x3a | R_ARM) , ARM_ALU_PC_G1_NC = (0x3b | R_ARM) , ARM_ALU_PC_G1 = (0x3c | R_ARM) ,
  ARM_ALU_PC_G2 = (0x3d | R_ARM) , ARM_LDR_PC_G1 = (0x3e | R_ARM) , ARM_LDR_PC_G2 = (0x3f | R_ARM) , ARM_LDRS_PC_G0 = (0x40 | R_ARM) ,
  ARM_LDRS_PC_G1 = (0x41 | R_ARM) , ARM_LDRS_PC_G2 = (0x42 | R_ARM) , ARM_LDC_PC_G0 = (0x43 | R_ARM) , ARM_LDC_PC_G1 = (0x44 | R_ARM) ,
  ARM_LDC_PC_G2 = (0x45 | R_ARM) , ARM_ALU_SB_G0_NC = (0x46 | R_ARM) , ARM_ALU_SB_G0 = (0x47 | R_ARM) , ARM_ALU_SB_G1_NC = (0x48 | R_ARM) ,
  ARM_ALU_SB_G1 = (0x49 | R_ARM) , ARM_ALU_SB_G2 = (0x4a | R_ARM) , ARM_LDR_SB_G0 = (0x4b | R_ARM) , ARM_LDR_SB_G1 = (0x4c | R_ARM) ,
  ARM_LDR_SB_G2 = (0x4d | R_ARM) , ARM_LDRS_SB_G0 = (0x4e | R_ARM) , ARM_LDRS_SB_G1 = (0x4f | R_ARM) , ARM_LDRS_SB_G2 = (0x50 | R_ARM) ,
  ARM_LDC_SB_G0 = (0x51 | R_ARM) , ARM_LDC_SB_G1 = (0x52 | R_ARM) , ARM_LDC_SB_G2 = (0x53 | R_ARM) , ARM_MOVW_BREL_NC = (0x54 | R_ARM) ,
  ARM_MOVT_BREL = (0x55 | R_ARM) , ARM_MOVW_BREL = (0x56 | R_ARM) , ARM_THM_MOVW_BREL_NC = (0x57 | R_ARM) , ARM_THM_MOVT_BREL = (0x58 | R_ARM) ,
  ARM_THM_MOVW_BREL = (0x59 | R_ARM) , ARM_TLS_GOTDESC = (0x5a | R_ARM) , ARM_TLS_CALL = (0x5b | R_ARM) , ARM_TLS_DESCSEQ = (0x5c | R_ARM) ,
  ARM_THM_TLS_CALL = (0x5d | R_ARM) , ARM_PLT32_ABS = (0x5e | R_ARM) , ARM_GOT_ABS = (0x5f | R_ARM) , ARM_GOT_PREL = (0x60 | R_ARM) ,
  ARM_GOT_BREL12 = (0x61 | R_ARM) , ARM_GOTOFF12 = (0x62 | R_ARM) , ARM_GOTRELAX = (0x63 | R_ARM) , ARM_GNU_VTENTRY = (0x64 | R_ARM) ,
  ARM_GNU_VTINHERIT = (0x65 | R_ARM) , ARM_THM_JUMP11 = (0x66 | R_ARM) , ARM_THM_JUMP8 = (0x67 | R_ARM) , ARM_TLS_GD32 = (0x68 | R_ARM) ,
  ARM_TLS_LDM32 = (0x69 | R_ARM) , ARM_TLS_LDO32 = (0x6a | R_ARM) , ARM_TLS_IE32 = (0x6b | R_ARM) , ARM_TLS_LE32 = (0x6c | R_ARM) ,
  ARM_TLS_LDO12 = (0x6d | R_ARM) , ARM_TLS_LE12 = (0x6e | R_ARM) , ARM_TLS_IE12GP = (0x6f | R_ARM) , ARM_PRIVATE_0 = (0x70 | R_ARM) ,
  ARM_PRIVATE_1 = (0x71 | R_ARM) , ARM_PRIVATE_2 = (0x72 | R_ARM) , ARM_PRIVATE_3 = (0x73 | R_ARM) , ARM_PRIVATE_4 = (0x74 | R_ARM) ,
  ARM_PRIVATE_5 = (0x75 | R_ARM) , ARM_PRIVATE_6 = (0x76 | R_ARM) , ARM_PRIVATE_7 = (0x77 | R_ARM) , ARM_PRIVATE_8 = (0x78 | R_ARM) ,
  ARM_PRIVATE_9 = (0x79 | R_ARM) , ARM_PRIVATE_10 = (0x7a | R_ARM) , ARM_PRIVATE_11 = (0x7b | R_ARM) , ARM_PRIVATE_12 = (0x7c | R_ARM) ,
  ARM_PRIVATE_13 = (0x7d | R_ARM) , ARM_PRIVATE_14 = (0x7e | R_ARM) , ARM_PRIVATE_15 = (0x7f | R_ARM) , ARM_ME_TOO = (0x80 | R_ARM) ,
  ARM_THM_TLS_DESCSEQ16 = (0x81 | R_ARM) , ARM_THM_TLS_DESCSEQ32 = (0x82 | R_ARM) , ARM_IRELATIVE = (0xa0 | R_ARM) , ARM_RXPC25 = (0xF9 | R_ARM) ,
  ARM_RSBREL32 = (0xFA | R_ARM) , ARM_THM_RPC22 = (0xFB | R_ARM) , ARM_RREL32 = (0xFC | R_ARM) , ARM_RPC24 = (0xFD | R_ARM) ,
  ARM_RBASE = (0xFE | R_ARM) , HEX_NONE = (0 | R_HEXAGON) , HEX_B22_PCREL = (1 | R_HEXAGON) , HEX_B15_PCREL = (2 | R_HEXAGON) ,
  HEX_B7_PCREL = (3 | R_HEXAGON) , HEX_LO16 = (4 | R_HEXAGON) , HEX_HI16 = (5 | R_HEXAGON) , HEX_32 = (6 | R_HEXAGON) ,
  HEX_16 = (7 | R_HEXAGON) , HEX_8 = (8 | R_HEXAGON) , HEX_GPREL16_0 = (9 | R_HEXAGON) , HEX_GPREL16_1 = (10 | R_HEXAGON) ,
  HEX_GPREL16_2 = (11 | R_HEXAGON) , HEX_GPREL16_3 = (12 | R_HEXAGON) , HEX_HL16 = (13 | R_HEXAGON) , HEX_B13_PCREL = (14 | R_HEXAGON) ,
  HEX_B9_PCREL = (15 | R_HEXAGON) , HEX_B32_PCREL_X = (16 | R_HEXAGON) , HEX_32_6_X = (17 | R_HEXAGON) , HEX_B22_PCREL_X = (18 | R_HEXAGON) ,
  HEX_B15_PCREL_X = (19 | R_HEXAGON) , HEX_B13_PCREL_X = (20 | R_HEXAGON) , HEX_B9_PCREL_X = (21 | R_HEXAGON) , HEX_B7_PCREL_X = (22 | R_HEXAGON) ,
  HEX_16_X = (23 | R_HEXAGON) , HEX_12_X = (24 | R_HEXAGON) , HEX_11_X = (25 | R_HEXAGON) , HEX_10_X = (26 | R_HEXAGON) ,
  HEX_9_X = (27 | R_HEXAGON) , HEX_8_X = (28 | R_HEXAGON) , HEX_7_X = (29 | R_HEXAGON) , HEX_6_X = (30 | R_HEXAGON) ,
  HEX_32_PCREL = (31 | R_HEXAGON) , HEX_COPY = (32 | R_HEXAGON) , HEX_GLOB_DAT = (33 | R_HEXAGON) , HEX_JMP_SLOT = (34 | R_HEXAGON) ,
  HEX_RELATIVE = (35 | R_HEXAGON) , HEX_PLT_B22_PCREL = (36 | R_HEXAGON) , HEX_GOTREL_LO16 = (37 | R_HEXAGON) , HEX_GOTREL_HI16 = (38 | R_HEXAGON) ,
  HEX_GOTREL_32 = (39 | R_HEXAGON) , HEX_GOT_LO16 = (40 | R_HEXAGON) , HEX_GOT_HI16 = (41 | R_HEXAGON) , HEX_GOT_32 = (42 | R_HEXAGON) ,
  HEX_GOT_16 = (43 | R_HEXAGON) , HEX_DTPMOD_32 = (44 | R_HEXAGON) , HEX_DTPREL_LO16 = (45 | R_HEXAGON) , HEX_DTPREL_HI16 = (46 | R_HEXAGON) ,
  HEX_DTPREL_32 = (47 | R_HEXAGON) , HEX_DTPREL_16 = (48 | R_HEXAGON) , HEX_GD_PLT_B22_PCREL = (49 | R_HEXAGON) , HEX_GD_GOT_LO16 = (50 | R_HEXAGON) ,
  HEX_GD_GOT_HI16 = (51 | R_HEXAGON) , HEX_GD_GOT_32 = (52 | R_HEXAGON) , HEX_GD_GOT_16 = (53 | R_HEXAGON) , HEX_IE_LO16 = (54 | R_HEXAGON) ,
  HEX_IE_HI16 = (55 | R_HEXAGON) , HEX_IE_32 = (56 | R_HEXAGON) , HEX_IE_GOT_LO16 = (57 | R_HEXAGON) , HEX_IE_GOT_HI16 = (58 | R_HEXAGON) ,
  HEX_IE_GOT_32 = (59 | R_HEXAGON) , HEX_IE_GOT_16 = (60 | R_HEXAGON) , HEX_TPREL_LO16 = (61 | R_HEXAGON) , HEX_TPREL_HI16 = (62 | R_HEXAGON) ,
  HEX_TPREL_32 = (63 | R_HEXAGON) , HEX_TPREL_16 = (64 | R_HEXAGON) , HEX_6_PCREL_X = (65 | R_HEXAGON) , HEX_GOTREL_32_6_X = (66 | R_HEXAGON) ,
  HEX_GOTREL_16_X = (67 | R_HEXAGON) , HEX_GOTREL_11_X = (68 | R_HEXAGON) , HEX_GOT_32_6_X = (69 | R_HEXAGON) , HEX_GOT_16_X = (70 | R_HEXAGON) ,
  HEX_GOT_11_X = (71 | R_HEXAGON) , HEX_DTPREL_32_6_X = (72 | R_HEXAGON) , HEX_DTPREL_16_X = (73 | R_HEXAGON) , HEX_DTPREL_11_X = (74 | R_HEXAGON) ,
  HEX_GD_GOT_32_6_X = (75 | R_HEXAGON) , HEX_GD_GOT_16_X = (76 | R_HEXAGON) , HEX_GD_GOT_11_X = (77 | R_HEXAGON) , HEX_IE_32_6_X = (78 | R_HEXAGON) ,
  HEX_IE_16_X = (79 | R_HEXAGON) , HEX_IE_GOT_32_6_X = (80 | R_HEXAGON) , HEX_IE_GOT_16_X = (81 | R_HEXAGON) , HEX_IE_GOT_11_X = (82 | R_HEXAGON) ,
  HEX_TPREL_32_6_X = (83 | R_HEXAGON) , HEX_TPREL_16_X = (84 | R_HEXAGON) , HEX_TPREL_11_X = (85 | R_HEXAGON) , HEX_LD_PLT_B22_PCREL = (86 | R_HEXAGON) ,
  HEX_LD_GOT_LO16 = (87 | R_HEXAGON) , HEX_LD_GOT_HI16 = (88 | R_HEXAGON) , HEX_LD_GOT_32 = (89 | R_HEXAGON) , HEX_LD_GOT_16 = (90 | R_HEXAGON) ,
  HEX_LD_GOT_32_6_X = (91 | R_HEXAGON) , HEX_LD_GOT_16_X = (92 | R_HEXAGON) , HEX_LD_GOT_11_X = (93 | R_HEXAGON) , X86_NONE = (0 | R_X86) ,
  X86_32 = (1 | R_X86) , X86_PC32 = (2 | R_X86) , X86_GOT32 = (3 | R_X86) , X86_PLT32 = (4 | R_X86) ,
  X86_COPY = (5 | R_X86) , X86_GLOB_DAT = (6 | R_X86) , X86_JUMP_SLOT = (7 | R_X86) , X86_RELATIVE = (8 | R_X86) ,
  X86_GOTOFF = (9 | R_X86) , X86_GOTPC = (10 | R_X86) , X86_32PLT = (11 | R_X86) , X86_TLS_TPOFF = (14 | R_X86) ,
  X86_TLS_IE = (15 | R_X86) , X86_TLS_GOTIE = (16 | R_X86) , X86_TLS_LE = (17 | R_X86) , X86_TLS_GD = (18 | R_X86) ,
  X86_TLS_LDM = (19 | R_X86) , X86_16 = (20 | R_X86) , X86_PC16 = (21 | R_X86) , X86_8 = (22 | R_X86) ,
  X86_PC8 = (23 | R_X86) , X86_TLS_GD_32 = (24 | R_X86) , X86_TLS_GD_PUSH = (25 | R_X86) , X86_TLS_GD_CALL = (26 | R_X86) ,
  X86_TLS_GD_POP = (27 | R_X86) , X86_TLS_LDM_32 = (28 | R_X86) , X86_TLS_LDM_PUSH = (29 | R_X86) , X86_TLS_LDM_CALL = (30 | R_X86) ,
  X86_TLS_LDM_POP = (31 | R_X86) , X86_TLS_LDO_32 = (32 | R_X86) , X86_TLS_IE_32 = (33 | R_X86) , X86_TLS_LE_32 = (34 | R_X86) ,
  X86_TLS_DTPMOD32 = (35 | R_X86) , X86_TLS_DTPOFF32 = (36 | R_X86) , X86_TLS_TPOFF32 = (37 | R_X86) , X86_TLS_GOTDESC = (39 | R_X86) ,
  X86_TLS_DESC_CALL = (40 | R_X86) , X86_TLS_DESC = (41 | R_X86) , X86_IRELATIVE = (42 | R_X86) , LARCH_NONE = (0 | R_LARCH) ,
  LARCH_32 = (1 | R_LARCH) , LARCH_64 = (2 | R_LARCH) , LARCH_RELATIVE = (3 | R_LARCH) , LARCH_COPY = (4 | R_LARCH) ,
  LARCH_JUMP_SLOT = (5 | R_LARCH) , LARCH_TLS_DTPMOD32 = (6 | R_LARCH) , LARCH_TLS_DTPMOD64 = (7 | R_LARCH) , LARCH_TLS_DTPREL32 = (8 | R_LARCH) ,
  LARCH_TLS_DTPREL64 = (9 | R_LARCH) , LARCH_TLS_TPREL32 = (10 | R_LARCH) , LARCH_TLS_TPREL64 = (11 | R_LARCH) , LARCH_IRELATIVE = (12 | R_LARCH) ,
  LARCH_MARK_LA = (20 | R_LARCH) , LARCH_MARK_PCREL = (21 | R_LARCH) , LARCH_SOP_PUSH_PCREL = (22 | R_LARCH) , LARCH_SOP_PUSH_ABSOLUTE = (23 | R_LARCH) ,
  LARCH_SOP_PUSH_DUP = (24 | R_LARCH) , LARCH_SOP_PUSH_GPREL = (25 | R_LARCH) , LARCH_SOP_PUSH_TLS_TPREL = (26 | R_LARCH) , LARCH_SOP_PUSH_TLS_GOT = (27 | R_LARCH) ,
  LARCH_SOP_PUSH_TLS_GD = (28 | R_LARCH) , LARCH_SOP_PUSH_PLT_PCREL = (29 | R_LARCH) , LARCH_SOP_ASSERT = (30 | R_LARCH) , LARCH_SOP_NOT = (31 | R_LARCH) ,
  LARCH_SOP_SUB = (32 | R_LARCH) , LARCH_SOP_SL = (33 | R_LARCH) , LARCH_SOP_SR = (34 | R_LARCH) , LARCH_SOP_ADD = (35 | R_LARCH) ,
  LARCH_SOP_AND = (36 | R_LARCH) , LARCH_SOP_IF_ELSE = (37 | R_LARCH) , LARCH_SOP_POP_32_S_10_5 = (38 | R_LARCH) , LARCH_SOP_POP_32_U_10_12 = (39 | R_LARCH) ,
  LARCH_SOP_POP_32_S_10_12 = (40 | R_LARCH) , LARCH_SOP_POP_32_S_10_16 = (41 | R_LARCH) , LARCH_SOP_POP_32_S_10_16_S2 = (42 | R_LARCH) , LARCH_SOP_POP_32_S_5_20 = (43 | R_LARCH) ,
  LARCH_SOP_POP_32_S_0_5_10_16_S2 = (44 | R_LARCH) , LARCH_SOP_POP_32_S_0_10_10_16_S2 = (45 | R_LARCH) , LARCH_SOP_POP_32_U = (46 | R_LARCH) , LARCH_ADD8 = (47 | R_LARCH) ,
  LARCH_ADD16 = (48 | R_LARCH) , LARCH_ADD24 = (49 | R_LARCH) , LARCH_ADD32 = (50 | R_LARCH) , LARCH_ADD64 = (51 | R_LARCH) ,
  LARCH_SUB8 = (52 | R_LARCH) , LARCH_SUB16 = (53 | R_LARCH) , LARCH_SUB24 = (54 | R_LARCH) , LARCH_SUB32 = (55 | R_LARCH) ,
  LARCH_SUB64 = (56 | R_LARCH) , LARCH_GNU_VTINHERIT = (57 | R_LARCH) , LARCH_GNU_VTENTRY = (58 | R_LARCH) , LARCH_B16 = (64 | R_LARCH) ,
  LARCH_B21 = (65 | R_LARCH) , LARCH_B26 = (66 | R_LARCH) , LARCH_ABS_HI20 = (67 | R_LARCH) , LARCH_ABS_LO12 = (68 | R_LARCH) ,
  LARCH_ABS64_LO20 = (69 | R_LARCH) , LARCH_ABS64_HI12 = (70 | R_LARCH) , LARCH_PCALA_HI20 = (71 | R_LARCH) , LARCH_PCALA_LO12 = (72 | R_LARCH) ,
  LARCH_PCALA64_LO20 = (73 | R_LARCH) , LARCH_PCALA64_HI12 = (74 | R_LARCH) , LARCH_GOT_PC_HI20 = (75 | R_LARCH) , LARCH_GOT_PC_LO12 = (76 | R_LARCH) ,
  LARCH_GOT64_PC_LO20 = (77 | R_LARCH) , LARCH_GOT64_PC_HI12 = (78 | R_LARCH) , LARCH_GOT_HI20 = (79 | R_LARCH) , LARCH_GOT_LO12 = (80 | R_LARCH) ,
  LARCH_GOT64_LO20 = (81 | R_LARCH) , LARCH_GOT64_HI12 = (82 | R_LARCH) , LARCH_TLS_LE_HI20 = (83 | R_LARCH) , LARCH_TLS_LE_LO12 = (84 | R_LARCH) ,
  LARCH_TLS_LE64_LO20 = (85 | R_LARCH) , LARCH_TLS_LE64_HI12 = (86 | R_LARCH) , LARCH_TLS_IE_PC_HI20 = (87 | R_LARCH) , LARCH_TLS_IE_PC_LO12 = (88 | R_LARCH) ,
  LARCH_TLS_IE64_PC_LO20 = (89 | R_LARCH) , LARCH_TLS_IE64_PC_HI12 = (90 | R_LARCH) , LARCH_TLS_IE_HI20 = (91 | R_LARCH) , LARCH_TLS_IE_LO12 = (92 | R_LARCH) ,
  LARCH_TLS_IE64_LO20 = (93 | R_LARCH) , LARCH_TLS_IE64_HI12 = (94 | R_LARCH) , LARCH_TLS_LD_PC_HI20 = (95 | R_LARCH) , LARCH_TLS_LD_HI20 = (96 | R_LARCH) ,
  LARCH_TLS_GD_PC_HI20 = (97 | R_LARCH) , LARCH_TLS_GD_HI20 = (98 | R_LARCH) , LARCH_32_PCREL = (99 | R_LARCH) , LARCH_RELAX = (100 | R_LARCH) ,
  LARCH_ALIGN = (102 | R_LARCH) , LARCH_PCREL20_S2 = (103 | R_LARCH) , LARCH_ADD6 = (105 | R_LARCH) , LARCH_SUB6 = (106 | R_LARCH) ,
  LARCH_ADD_ULEB128 = (107 | R_LARCH) , LARCH_SUB_ULEB128 = (108 | R_LARCH) , LARCH_64_PCREL = (109 | R_LARCH) , LARCH_CALL36 = (110 | R_LARCH) ,
  LARCH_TLS_DESC32 = (13 | R_LARCH) , LARCH_TLS_DESC64 = (14 | R_LARCH) , LARCH_TLS_DESC_PC_HI20 = (111 | R_LARCH) , LARCH_TLS_DESC_PC_LO12 = (112 | R_LARCH) ,
  LARCH_TLS_DESC64_PC_LO20 = (113 | R_LARCH) , LARCH_TLS_DESC64_PC_HI12 = (114 | R_LARCH) , LARCH_TLS_DESC_HI20 = (115 | R_LARCH) , LARCH_TLS_DESC_LO12 = (116 | R_LARCH) ,
  LARCH_TLS_DESC64_LO20 = (117 | R_LARCH) , LARCH_TLS_DESC64_HI12 = (118 | R_LARCH) , LARCH_TLS_DESC_LD = (119 | R_LARCH) , LARCH_TLS_DESC_CALL = (120 | R_LARCH) ,
  LARCH_TLS_LE_HI20_R = (121 | R_LARCH) , LARCH_TLS_LE_ADD_R = (122 | R_LARCH) , LARCH_TLS_LE_LO12_R = (123 | R_LARCH) , LARCH_TLS_LD_PCREL20_S2 = (124 | R_LARCH) ,
  LARCH_TLS_GD_PCREL20_S2 = (125 | R_LARCH) , LARCH_TLS_DESC_PCREL20_S2 = (126 | R_LARCH) , MIPS_NONE = (0 | R_MIPS) , MIPS_16 = (1 | R_MIPS) ,
  MIPS_32 = (2 | R_MIPS) , MIPS_REL32 = (3 | R_MIPS) , MIPS_26 = (4 | R_MIPS) , MIPS_HI16 = (5 | R_MIPS) ,
  MIPS_LO16 = (6 | R_MIPS) , MIPS_GPREL16 = (7 | R_MIPS) , MIPS_LITERAL = (8 | R_MIPS) , MIPS_GOT16 = (9 | R_MIPS) ,
  MIPS_PC16 = (10 | R_MIPS) , MIPS_CALL16 = (11 | R_MIPS) , MIPS_GPREL32 = (12 | R_MIPS) , MIPS_UNUSED1 = (13 | R_MIPS) ,
  MIPS_UNUSED2 = (14 | R_MIPS) , MIPS_UNUSED3 = (15 | R_MIPS) , MIPS_SHIFT5 = (16 | R_MIPS) , MIPS_SHIFT6 = (17 | R_MIPS) ,
  MIPS_64 = (18 | R_MIPS) , MIPS_GOT_DISP = (19 | R_MIPS) , MIPS_GOT_PAGE = (20 | R_MIPS) , MIPS_GOT_OFST = (21 | R_MIPS) ,
  MIPS_GOT_HI16 = (22 | R_MIPS) , MIPS_GOT_LO16 = (23 | R_MIPS) , MIPS_SUB = (24 | R_MIPS) , MIPS_INSERT_A = (25 | R_MIPS) ,
  MIPS_INSERT_B = (26 | R_MIPS) , MIPS_DELETE = (27 | R_MIPS) , MIPS_HIGHER = (28 | R_MIPS) , MIPS_HIGHEST = (29 | R_MIPS) ,
  MIPS_CALL_HI16 = (30 | R_MIPS) , MIPS_CALL_LO16 = (31 | R_MIPS) , MIPS_SCN_DISP = (32 | R_MIPS) , MIPS_REL16 = (33 | R_MIPS) ,
  MIPS_ADD_IMMEDIATE = (34 | R_MIPS) , MIPS_PJUMP = (35 | R_MIPS) , MIPS_RELGOT = (36 | R_MIPS) , MIPS_JALR = (37 | R_MIPS) ,
  MIPS_TLS_DTPMOD32 = (38 | R_MIPS) , MIPS_TLS_DTPREL32 = (39 | R_MIPS) , MIPS_TLS_DTPMOD64 = (40 | R_MIPS) , MIPS_TLS_DTPREL64 = (41 | R_MIPS) ,
  MIPS_TLS_GD = (42 | R_MIPS) , MIPS_TLS_LDM = (43 | R_MIPS) , MIPS_TLS_DTPREL_HI16 = (44 | R_MIPS) , MIPS_TLS_DTPREL_LO16 = (45 | R_MIPS) ,
  MIPS_TLS_GOTTPREL = (46 | R_MIPS) , MIPS_TLS_TPREL32 = (47 | R_MIPS) , MIPS_TLS_TPREL64 = (48 | R_MIPS) , MIPS_TLS_TPREL_HI16 = (49 | R_MIPS) ,
  MIPS_TLS_TPREL_LO16 = (50 | R_MIPS) , MIPS_GLOB_DAT = (51 | R_MIPS) , MIPS_PC21_S2 = (60 | R_MIPS) , MIPS_PC26_S2 = (61 | R_MIPS) ,
  MIPS_PC18_S3 = (62 | R_MIPS) , MIPS_PC19_S2 = (63 | R_MIPS) , MIPS_PCHI16 = (64 | R_MIPS) , MIPS_PCLO16 = (65 | R_MIPS) ,
  MIPS16_26 = (100 | R_MIPS) , MIPS16_GPREL = (101 | R_MIPS) , MIPS16_GOT16 = (102 | R_MIPS) , MIPS16_CALL16 = (103 | R_MIPS) ,
  MIPS16_HI16 = (104 | R_MIPS) , MIPS16_LO16 = (105 | R_MIPS) , MIPS16_TLS_GD = (106 | R_MIPS) , MIPS16_TLS_LDM = (107 | R_MIPS) ,
  MIPS16_TLS_DTPREL_HI16 = (108 | R_MIPS) , MIPS16_TLS_DTPREL_LO16 = (109 | R_MIPS) , MIPS16_TLS_GOTTPREL = (110 | R_MIPS) , MIPS16_TLS_TPREL_HI16 = (111 | R_MIPS) ,
  MIPS16_TLS_TPREL_LO16 = (112 | R_MIPS) , MIPS_COPY = (126 | R_MIPS) , MIPS_JUMP_SLOT = (127 | R_MIPS) , MICROMIPS_26_S1 = (133 | R_MIPS) ,
  MICROMIPS_HI16 = (134 | R_MIPS) , MICROMIPS_LO16 = (135 | R_MIPS) , MICROMIPS_GPREL16 = (136 | R_MIPS) , MICROMIPS_LITERAL = (137 | R_MIPS) ,
  MICROMIPS_GOT16 = (138 | R_MIPS) , MICROMIPS_PC7_S1 = (139 | R_MIPS) , MICROMIPS_PC10_S1 = (140 | R_MIPS) , MICROMIPS_PC16_S1 = (141 | R_MIPS) ,
  MICROMIPS_CALL16 = (142 | R_MIPS) , MICROMIPS_GOT_DISP = (145 | R_MIPS) , MICROMIPS_GOT_PAGE = (146 | R_MIPS) , MICROMIPS_GOT_OFST = (147 | R_MIPS) ,
  MICROMIPS_GOT_HI16 = (148 | R_MIPS) , MICROMIPS_GOT_LO16 = (149 | R_MIPS) , MICROMIPS_SUB = (150 | R_MIPS) , MICROMIPS_HIGHER = (151 | R_MIPS) ,
  MICROMIPS_HIGHEST = (152 | R_MIPS) , MICROMIPS_CALL_HI16 = (153 | R_MIPS) , MICROMIPS_CALL_LO16 = (154 | R_MIPS) , MICROMIPS_SCN_DISP = (155 | R_MIPS) ,
  MICROMIPS_JALR = (156 | R_MIPS) , MICROMIPS_HI0_LO16 = (157 | R_MIPS) , MICROMIPS_TLS_GD = (162 | R_MIPS) , MICROMIPS_TLS_LDM = (163 | R_MIPS) ,
  MICROMIPS_TLS_DTPREL_HI16 = (164 | R_MIPS) , MICROMIPS_TLS_DTPREL_LO16 = (165 | R_MIPS) , MICROMIPS_TLS_GOTTPREL = (166 | R_MIPS) , MICROMIPS_TLS_TPREL_HI16 = (169 | R_MIPS) ,
  MICROMIPS_TLS_TPREL_LO16 = (170 | R_MIPS) , MICROMIPS_GPREL7_S2 = (172 | R_MIPS) , MICROMIPS_PC23_S2 = (173 | R_MIPS) , MICROMIPS_PC21_S2 = (174 | R_MIPS) ,
  MICROMIPS_PC26_S2 = (175 | R_MIPS) , MICROMIPS_PC18_S3 = (176 | R_MIPS) , MICROMIPS_PC19_S2 = (177 | R_MIPS) , MIPS_NUM = (218 | R_MIPS) ,
  MIPS_PC32 = (248 | R_MIPS) , MIPS_EH = (249 | R_MIPS) , PPC_NONE = (0 | R_PPC) , PPC_ADDR32 = (1 | R_PPC) ,
  PPC_ADDR24 = (2 | R_PPC) , PPC_ADDR16 = (3 | R_PPC) , PPC_ADDR16_LO = (4 | R_PPC) , PPC_ADDR16_HI = (5 | R_PPC) ,
  PPC_ADDR16_HA = (6 | R_PPC) , PPC_ADDR14 = (7 | R_PPC) , PPC_ADDR14_BRTAKEN = (8 | R_PPC) , PPC_ADDR14_BRNTAKEN = (9 | R_PPC) ,
  PPC_REL24 = (10 | R_PPC) , PPC_REL14 = (11 | R_PPC) , PPC_REL14_BRTAKEN = (12 | R_PPC) , PPC_REL14_BRNTAKEN = (13 | R_PPC) ,
  PPC_GOT16 = (14 | R_PPC) , PPC_GOT16_LO = (15 | R_PPC) , PPC_GOT16_HI = (16 | R_PPC) , PPC_GOT16_HA = (17 | R_PPC) ,
  PPC_PLTREL24 = (18 | R_PPC) , PPC_JMP_SLOT = (21 | R_PPC) , PPC_RELATIVE = (22 | R_PPC) , PPC_LOCAL24PC = (23 | R_PPC) ,
  PPC_REL32 = (26 | R_PPC) , PPC_TLS = (67 | R_PPC) , PPC_DTPMOD32 = (68 | R_PPC) , PPC_TPREL16 = (69 | R_PPC) ,
  PPC_TPREL16_LO = (70 | R_PPC) , PPC_TPREL16_HI = (71 | R_PPC) , PPC_TPREL16_HA = (72 | R_PPC) , PPC_TPREL32 = (73 | R_PPC) ,
  PPC_DTPREL16 = (74 | R_PPC) , PPC_DTPREL16_LO = (75 | R_PPC) , PPC_DTPREL16_HI = (76 | R_PPC) , PPC_DTPREL16_HA = (77 | R_PPC) ,
  PPC_DTPREL32 = (78 | R_PPC) , PPC_GOT_TLSGD16 = (79 | R_PPC) , PPC_GOT_TLSGD16_LO = (80 | R_PPC) , PPC_GOT_TLSGD16_HI = (81 | R_PPC) ,
  PPC_GOT_TLSGD16_HA = (82 | R_PPC) , PPC_GOT_TLSLD16 = (83 | R_PPC) , PPC_GOT_TLSLD16_LO = (84 | R_PPC) , PPC_GOT_TLSLD16_HI = (85 | R_PPC) ,
  PPC_GOT_TLSLD16_HA = (86 | R_PPC) , PPC_GOT_TPREL16 = (87 | R_PPC) , PPC_GOT_TPREL16_LO = (88 | R_PPC) , PPC_GOT_TPREL16_HI = (89 | R_PPC) ,
  PPC_GOT_TPREL16_HA = (90 | R_PPC) , PPC_GOT_DTPREL16 = (91 | R_PPC) , PPC_GOT_DTPREL16_LO = (92 | R_PPC) , PPC_GOT_DTPREL16_HI = (93 | R_PPC) ,
  PPC_GOT_DTPREL16_HA = (94 | R_PPC) , PPC_TLSGD = (95 | R_PPC) , PPC_TLSLD = (96 | R_PPC) , PPC_REL16 = (249 | R_PPC) ,
  PPC_REL16_LO = (250 | R_PPC) , PPC_REL16_HI = (251 | R_PPC) , PPC_REL16_HA = (252 | R_PPC) , PPC64_NONE = (0 | R_PPC64) ,
  PPC64_ADDR32 = (1 | R_PPC64) , PPC64_ADDR24 = (2 | R_PPC64) , PPC64_ADDR16 = (3 | R_PPC64) , PPC64_ADDR16_LO = (4 | R_PPC64) ,
  PPC64_ADDR16_HI = (5 | R_PPC64) , PPC64_ADDR16_HA = (6 | R_PPC64) , PPC64_ADDR14 = (7 | R_PPC64) , PPC64_ADDR14_BRTAKEN = (8 | R_PPC64) ,
  PPC64_ADDR14_BRNTAKEN = (9 | R_PPC64) , PPC64_REL24 = (10 | R_PPC64) , PPC64_REL14 = (11 | R_PPC64) , PPC64_REL14_BRTAKEN = (12 | R_PPC64) ,
  PPC64_REL14_BRNTAKEN = (13 | R_PPC64) , PPC64_GOT16 = (14 | R_PPC64) , PPC64_GOT16_LO = (15 | R_PPC64) , PPC64_GOT16_HI = (16 | R_PPC64) ,
  PPC64_GOT16_HA = (17 | R_PPC64) , PPC64_JMP_SLOT = (21 | R_PPC64) , PPC64_RELATIVE = (22 | R_PPC64) , PPC64_REL32 = (26 | R_PPC64) ,
  PPC64_ADDR64 = (38 | R_PPC64) , PPC64_ADDR16_HIGHER = (39 | R_PPC64) , PPC64_ADDR16_HIGHERA = (40 | R_PPC64) , PPC64_ADDR16_HIGHEST = (41 | R_PPC64) ,
  PPC64_ADDR16_HIGHESTA = (42 | R_PPC64) , PPC64_REL64 = (44 | R_PPC64) , PPC64_TOC16 = (47 | R_PPC64) , PPC64_TOC16_LO = (48 | R_PPC64) ,
  PPC64_TOC16_HI = (49 | R_PPC64) , PPC64_TOC16_HA = (50 | R_PPC64) , PPC64_TOC = (51 | R_PPC64) , PPC64_ADDR16_DS = (56 | R_PPC64) ,
  PPC64_ADDR16_LO_DS = (57 | R_PPC64) , PPC64_GOT16_DS = (58 | R_PPC64) , PPC64_GOT16_LO_DS = (59 | R_PPC64) , PPC64_TOC16_DS = (63 | R_PPC64) ,
  PPC64_TOC16_LO_DS = (64 | R_PPC64) , PPC64_TLS = (67 | R_PPC64) , PPC64_DTPMOD64 = (68 | R_PPC64) , PPC64_TPREL16 = (69 | R_PPC64) ,
  PPC64_TPREL16_LO = (70 | R_PPC64) , PPC64_TPREL16_HI = (71 | R_PPC64) , PPC64_TPREL16_HA = (72 | R_PPC64) , PPC64_TPREL64 = (73 | R_PPC64) ,
  PPC64_DTPREL16 = (74 | R_PPC64) , PPC64_DTPREL16_LO = (75 | R_PPC64) , PPC64_DTPREL16_HI = (76 | R_PPC64) , PPC64_DTPREL16_HA = (77 | R_PPC64) ,
  PPC64_DTPREL64 = (78 | R_PPC64) , PPC64_GOT_TLSGD16 = (79 | R_PPC64) , PPC64_GOT_TLSGD16_LO = (80 | R_PPC64) , PPC64_GOT_TLSGD16_HI = (81 | R_PPC64) ,
  PPC64_GOT_TLSGD16_HA = (82 | R_PPC64) , PPC64_GOT_TLSLD16 = (83 | R_PPC64) , PPC64_GOT_TLSLD16_LO = (84 | R_PPC64) , PPC64_GOT_TLSLD16_HI = (85 | R_PPC64) ,
  PPC64_GOT_TLSLD16_HA = (86 | R_PPC64) , PPC64_GOT_TPREL16_DS = (87 | R_PPC64) , PPC64_GOT_TPREL16_LO_DS = (88 | R_PPC64) , PPC64_GOT_TPREL16_HI = (89 | R_PPC64) ,
  PPC64_GOT_TPREL16_HA = (90 | R_PPC64) , PPC64_GOT_DTPREL16_DS = (91 | R_PPC64) , PPC64_GOT_DTPREL16_LO_DS = (92 | R_PPC64) , PPC64_GOT_DTPREL16_HI = (93 | R_PPC64) ,
  PPC64_GOT_DTPREL16_HA = (94 | R_PPC64) , PPC64_TPREL16_DS = (95 | R_PPC64) , PPC64_TPREL16_LO_DS = (96 | R_PPC64) , PPC64_TPREL16_HIGHER = (97 | R_PPC64) ,
  PPC64_TPREL16_HIGHERA = (98 | R_PPC64) , PPC64_TPREL16_HIGHEST = (99 | R_PPC64) , PPC64_TPREL16_HIGHESTA = (100 | R_PPC64) , PPC64_DTPREL16_DS = (101 | R_PPC64) ,
  PPC64_DTPREL16_LO_DS = (102 | R_PPC64) , PPC64_DTPREL16_HIGHER = (103 | R_PPC64) , PPC64_DTPREL16_HIGHERA = (104 | R_PPC64) , PPC64_DTPREL16_HIGHEST = (105 | R_PPC64) ,
  PPC64_DTPREL16_HIGHESTA = (106 | R_PPC64) , PPC64_TLSGD = (107 | R_PPC64) , PPC64_TLSLD = (108 | R_PPC64) , PPC64_REL16 = (249 | R_PPC64) ,
  PPC64_REL16_LO = (250 | R_PPC64) , PPC64_REL16_HI = (251 | R_PPC64) , PPC64_REL16_HA = (252 | R_PPC64) , SPARC_NONE = (0 | R_SPARC) ,
  SPARC_8 = (1 | R_SPARC) , SPARC_16 = (2 | R_SPARC) , SPARC_32 = (3 | R_SPARC) , SPARC_DISP8 = (4 | R_SPARC) ,
  SPARC_DISP16 = (5 | R_SPARC) , SPARC_DISP32 = (6 | R_SPARC) , SPARC_WDISP30 = (7 | R_SPARC) , SPARC_WDISP22 = (8 | R_SPARC) ,
  SPARC_HI22 = (9 | R_SPARC) , SPARC_22 = (10 | R_SPARC) , SPARC_13 = (11 | R_SPARC) , SPARC_LO10 = (12 | R_SPARC) ,
  SPARC_GOT10 = (13 | R_SPARC) , SPARC_GOT13 = (14 | R_SPARC) , SPARC_GOT22 = (15 | R_SPARC) , SPARC_PC10 = (16 | R_SPARC) ,
  SPARC_PC22 = (17 | R_SPARC) , SPARC_WPLT30 = (18 | R_SPARC) , SPARC_COPY = (19 | R_SPARC) , SPARC_GLOB_DAT = (20 | R_SPARC) ,
  SPARC_JMP_SLOT = (21 | R_SPARC) , SPARC_RELATIVE = (22 | R_SPARC) , SPARC_UA32 = (23 | R_SPARC) , SPARC_PLT32 = (24 | R_SPARC) ,
  SPARC_HIPLT22 = (25 | R_SPARC) , SPARC_LOPLT10 = (26 | R_SPARC) , SPARC_PCPLT32 = (27 | R_SPARC) , SPARC_PCPLT22 = (28 | R_SPARC) ,
  SPARC_PCPLT10 = (29 | R_SPARC) , SPARC_10 = (30 | R_SPARC) , SPARC_11 = (31 | R_SPARC) , SPARC_64 = (32 | R_SPARC) ,
  SPARC_OLO10 = (33 | R_SPARC) , SPARC_HH22 = (34 | R_SPARC) , SPARC_HM10 = (35 | R_SPARC) , SPARC_LM22 = (36 | R_SPARC) ,
  SPARC_PC_HH22 = (37 | R_SPARC) , SPARC_PC_HM10 = (38 | R_SPARC) , SPARC_PC_LM22 = (39 | R_SPARC) , SPARC_WDISP16 = (40 | R_SPARC) ,
  SPARC_WDISP19 = (41 | R_SPARC) , SPARC_7 = (43 | R_SPARC) , SPARC_5 = (44 | R_SPARC) , SPARC_6 = (45 | R_SPARC) ,
  SPARC_DISP64 = (46 | R_SPARC) , SPARC_PLT64 = (47 | R_SPARC) , SPARC_HIX22 = (48 | R_SPARC) , SPARC_LOX10 = (49 | R_SPARC) ,
  SPARC_H44 = (50 | R_SPARC) , SPARC_M44 = (51 | R_SPARC) , SPARC_L44 = (52 | R_SPARC) , SPARC_REGISTER = (53 | R_SPARC) ,
  SPARC_UA64 = (54 | R_SPARC) , SPARC_UA16 = (55 | R_SPARC) , SPARC_TLS_GD_HI22 = (56 | R_SPARC) , SPARC_TLS_GD_LO10 = (57 | R_SPARC) ,
  SPARC_TLS_GD_ADD = (58 | R_SPARC) , SPARC_TLS_GD_CALL = (59 | R_SPARC) , SPARC_TLS_LDM_HI22 = (60 | R_SPARC) , SPARC_TLS_LDM_LO10 = (61 | R_SPARC) ,
  SPARC_TLS_LDM_ADD = (62 | R_SPARC) , SPARC_TLS_LDM_CALL = (63 | R_SPARC) , SPARC_TLS_LDO_HIX22 = (64 | R_SPARC) , SPARC_TLS_LDO_LOX10 = (65 | R_SPARC) ,
  SPARC_TLS_LDO_ADD = (66 | R_SPARC) , SPARC_TLS_IE_HI22 = (67 | R_SPARC) , SPARC_TLS_IE_LO10 = (68 | R_SPARC) , SPARC_TLS_IE_LD = (69 | R_SPARC) ,
  SPARC_TLS_IE_LDX = (70 | R_SPARC) , SPARC_TLS_IE_ADD = (71 | R_SPARC) , SPARC_TLS_LE_HIX22 = (72 | R_SPARC) , SPARC_TLS_LE_LOX10 = (73 | R_SPARC) ,
  SPARC_TLS_DTPMOD32 = (74 | R_SPARC) , SPARC_TLS_DTPMOD64 = (75 | R_SPARC) , SPARC_TLS_DTPOFF32 = (76 | R_SPARC) , SPARC_TLS_DTPOFF64 = (77 | R_SPARC) ,
  SPARC_TLS_TPOFF32 = (78 | R_SPARC) , SPARC_TLS_TPOFF64 = (79 | R_SPARC) , SPARC_GOTDATA_HIX22 = (80 | R_SPARC) , SPARC_GOTDATA_LOX10 = (81 | R_SPARC) ,
  SPARC_GOTDATA_OP_HIX22 = (82 | R_SPARC) , SPARC_GOTDATA_OP_LOX10 = (83 | R_SPARC) , SPARC_GOTDATA_OP = (84 | R_SPARC) , SYSZ_NONE = (0 | R_SYSZ) ,
  SYSZ_8 = (1 | R_SYSZ) , SYSZ_12 = (2 | R_SYSZ) , SYSZ_16 = (3 | R_SYSZ) , SYSZ_32 = (4 | R_SYSZ) ,
  SYSZ_PC32 = (5 | R_SYSZ) , SYSZ_GOT12 = (6 | R_SYSZ) , SYSZ_GOT32 = (7 | R_SYSZ) , SYSZ_PLT32 = (8 | R_SYSZ) ,
  SYSZ_COPY = (9 | R_SYSZ) , SYSZ_GLOB_DAT = (10 | R_SYSZ) , SYSZ_JMP_SLOT = (11 | R_SYSZ) , SYSZ_RELATIVE = (12 | R_SYSZ) ,
  SYSZ_GOTOFF = (13 | R_SYSZ) , SYSZ_GOTPC = (14 | R_SYSZ) , SYSZ_GOT16 = (15 | R_SYSZ) , SYSZ_PC16 = (16 | R_SYSZ) ,
  SYSZ_PC16DBL = (17 | R_SYSZ) , SYSZ_PLT16DBL = (18 | R_SYSZ) , SYSZ_PC32DBL = (19 | R_SYSZ) , SYSZ_PLT32DBL = (20 | R_SYSZ) ,
  SYSZ_GOTPCDBL = (21 | R_SYSZ) , SYSZ_64 = (22 | R_SYSZ) , SYSZ_PC64 = (23 | R_SYSZ) , SYSZ_GOT64 = (24 | R_SYSZ) ,
  SYSZ_PLT64 = (25 | R_SYSZ) , SYSZ_GOTENT = (26 | R_SYSZ) , SYSZ_GOTOFF16 = (27 | R_SYSZ) , SYSZ_GOTOFF64 = (28 | R_SYSZ) ,
  SYSZ_GOTPLT12 = (29 | R_SYSZ) , SYSZ_GOTPLT16 = (30 | R_SYSZ) , SYSZ_GOTPLT32 = (31 | R_SYSZ) , SYSZ_GOTPLT64 = (32 | R_SYSZ) ,
  SYSZ_GOTPLTENT = (33 | R_SYSZ) , SYSZ_PLTOFF16 = (34 | R_SYSZ) , SYSZ_PLTOFF32 = (35 | R_SYSZ) , SYSZ_PLTOFF64 = (36 | R_SYSZ) ,
  SYSZ_TLS_LOAD = (37 | R_SYSZ) , SYSZ_TLS_GDCALL = (38 | R_SYSZ) , SYSZ_TLS_LDCALL = (39 | R_SYSZ) , SYSZ_TLS_GD32 = (40 | R_SYSZ) ,
  SYSZ_TLS_GD64 = (41 | R_SYSZ) , SYSZ_TLS_GOTIE12 = (42 | R_SYSZ) , SYSZ_TLS_GOTIE32 = (43 | R_SYSZ) , SYSZ_TLS_GOTIE64 = (44 | R_SYSZ) ,
  SYSZ_TLS_LDM32 = (45 | R_SYSZ) , SYSZ_TLS_LDM64 = (46 | R_SYSZ) , SYSZ_TLS_IE32 = (47 | R_SYSZ) , SYSZ_TLS_IE64 = (48 | R_SYSZ) ,
  SYSZ_TLS_IEENT = (49 | R_SYSZ) , SYSZ_TLS_LE32 = (50 | R_SYSZ) , SYSZ_TLS_LE64 = (51 | R_SYSZ) , SYSZ_TLS_LDO32 = (52 | R_SYSZ) ,
  SYSZ_TLS_LDO64 = (53 | R_SYSZ) , SYSZ_TLS_DTPMOD = (54 | R_SYSZ) , SYSZ_TLS_DTPOFF = (55 | R_SYSZ) , SYSZ_TLS_TPOFF = (56 | R_SYSZ) ,
  SYSZ_20 = (57 | R_SYSZ) , SYSZ_GOT20 = (58 | R_SYSZ) , SYSZ_GOTPLT20 = (59 | R_SYSZ) , SYSZ_TLS_GOTIE20 = (60 | R_SYSZ) ,
  SYSZ_IRELATIVE = (61 | R_SYSZ) , RISCV_NONE = (0 | R_RISCV) , RISCV_32 = (1 | R_RISCV) , RISCV_64 = (2 | R_RISCV) ,
  RISCV_RELATIVE = (3 | R_RISCV) , RISCV_COPY = (4 | R_RISCV) , RISCV_JUMP_SLOT = (5 | R_RISCV) , RISCV_TLS_DTPMOD32 = (6 | R_RISCV) ,
  RISCV_TLS_DTPMOD64 = (7 | R_RISCV) , RISCV_TLS_DTPREL32 = (8 | R_RISCV) , RISCV_TLS_DTPREL64 = (9 | R_RISCV) , RISCV_TLS_TPREL32 = (10 | R_RISCV) ,
  RISCV_TLS_TPREL64 = (11 | R_RISCV) , RISCV_TLSDESC = (12 | R_RISCV) , RISCV_BRANCH = (16 | R_RISCV) , RISCV_JAL = (17 | R_RISCV) ,
  RISCV_CALL = (18 | R_RISCV) , RISCV_CALL_PLT = (19 | R_RISCV) , RISCV_GOT_HI20 = (20 | R_RISCV) , RISCV_TLS_GOT_HI20 = (21 | R_RISCV) ,
  RISCV_TLS_GD_HI20 = (22 | R_RISCV) , RISCV_PCREL_HI20 = (23 | R_RISCV) , RISCV_PCREL_LO12_I = (24 | R_RISCV) , RISCV_PCREL_LO12_S = (25 | R_RISCV) ,
  RISCV_HI20 = (26 | R_RISCV) , RISCV_LO12_I = (27 | R_RISCV) , RISCV_LO12_S = (28 | R_RISCV) , RISCV_TPREL_HI20 = (29 | R_RISCV) ,
  RISCV_TPREL_LO12_I = (30 | R_RISCV) , RISCV_TPREL_LO12_S = (31 | R_RISCV) , RISCV_TPREL_ADD = (32 | R_RISCV) , RISCV_ADD8 = (33 | R_RISCV) ,
  RISCV_ADD16 = (34 | R_RISCV) , RISCV_ADD32 = (35 | R_RISCV) , RISCV_ADD64 = (36 | R_RISCV) , RISCV_SUB8 = (37 | R_RISCV) ,
  RISCV_SUB16 = (38 | R_RISCV) , RISCV_SUB32 = (39 | R_RISCV) , RISCV_SUB64 = (40 | R_RISCV) , RISCV_GOT32_PCREL = (41 | R_RISCV) ,
  RISCV_ALIGN = (43 | R_RISCV) , RISCV_RVC_BRANCH = (44 | R_RISCV) , RISCV_RVC_JUMP = (45 | R_RISCV) , RISCV_RVC_LUI = (46 | R_RISCV) ,
  RISCV_RELAX = (51 | R_RISCV) , RISCV_SUB6 = (52 | R_RISCV) , RISCV_SET6 = (53 | R_RISCV) , RISCV_SET8 = (54 | R_RISCV) ,
  RISCV_SET16 = (55 | R_RISCV) , RISCV_SET32 = (56 | R_RISCV) , RISCV_32_PCREL = (57 | R_RISCV) , RISCV_IRELATIVE = (58 | R_RISCV) ,
  RISCV_PLT32 = (59 | R_RISCV) , RISCV_SET_ULEB128 = (60 | R_RISCV) , RISCV_SUB_ULEB128 = (61 | R_RISCV) , RISCV_TLSDESC_HI20 = (62 | R_RISCV) ,
  RISCV_TLSDESC_LOAD_LO12 = (63 | R_RISCV) , RISCV_TLSDESC_ADD_LO12 = (64 | R_RISCV) , RISCV_TLSDESC_CALL = (65 | R_RISCV) , BPF_NONE = (0 | R_BPF) ,
  BPF_64_64 = (1 | R_BPF) , BPF_64_ABS64 = (2 | R_BPF) , BPF_64_ABS32 = (3 | R_BPF) , BPF_64_NODYLD32 = (4 | R_BPF) ,
  BPF_64_32 = (10 | R_BPF)
}
 The different types of the relocation. More...
 
- Public Types inherited from LIEF::Object
template<class T >
using output_t = add_pointer_t<decay_t<T>>
 
template<class T >
using output_const_t = add_pointer_t<add_const_t<decay_t<T>>>
 

Public Member Functions

 Relocation (uint64_t address, TYPE type, ENCODING enc)
 
 Relocation ()=default
 
 Relocation (ARCH arch)
 
 ~Relocation () override=default
 
 Relocation (const Relocation &other)
 Copy constructor.
 
Relocationoperator= (Relocation other)
 Copy assignment operator.
 
void swap (Relocation &other)
 
int64_t addend () const
 Additional value that can be involved in the relocation processing.
 
TYPE type () const
 Type of the relocation.
 
bool is_rela () const
 Check if the relocation uses the explicit addend() field (this is usually the case for 64 bits binaries)
 
bool is_rel () const
 Check if the relocation uses the implicit addend (i.e. not present in the ELF structure)
 
bool is_relatively_encoded () const
 True if the relocation is using the relative encoding.
 
bool is_android_packed () const
 True if the relocation is using the Android packed relocation format.
 
uint32_t info () const
 Relocation info which contains, for instance, the symbol index.
 
uint64_t r_info (Header::CLASS clazz) const
 (re)Compute the raw r_info attribute based on the given ELF class
 
ARCH architecture () const
 Target architecture for this relocation.
 
PURPOSE purpose () const
 
ENCODING encoding () const
 The encoding of the relocation.
 
bool is_relative () const
 True if the semantic of the relocation is <ARCH>_RELATIVE
 
size_t size () const override
 Return the size (in bits) of the value associated with this relocation Return -1 if the size can't be determined.
 
bool has_symbol () const
 True if the current relocation is associated with a symbol.
 
Symbolsymbol ()
 Symbol associated with the relocation (or a nullptr)
 
const Symbolsymbol () const
 
bool has_section () const
 True if the relocation has an associated section.
 
Sectionsection ()
 The section in which the relocation is applied (or a nullptr)
 
const Sectionsection () const
 
Sectionsymbol_table ()
 The associated symbol table (or a nullptr)
 
const Sectionsymbol_table () const
 
void addend (int64_t addend)
 
void type (TYPE type)
 
void purpose (PURPOSE purpose)
 
void info (uint32_t v)
 
void symbol (Symbol *symbol)
 
void section (Section *section)
 
void symbol_table (Section *section)
 
result< uint64_t > resolve (uint64_t base_address=0) const
 Try to resolve the value of the relocation such as *address() = resolve()
 
void accept (Visitor &visitor) const override
 
- Public Member Functions inherited from LIEF::Relocation
 Relocation ()=default
 
 Relocation (uint64_t address, uint8_t size)
 Constructor from a relocation's address and size.
 
 ~Relocation () override=default
 
Relocationoperator= (const Relocation &)=default
 
 Relocation (const Relocation &)=default
 
void swap (Relocation &other)
 
virtual uint64_t address () const
 Relocation's address.
 
virtual void address (uint64_t address)
 
virtual void size (size_t size)
 
void accept (Visitor &visitor) const override
 Method so that the visitor can visit us.
 
virtual bool operator< (const Relocation &rhs) const
 Comparaison based on the Relocation's address
 
virtual bool operator<= (const Relocation &rhs) const
 Comparaison based on the Relocation's address
 
virtual bool operator> (const Relocation &rhs) const
 Comparaison based on the Relocation's address
 
virtual bool operator>= (const Relocation &rhs) const
 Comparaison based on the Relocation's address
 
- Public Member Functions inherited from LIEF::Object
 Object ()
 
 Object (const Object &other)
 
Objectoperator= (const Object &other)
 
template<class T >
output_t< T > as ()
 
template<class T >
output_const_t< T > as () const
 
virtual bool operator== (const Object &other) const
 
virtual bool operator!= (const Object &other) const
 
virtual ~Object ()
 

Static Public Member Functions

static TYPE type_from (uint32_t value, ARCH arch)
 
static uint32_t to_value (TYPE type)
 

Static Public Attributes

static constexpr uint64_t R_BIT = 27
 
static constexpr uint64_t R_MASK = (uint64_t(1) << R_BIT) - 1
 
static constexpr uint64_t R_X64 = uint64_t(1) << R_BIT
 
static constexpr uint64_t R_AARCH64 = uint64_t(2) << R_BIT
 
static constexpr uint64_t R_ARM = uint64_t(3) << R_BIT
 
static constexpr uint64_t R_HEXAGON = uint64_t(4) << R_BIT
 
static constexpr uint64_t R_X86 = uint64_t(5) << R_BIT
 
static constexpr uint64_t R_LARCH = uint64_t(6) << R_BIT
 
static constexpr uint64_t R_MIPS = uint64_t(7) << R_BIT
 
static constexpr uint64_t R_PPC = uint64_t(8) << R_BIT
 
static constexpr uint64_t R_PPC64 = uint64_t(9) << R_BIT
 
static constexpr uint64_t R_SPARC = uint64_t(10) << R_BIT
 
static constexpr uint64_t R_SYSZ = uint64_t(11) << R_BIT
 
static constexpr uint64_t R_RISCV = uint64_t(12) << R_BIT
 
static constexpr uint64_t R_BPF = uint64_t(13) << R_BIT
 

Detailed Description

Class that represents an ELF relocation.

Member Enumeration Documentation

◆ ENCODING

Enumerator
UNKNOWN 
REL 

The relocation is using the regular Elf_Rel structure.

RELA 

The relocation is using the regular Elf_Rela structure.

RELR 

The relocation is using the relative relocation format.

ANDROID_SLEB 

The relocation is using the packed Android-SLEB128 format.

◆ PURPOSE

enum class LIEF::ELF::Relocation::PURPOSE
strong

The purpose of a relocation defines how this relocation is used by the loader.

Enumerator
NONE 
PLTGOT 

The relocation is associated with the PLT/GOT resolution.

DYNAMIC 

The relocation is used for regulard data/code relocation.

OBJECT 

The relocation is used in an object file.

◆ TYPE

enum class LIEF::ELF::Relocation::TYPE : uint32_t
strong

The different types of the relocation.

Enumerator
UNKNOWN 
X86_64_NONE 
X86_64_64 
X86_64_PC32 
X86_64_GOT32 
X86_64_PLT32 
X86_64_COPY 
X86_64_GLOB_DAT 
X86_64_JUMP_SLOT 
X86_64_RELATIVE 
X86_64_GOTPCREL 
X86_64_32 
X86_64_32S 
X86_64_16 
X86_64_PC16 
X86_64_8 
X86_64_PC8 
X86_64_DTPMOD64 
X86_64_DTPOFF64 
X86_64_TPOFF64 
X86_64_TLSGD 
X86_64_TLSLD 
X86_64_DTPOFF32 
X86_64_GOTTPOFF 
X86_64_TPOFF32 
X86_64_PC64 
X86_64_GOTOFF64 
X86_64_GOTPC32 
X86_64_GOT64 
X86_64_GOTPCREL64 
X86_64_GOTPC64 
X86_64_GOTPLT64 
X86_64_PLTOFF64 
X86_64_SIZE32 
X86_64_SIZE64 
X86_64_GOTPC32_TLSDESC 
X86_64_TLSDESC_CALL 
X86_64_TLSDESC 
X86_64_IRELATIVE 
X86_64_RELATIVE64 
X86_64_PC32_BND 
X86_64_PLT32_BND 
X86_64_GOTPCRELX 
X86_64_REX_GOTPCRELX 
AARCH64_NONE 
AARCH64_ABS64 
AARCH64_ABS32 
AARCH64_ABS16 
AARCH64_PREL64 
AARCH64_PREL32 
AARCH64_PREL16 
AARCH64_MOVW_UABS_G0 
AARCH64_MOVW_UABS_G0_NC 
AARCH64_MOVW_UABS_G1 
AARCH64_MOVW_UABS_G1_NC 
AARCH64_MOVW_UABS_G2 
AARCH64_MOVW_UABS_G2_NC 
AARCH64_MOVW_UABS_G3 
AARCH64_MOVW_SABS_G0 
AARCH64_MOVW_SABS_G1 
AARCH64_MOVW_SABS_G2 
AARCH64_LD_PREL_LO19 
AARCH64_ADR_PREL_LO21 
AARCH64_ADR_PREL_PG_HI21 
AARCH64_ADR_PREL_PG_HI21_NC 
AARCH64_ADD_ABS_LO12_NC 
AARCH64_LDST8_ABS_LO12_NC 
AARCH64_TSTBR14 
AARCH64_CONDBR19 
AARCH64_JUMP26 
AARCH64_CALL26 
AARCH64_LDST16_ABS_LO12_NC 
AARCH64_LDST32_ABS_LO12_NC 
AARCH64_LDST64_ABS_LO12_NC 
AARCH64_MOVW_PREL_G0 
AARCH64_MOVW_PREL_G0_NC 
AARCH64_MOVW_PREL_G1 
AARCH64_MOVW_PREL_G1_NC 
AARCH64_MOVW_PREL_G2 
AARCH64_MOVW_PREL_G2_NC 
AARCH64_MOVW_PREL_G3 
AARCH64_LDST128_ABS_LO12_NC 
AARCH64_MOVW_GOTOFF_G0 
AARCH64_MOVW_GOTOFF_G0_NC 
AARCH64_MOVW_GOTOFF_G1 
AARCH64_MOVW_GOTOFF_G1_NC 
AARCH64_MOVW_GOTOFF_G2 
AARCH64_MOVW_GOTOFF_G2_NC 
AARCH64_MOVW_GOTOFF_G3 
AARCH64_GOTREL64 
AARCH64_GOTREL32 
AARCH64_GOT_LD_PREL19 
AARCH64_LD64_GOTOFF_LO15 
AARCH64_ADR_GOT_PAGE 
AARCH64_LD64_GOT_LO12_NC 
AARCH64_LD64_GOTPAGE_LO15 
AARCH64_TLSGD_ADR_PREL21 
AARCH64_TLSGD_ADR_PAGE21 
AARCH64_TLSGD_ADD_LO12_NC 
AARCH64_TLSGD_MOVW_G1 
AARCH64_TLSGD_MOVW_G0_NC 
AARCH64_TLSLD_ADR_PREL21 
AARCH64_TLSLD_ADR_PAGE21 
AARCH64_TLSLD_ADD_LO12_NC 
AARCH64_TLSLD_MOVW_G1 
AARCH64_TLSLD_MOVW_G0_NC 
AARCH64_TLSLD_LD_PREL19 
AARCH64_TLSLD_MOVW_DTPREL_G2 
AARCH64_TLSLD_MOVW_DTPREL_G1 
AARCH64_TLSLD_MOVW_DTPREL_G1_NC 
AARCH64_TLSLD_MOVW_DTPREL_G0 
AARCH64_TLSLD_MOVW_DTPREL_G0_NC 
AARCH64_TLSLD_ADD_DTPREL_HI12 
AARCH64_TLSLD_ADD_DTPREL_LO12 
AARCH64_TLSLD_ADD_DTPREL_LO12_NC 
AARCH64_TLSLD_LDST8_DTPREL_LO12 
AARCH64_TLSLD_LDST8_DTPREL_LO12_NC 
AARCH64_TLSLD_LDST16_DTPREL_LO12 
AARCH64_TLSLD_LDST16_DTPREL_LO12_NC 
AARCH64_TLSLD_LDST32_DTPREL_LO12 
AARCH64_TLSLD_LDST32_DTPREL_LO12_NC 
AARCH64_TLSLD_LDST64_DTPREL_LO12 
AARCH64_TLSLD_LDST64_DTPREL_LO12_NC 
AARCH64_TLSIE_MOVW_GOTTPREL_G1 
AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC 
AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 
AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC 
AARCH64_TLSIE_LD_GOTTPREL_PREL19 
AARCH64_TLSLE_MOVW_TPREL_G2 
AARCH64_TLSLE_MOVW_TPREL_G1 
AARCH64_TLSLE_MOVW_TPREL_G1_NC 
AARCH64_TLSLE_MOVW_TPREL_G0 
AARCH64_TLSLE_MOVW_TPREL_G0_NC 
AARCH64_TLSLE_ADD_TPREL_HI12 
AARCH64_TLSLE_ADD_TPREL_LO12 
AARCH64_TLSLE_ADD_TPREL_LO12_NC 
AARCH64_TLSLE_LDST8_TPREL_LO12 
AARCH64_TLSLE_LDST8_TPREL_LO12_NC 
AARCH64_TLSLE_LDST16_TPREL_LO12 
AARCH64_TLSLE_LDST16_TPREL_LO12_NC 
AARCH64_TLSLE_LDST32_TPREL_LO12 
AARCH64_TLSLE_LDST32_TPREL_LO12_NC 
AARCH64_TLSLE_LDST64_TPREL_LO12 
AARCH64_TLSLE_LDST64_TPREL_LO12_NC 
AARCH64_TLSDESC_LD_PREL19 
AARCH64_TLSDESC_ADR_PREL21 
AARCH64_TLSDESC_ADR_PAGE21 
AARCH64_TLSDESC_LD64_LO12_NC 
AARCH64_TLSDESC_ADD_LO12_NC 
AARCH64_TLSDESC_OFF_G1 
AARCH64_TLSDESC_OFF_G0_NC 
AARCH64_TLSDESC_LDR 
AARCH64_TLSDESC_ADD 
AARCH64_TLSDESC_CALL 
AARCH64_TLSLE_LDST128_TPREL_LO12 
AARCH64_TLSLE_LDST128_TPREL_LO12_NC 
AARCH64_TLSLD_LDST128_DTPREL_LO12 
AARCH64_TLSLD_LDST128_DTPREL_LO12_NC 
AARCH64_COPY 
AARCH64_GLOB_DAT 
AARCH64_JUMP_SLOT 
AARCH64_RELATIVE 
AARCH64_TLS_DTPREL64 
AARCH64_TLS_DTPMOD64 
AARCH64_TLS_TPREL64 
AARCH64_TLSDESC 
AARCH64_IRELATIVE 
ARM_NONE 
ARM_PC24 
ARM_ABS32 
ARM_REL32 
ARM_LDR_PC_G0 
ARM_ABS16 
ARM_ABS12 
ARM_THM_ABS5 
ARM_ABS8 
ARM_SBREL32 
ARM_THM_CALL 
ARM_THM_PC8 
ARM_BREL_ADJ 
ARM_TLS_DESC 
ARM_THM_SWI8 
ARM_XPC25 
ARM_THM_XPC22 
ARM_TLS_DTPMOD32 
ARM_TLS_DTPOFF32 
ARM_TLS_TPOFF32 
ARM_COPY 
ARM_GLOB_DAT 
ARM_JUMP_SLOT 
ARM_RELATIVE 
ARM_GOTOFF32 
ARM_BASE_PREL 
ARM_GOT_BREL 
ARM_PLT32 
ARM_CALL 
ARM_JUMP24 
ARM_THM_JUMP24 
ARM_BASE_ABS 
ARM_ALU_PCREL_7_0 
ARM_ALU_PCREL_15_8 
ARM_ALU_PCREL_23_15 
ARM_LDR_SBREL_11_0_NC 
ARM_ALU_SBREL_19_12_NC 
ARM_ALU_SBREL_27_20_CK 
ARM_TARGET1 
ARM_SBREL31 
ARM_V4BX 
ARM_TARGET2 
ARM_PREL31 
ARM_MOVW_ABS_NC 
ARM_MOVT_ABS 
ARM_MOVW_PREL_NC 
ARM_MOVT_PREL 
ARM_THM_MOVW_ABS_NC 
ARM_THM_MOVT_ABS 
ARM_THM_MOVW_PREL_NC 
ARM_THM_MOVT_PREL 
ARM_THM_JUMP19 
ARM_THM_JUMP6 
ARM_THM_ALU_PREL_11_0 
ARM_THM_PC12 
ARM_ABS32_NOI 
ARM_REL32_NOI 
ARM_ALU_PC_G0_NC 
ARM_ALU_PC_G0 
ARM_ALU_PC_G1_NC 
ARM_ALU_PC_G1 
ARM_ALU_PC_G2 
ARM_LDR_PC_G1 
ARM_LDR_PC_G2 
ARM_LDRS_PC_G0 
ARM_LDRS_PC_G1 
ARM_LDRS_PC_G2 
ARM_LDC_PC_G0 
ARM_LDC_PC_G1 
ARM_LDC_PC_G2 
ARM_ALU_SB_G0_NC 
ARM_ALU_SB_G0 
ARM_ALU_SB_G1_NC 
ARM_ALU_SB_G1 
ARM_ALU_SB_G2 
ARM_LDR_SB_G0 
ARM_LDR_SB_G1 
ARM_LDR_SB_G2 
ARM_LDRS_SB_G0 
ARM_LDRS_SB_G1 
ARM_LDRS_SB_G2 
ARM_LDC_SB_G0 
ARM_LDC_SB_G1 
ARM_LDC_SB_G2 
ARM_MOVW_BREL_NC 
ARM_MOVT_BREL 
ARM_MOVW_BREL 
ARM_THM_MOVW_BREL_NC 
ARM_THM_MOVT_BREL 
ARM_THM_MOVW_BREL 
ARM_TLS_GOTDESC 
ARM_TLS_CALL 
ARM_TLS_DESCSEQ 
ARM_THM_TLS_CALL 
ARM_PLT32_ABS 
ARM_GOT_ABS 
ARM_GOT_PREL 
ARM_GOT_BREL12 
ARM_GOTOFF12 
ARM_GOTRELAX 
ARM_GNU_VTENTRY 
ARM_GNU_VTINHERIT 
ARM_THM_JUMP11 
ARM_THM_JUMP8 
ARM_TLS_GD32 
ARM_TLS_LDM32 
ARM_TLS_LDO32 
ARM_TLS_IE32 
ARM_TLS_LE32 
ARM_TLS_LDO12 
ARM_TLS_LE12 
ARM_TLS_IE12GP 
ARM_PRIVATE_0 
ARM_PRIVATE_1 
ARM_PRIVATE_2 
ARM_PRIVATE_3 
ARM_PRIVATE_4 
ARM_PRIVATE_5 
ARM_PRIVATE_6 
ARM_PRIVATE_7 
ARM_PRIVATE_8 
ARM_PRIVATE_9 
ARM_PRIVATE_10 
ARM_PRIVATE_11 
ARM_PRIVATE_12 
ARM_PRIVATE_13 
ARM_PRIVATE_14 
ARM_PRIVATE_15 
ARM_ME_TOO 
ARM_THM_TLS_DESCSEQ16 
ARM_THM_TLS_DESCSEQ32 
ARM_IRELATIVE 
ARM_RXPC25 
ARM_RSBREL32 
ARM_THM_RPC22 
ARM_RREL32 
ARM_RPC24 
ARM_RBASE 
HEX_NONE 
HEX_B22_PCREL 
HEX_B15_PCREL 
HEX_B7_PCREL 
HEX_LO16 
HEX_HI16 
HEX_32 
HEX_16 
HEX_8 
HEX_GPREL16_0 
HEX_GPREL16_1 
HEX_GPREL16_2 
HEX_GPREL16_3 
HEX_HL16 
HEX_B13_PCREL 
HEX_B9_PCREL 
HEX_B32_PCREL_X 
HEX_32_6_X 
HEX_B22_PCREL_X 
HEX_B15_PCREL_X 
HEX_B13_PCREL_X 
HEX_B9_PCREL_X 
HEX_B7_PCREL_X 
HEX_16_X 
HEX_12_X 
HEX_11_X 
HEX_10_X 
HEX_9_X 
HEX_8_X 
HEX_7_X 
HEX_6_X 
HEX_32_PCREL 
HEX_COPY 
HEX_GLOB_DAT 
HEX_JMP_SLOT 
HEX_RELATIVE 
HEX_PLT_B22_PCREL 
HEX_GOTREL_LO16 
HEX_GOTREL_HI16 
HEX_GOTREL_32 
HEX_GOT_LO16 
HEX_GOT_HI16 
HEX_GOT_32 
HEX_GOT_16 
HEX_DTPMOD_32 
HEX_DTPREL_LO16 
HEX_DTPREL_HI16 
HEX_DTPREL_32 
HEX_DTPREL_16 
HEX_GD_PLT_B22_PCREL 
HEX_GD_GOT_LO16 
HEX_GD_GOT_HI16 
HEX_GD_GOT_32 
HEX_GD_GOT_16 
HEX_IE_LO16 
HEX_IE_HI16 
HEX_IE_32 
HEX_IE_GOT_LO16 
HEX_IE_GOT_HI16 
HEX_IE_GOT_32 
HEX_IE_GOT_16 
HEX_TPREL_LO16 
HEX_TPREL_HI16 
HEX_TPREL_32 
HEX_TPREL_16 
HEX_6_PCREL_X 
HEX_GOTREL_32_6_X 
HEX_GOTREL_16_X 
HEX_GOTREL_11_X 
HEX_GOT_32_6_X 
HEX_GOT_16_X 
HEX_GOT_11_X 
HEX_DTPREL_32_6_X 
HEX_DTPREL_16_X 
HEX_DTPREL_11_X 
HEX_GD_GOT_32_6_X 
HEX_GD_GOT_16_X 
HEX_GD_GOT_11_X 
HEX_IE_32_6_X 
HEX_IE_16_X 
HEX_IE_GOT_32_6_X 
HEX_IE_GOT_16_X 
HEX_IE_GOT_11_X 
HEX_TPREL_32_6_X 
HEX_TPREL_16_X 
HEX_TPREL_11_X 
HEX_LD_PLT_B22_PCREL 
HEX_LD_GOT_LO16 
HEX_LD_GOT_HI16 
HEX_LD_GOT_32 
HEX_LD_GOT_16 
HEX_LD_GOT_32_6_X 
HEX_LD_GOT_16_X 
HEX_LD_GOT_11_X 
X86_NONE 
X86_32 
X86_PC32 
X86_GOT32 
X86_PLT32 
X86_COPY 
X86_GLOB_DAT 
X86_JUMP_SLOT 
X86_RELATIVE 
X86_GOTOFF 
X86_GOTPC 
X86_32PLT 
X86_TLS_TPOFF 
X86_TLS_IE 
X86_TLS_GOTIE 
X86_TLS_LE 
X86_TLS_GD 
X86_TLS_LDM 
X86_16 
X86_PC16 
X86_8 
X86_PC8 
X86_TLS_GD_32 
X86_TLS_GD_PUSH 
X86_TLS_GD_CALL 
X86_TLS_GD_POP 
X86_TLS_LDM_32 
X86_TLS_LDM_PUSH 
X86_TLS_LDM_CALL 
X86_TLS_LDM_POP 
X86_TLS_LDO_32 
X86_TLS_IE_32 
X86_TLS_LE_32 
X86_TLS_DTPMOD32 
X86_TLS_DTPOFF32 
X86_TLS_TPOFF32 
X86_TLS_GOTDESC 
X86_TLS_DESC_CALL 
X86_TLS_DESC 
X86_IRELATIVE 
LARCH_NONE 
LARCH_32 
LARCH_64 
LARCH_RELATIVE 
LARCH_COPY 
LARCH_JUMP_SLOT 
LARCH_TLS_DTPMOD32 
LARCH_TLS_DTPMOD64 
LARCH_TLS_DTPREL32 
LARCH_TLS_DTPREL64 
LARCH_TLS_TPREL32 
LARCH_TLS_TPREL64 
LARCH_IRELATIVE 
LARCH_MARK_LA 
LARCH_MARK_PCREL 
LARCH_SOP_PUSH_PCREL 
LARCH_SOP_PUSH_ABSOLUTE 
LARCH_SOP_PUSH_DUP 
LARCH_SOP_PUSH_GPREL 
LARCH_SOP_PUSH_TLS_TPREL 
LARCH_SOP_PUSH_TLS_GOT 
LARCH_SOP_PUSH_TLS_GD 
LARCH_SOP_PUSH_PLT_PCREL 
LARCH_SOP_ASSERT 
LARCH_SOP_NOT 
LARCH_SOP_SUB 
LARCH_SOP_SL 
LARCH_SOP_SR 
LARCH_SOP_ADD 
LARCH_SOP_AND 
LARCH_SOP_IF_ELSE 
LARCH_SOP_POP_32_S_10_5 
LARCH_SOP_POP_32_U_10_12 
LARCH_SOP_POP_32_S_10_12 
LARCH_SOP_POP_32_S_10_16 
LARCH_SOP_POP_32_S_10_16_S2 
LARCH_SOP_POP_32_S_5_20 
LARCH_SOP_POP_32_S_0_5_10_16_S2 
LARCH_SOP_POP_32_S_0_10_10_16_S2 
LARCH_SOP_POP_32_U 
LARCH_ADD8 
LARCH_ADD16 
LARCH_ADD24 
LARCH_ADD32 
LARCH_ADD64 
LARCH_SUB8 
LARCH_SUB16 
LARCH_SUB24 
LARCH_SUB32 
LARCH_SUB64 
LARCH_GNU_VTINHERIT 
LARCH_GNU_VTENTRY 
LARCH_B16 
LARCH_B21 
LARCH_B26 
LARCH_ABS_HI20 
LARCH_ABS_LO12 
LARCH_ABS64_LO20 
LARCH_ABS64_HI12 
LARCH_PCALA_HI20 
LARCH_PCALA_LO12 
LARCH_PCALA64_LO20 
LARCH_PCALA64_HI12 
LARCH_GOT_PC_HI20 
LARCH_GOT_PC_LO12 
LARCH_GOT64_PC_LO20 
LARCH_GOT64_PC_HI12 
LARCH_GOT_HI20 
LARCH_GOT_LO12 
LARCH_GOT64_LO20 
LARCH_GOT64_HI12 
LARCH_TLS_LE_HI20 
LARCH_TLS_LE_LO12 
LARCH_TLS_LE64_LO20 
LARCH_TLS_LE64_HI12 
LARCH_TLS_IE_PC_HI20 
LARCH_TLS_IE_PC_LO12 
LARCH_TLS_IE64_PC_LO20 
LARCH_TLS_IE64_PC_HI12 
LARCH_TLS_IE_HI20 
LARCH_TLS_IE_LO12 
LARCH_TLS_IE64_LO20 
LARCH_TLS_IE64_HI12 
LARCH_TLS_LD_PC_HI20 
LARCH_TLS_LD_HI20 
LARCH_TLS_GD_PC_HI20 
LARCH_TLS_GD_HI20 
LARCH_32_PCREL 
LARCH_RELAX 
LARCH_ALIGN 
LARCH_PCREL20_S2 
LARCH_ADD6 
LARCH_SUB6 
LARCH_ADD_ULEB128 
LARCH_SUB_ULEB128 
LARCH_64_PCREL 
LARCH_CALL36 
LARCH_TLS_DESC32 
LARCH_TLS_DESC64 
LARCH_TLS_DESC_PC_HI20 
LARCH_TLS_DESC_PC_LO12 
LARCH_TLS_DESC64_PC_LO20 
LARCH_TLS_DESC64_PC_HI12 
LARCH_TLS_DESC_HI20 
LARCH_TLS_DESC_LO12 
LARCH_TLS_DESC64_LO20 
LARCH_TLS_DESC64_HI12 
LARCH_TLS_DESC_LD 
LARCH_TLS_DESC_CALL 
LARCH_TLS_LE_HI20_R 
LARCH_TLS_LE_ADD_R 
LARCH_TLS_LE_LO12_R 
LARCH_TLS_LD_PCREL20_S2 
LARCH_TLS_GD_PCREL20_S2 
LARCH_TLS_DESC_PCREL20_S2 
MIPS_NONE 
MIPS_16 
MIPS_32 
MIPS_REL32 
MIPS_26 
MIPS_HI16 
MIPS_LO16 
MIPS_GPREL16 
MIPS_LITERAL 
MIPS_GOT16 
MIPS_PC16 
MIPS_CALL16 
MIPS_GPREL32 
MIPS_UNUSED1 
MIPS_UNUSED2 
MIPS_UNUSED3 
MIPS_SHIFT5 
MIPS_SHIFT6 
MIPS_64 
MIPS_GOT_DISP 
MIPS_GOT_PAGE 
MIPS_GOT_OFST 
MIPS_GOT_HI16 
MIPS_GOT_LO16 
MIPS_SUB 
MIPS_INSERT_A 
MIPS_INSERT_B 
MIPS_DELETE 
MIPS_HIGHER 
MIPS_HIGHEST 
MIPS_CALL_HI16 
MIPS_CALL_LO16 
MIPS_SCN_DISP 
MIPS_REL16 
MIPS_ADD_IMMEDIATE 
MIPS_PJUMP 
MIPS_RELGOT 
MIPS_JALR 
MIPS_TLS_DTPMOD32 
MIPS_TLS_DTPREL32 
MIPS_TLS_DTPMOD64 
MIPS_TLS_DTPREL64 
MIPS_TLS_GD 
MIPS_TLS_LDM 
MIPS_TLS_DTPREL_HI16 
MIPS_TLS_DTPREL_LO16 
MIPS_TLS_GOTTPREL 
MIPS_TLS_TPREL32 
MIPS_TLS_TPREL64 
MIPS_TLS_TPREL_HI16 
MIPS_TLS_TPREL_LO16 
MIPS_GLOB_DAT 
MIPS_PC21_S2 
MIPS_PC26_S2 
MIPS_PC18_S3 
MIPS_PC19_S2 
MIPS_PCHI16 
MIPS_PCLO16 
MIPS16_26 
MIPS16_GPREL 
MIPS16_GOT16 
MIPS16_CALL16 
MIPS16_HI16 
MIPS16_LO16 
MIPS16_TLS_GD 
MIPS16_TLS_LDM 
MIPS16_TLS_DTPREL_HI16 
MIPS16_TLS_DTPREL_LO16 
MIPS16_TLS_GOTTPREL 
MIPS16_TLS_TPREL_HI16 
MIPS16_TLS_TPREL_LO16 
MIPS_COPY 
MIPS_JUMP_SLOT 
MICROMIPS_26_S1 
MICROMIPS_HI16 
MICROMIPS_LO16 
MICROMIPS_GPREL16 
MICROMIPS_LITERAL 
MICROMIPS_GOT16 
MICROMIPS_PC7_S1 
MICROMIPS_PC10_S1 
MICROMIPS_PC16_S1 
MICROMIPS_CALL16 
MICROMIPS_GOT_DISP 
MICROMIPS_GOT_PAGE 
MICROMIPS_GOT_OFST 
MICROMIPS_GOT_HI16 
MICROMIPS_GOT_LO16 
MICROMIPS_SUB 
MICROMIPS_HIGHER 
MICROMIPS_HIGHEST 
MICROMIPS_CALL_HI16 
MICROMIPS_CALL_LO16 
MICROMIPS_SCN_DISP 
MICROMIPS_JALR 
MICROMIPS_HI0_LO16 
MICROMIPS_TLS_GD 
MICROMIPS_TLS_LDM 
MICROMIPS_TLS_DTPREL_HI16 
MICROMIPS_TLS_DTPREL_LO16 
MICROMIPS_TLS_GOTTPREL 
MICROMIPS_TLS_TPREL_HI16 
MICROMIPS_TLS_TPREL_LO16 
MICROMIPS_GPREL7_S2 
MICROMIPS_PC23_S2 
MICROMIPS_PC21_S2 
MICROMIPS_PC26_S2 
MICROMIPS_PC18_S3 
MICROMIPS_PC19_S2 
MIPS_NUM 
MIPS_PC32 
MIPS_EH 
PPC_NONE 
PPC_ADDR32 
PPC_ADDR24 
PPC_ADDR16 
PPC_ADDR16_LO 
PPC_ADDR16_HI 
PPC_ADDR16_HA 
PPC_ADDR14 
PPC_ADDR14_BRTAKEN 
PPC_ADDR14_BRNTAKEN 
PPC_REL24 
PPC_REL14 
PPC_REL14_BRTAKEN 
PPC_REL14_BRNTAKEN 
PPC_GOT16 
PPC_GOT16_LO 
PPC_GOT16_HI 
PPC_GOT16_HA 
PPC_PLTREL24 
PPC_JMP_SLOT 
PPC_RELATIVE 
PPC_LOCAL24PC 
PPC_REL32 
PPC_TLS 
PPC_DTPMOD32 
PPC_TPREL16 
PPC_TPREL16_LO 
PPC_TPREL16_HI 
PPC_TPREL16_HA 
PPC_TPREL32 
PPC_DTPREL16 
PPC_DTPREL16_LO 
PPC_DTPREL16_HI 
PPC_DTPREL16_HA 
PPC_DTPREL32 
PPC_GOT_TLSGD16 
PPC_GOT_TLSGD16_LO 
PPC_GOT_TLSGD16_HI 
PPC_GOT_TLSGD16_HA 
PPC_GOT_TLSLD16 
PPC_GOT_TLSLD16_LO 
PPC_GOT_TLSLD16_HI 
PPC_GOT_TLSLD16_HA 
PPC_GOT_TPREL16 
PPC_GOT_TPREL16_LO 
PPC_GOT_TPREL16_HI 
PPC_GOT_TPREL16_HA 
PPC_GOT_DTPREL16 
PPC_GOT_DTPREL16_LO 
PPC_GOT_DTPREL16_HI 
PPC_GOT_DTPREL16_HA 
PPC_TLSGD 
PPC_TLSLD 
PPC_REL16 
PPC_REL16_LO 
PPC_REL16_HI 
PPC_REL16_HA 
PPC64_NONE 
PPC64_ADDR32 
PPC64_ADDR24 
PPC64_ADDR16 
PPC64_ADDR16_LO 
PPC64_ADDR16_HI 
PPC64_ADDR16_HA 
PPC64_ADDR14 
PPC64_ADDR14_BRTAKEN 
PPC64_ADDR14_BRNTAKEN 
PPC64_REL24 
PPC64_REL14 
PPC64_REL14_BRTAKEN 
PPC64_REL14_BRNTAKEN 
PPC64_GOT16 
PPC64_GOT16_LO 
PPC64_GOT16_HI 
PPC64_GOT16_HA 
PPC64_JMP_SLOT 
PPC64_RELATIVE 
PPC64_REL32 
PPC64_ADDR64 
PPC64_ADDR16_HIGHER 
PPC64_ADDR16_HIGHERA 
PPC64_ADDR16_HIGHEST 
PPC64_ADDR16_HIGHESTA 
PPC64_REL64 
PPC64_TOC16 
PPC64_TOC16_LO 
PPC64_TOC16_HI 
PPC64_TOC16_HA 
PPC64_TOC 
PPC64_ADDR16_DS 
PPC64_ADDR16_LO_DS 
PPC64_GOT16_DS 
PPC64_GOT16_LO_DS 
PPC64_TOC16_DS 
PPC64_TOC16_LO_DS 
PPC64_TLS 
PPC64_DTPMOD64 
PPC64_TPREL16 
PPC64_TPREL16_LO 
PPC64_TPREL16_HI 
PPC64_TPREL16_HA 
PPC64_TPREL64 
PPC64_DTPREL16 
PPC64_DTPREL16_LO 
PPC64_DTPREL16_HI 
PPC64_DTPREL16_HA 
PPC64_DTPREL64 
PPC64_GOT_TLSGD16 
PPC64_GOT_TLSGD16_LO 
PPC64_GOT_TLSGD16_HI 
PPC64_GOT_TLSGD16_HA 
PPC64_GOT_TLSLD16 
PPC64_GOT_TLSLD16_LO 
PPC64_GOT_TLSLD16_HI 
PPC64_GOT_TLSLD16_HA 
PPC64_GOT_TPREL16_DS 
PPC64_GOT_TPREL16_LO_DS 
PPC64_GOT_TPREL16_HI 
PPC64_GOT_TPREL16_HA 
PPC64_GOT_DTPREL16_DS 
PPC64_GOT_DTPREL16_LO_DS 
PPC64_GOT_DTPREL16_HI 
PPC64_GOT_DTPREL16_HA 
PPC64_TPREL16_DS 
PPC64_TPREL16_LO_DS 
PPC64_TPREL16_HIGHER 
PPC64_TPREL16_HIGHERA 
PPC64_TPREL16_HIGHEST 
PPC64_TPREL16_HIGHESTA 
PPC64_DTPREL16_DS 
PPC64_DTPREL16_LO_DS 
PPC64_DTPREL16_HIGHER 
PPC64_DTPREL16_HIGHERA 
PPC64_DTPREL16_HIGHEST 
PPC64_DTPREL16_HIGHESTA 
PPC64_TLSGD 
PPC64_TLSLD 
PPC64_REL16 
PPC64_REL16_LO 
PPC64_REL16_HI 
PPC64_REL16_HA 
SPARC_NONE 
SPARC_8 
SPARC_16 
SPARC_32 
SPARC_DISP8 
SPARC_DISP16 
SPARC_DISP32 
SPARC_WDISP30 
SPARC_WDISP22 
SPARC_HI22 
SPARC_22 
SPARC_13 
SPARC_LO10 
SPARC_GOT10 
SPARC_GOT13 
SPARC_GOT22 
SPARC_PC10 
SPARC_PC22 
SPARC_WPLT30 
SPARC_COPY 
SPARC_GLOB_DAT 
SPARC_JMP_SLOT 
SPARC_RELATIVE 
SPARC_UA32 
SPARC_PLT32 
SPARC_HIPLT22 
SPARC_LOPLT10 
SPARC_PCPLT32 
SPARC_PCPLT22 
SPARC_PCPLT10 
SPARC_10 
SPARC_11 
SPARC_64 
SPARC_OLO10 
SPARC_HH22 
SPARC_HM10 
SPARC_LM22 
SPARC_PC_HH22 
SPARC_PC_HM10 
SPARC_PC_LM22 
SPARC_WDISP16 
SPARC_WDISP19 
SPARC_7 
SPARC_5 
SPARC_6 
SPARC_DISP64 
SPARC_PLT64 
SPARC_HIX22 
SPARC_LOX10 
SPARC_H44 
SPARC_M44 
SPARC_L44 
SPARC_REGISTER 
SPARC_UA64 
SPARC_UA16 
SPARC_TLS_GD_HI22 
SPARC_TLS_GD_LO10 
SPARC_TLS_GD_ADD 
SPARC_TLS_GD_CALL 
SPARC_TLS_LDM_HI22 
SPARC_TLS_LDM_LO10 
SPARC_TLS_LDM_ADD 
SPARC_TLS_LDM_CALL 
SPARC_TLS_LDO_HIX22 
SPARC_TLS_LDO_LOX10 
SPARC_TLS_LDO_ADD 
SPARC_TLS_IE_HI22 
SPARC_TLS_IE_LO10 
SPARC_TLS_IE_LD 
SPARC_TLS_IE_LDX 
SPARC_TLS_IE_ADD 
SPARC_TLS_LE_HIX22 
SPARC_TLS_LE_LOX10 
SPARC_TLS_DTPMOD32 
SPARC_TLS_DTPMOD64 
SPARC_TLS_DTPOFF32 
SPARC_TLS_DTPOFF64 
SPARC_TLS_TPOFF32 
SPARC_TLS_TPOFF64 
SPARC_GOTDATA_HIX22 
SPARC_GOTDATA_LOX10 
SPARC_GOTDATA_OP_HIX22 
SPARC_GOTDATA_OP_LOX10 
SPARC_GOTDATA_OP 
SYSZ_NONE 
SYSZ_8 
SYSZ_12 
SYSZ_16 
SYSZ_32 
SYSZ_PC32 
SYSZ_GOT12 
SYSZ_GOT32 
SYSZ_PLT32 
SYSZ_COPY 
SYSZ_GLOB_DAT 
SYSZ_JMP_SLOT 
SYSZ_RELATIVE 
SYSZ_GOTOFF 
SYSZ_GOTPC 
SYSZ_GOT16 
SYSZ_PC16 
SYSZ_PC16DBL 
SYSZ_PLT16DBL 
SYSZ_PC32DBL 
SYSZ_PLT32DBL 
SYSZ_GOTPCDBL 
SYSZ_64 
SYSZ_PC64 
SYSZ_GOT64 
SYSZ_PLT64 
SYSZ_GOTENT 
SYSZ_GOTOFF16 
SYSZ_GOTOFF64 
SYSZ_GOTPLT12 
SYSZ_GOTPLT16 
SYSZ_GOTPLT32 
SYSZ_GOTPLT64 
SYSZ_GOTPLTENT 
SYSZ_PLTOFF16 
SYSZ_PLTOFF32 
SYSZ_PLTOFF64 
SYSZ_TLS_LOAD 
SYSZ_TLS_GDCALL 
SYSZ_TLS_LDCALL 
SYSZ_TLS_GD32 
SYSZ_TLS_GD64 
SYSZ_TLS_GOTIE12 
SYSZ_TLS_GOTIE32 
SYSZ_TLS_GOTIE64 
SYSZ_TLS_LDM32 
SYSZ_TLS_LDM64 
SYSZ_TLS_IE32 
SYSZ_TLS_IE64 
SYSZ_TLS_IEENT 
SYSZ_TLS_LE32 
SYSZ_TLS_LE64 
SYSZ_TLS_LDO32 
SYSZ_TLS_LDO64 
SYSZ_TLS_DTPMOD 
SYSZ_TLS_DTPOFF 
SYSZ_TLS_TPOFF 
SYSZ_20 
SYSZ_GOT20 
SYSZ_GOTPLT20 
SYSZ_TLS_GOTIE20 
SYSZ_IRELATIVE 
RISCV_NONE 
RISCV_32 
RISCV_64 
RISCV_RELATIVE 
RISCV_COPY 
RISCV_JUMP_SLOT 
RISCV_TLS_DTPMOD32 
RISCV_TLS_DTPMOD64 
RISCV_TLS_DTPREL32 
RISCV_TLS_DTPREL64 
RISCV_TLS_TPREL32 
RISCV_TLS_TPREL64 
RISCV_TLSDESC 
RISCV_BRANCH 
RISCV_JAL 
RISCV_CALL 
RISCV_CALL_PLT 
RISCV_GOT_HI20 
RISCV_TLS_GOT_HI20 
RISCV_TLS_GD_HI20 
RISCV_PCREL_HI20 
RISCV_PCREL_LO12_I 
RISCV_PCREL_LO12_S 
RISCV_HI20 
RISCV_LO12_I 
RISCV_LO12_S 
RISCV_TPREL_HI20 
RISCV_TPREL_LO12_I 
RISCV_TPREL_LO12_S 
RISCV_TPREL_ADD 
RISCV_ADD8 
RISCV_ADD16 
RISCV_ADD32 
RISCV_ADD64 
RISCV_SUB8 
RISCV_SUB16 
RISCV_SUB32 
RISCV_SUB64 
RISCV_GOT32_PCREL 
RISCV_ALIGN 
RISCV_RVC_BRANCH 
RISCV_RVC_JUMP 
RISCV_RVC_LUI 
RISCV_RELAX 
RISCV_SUB6 
RISCV_SET6 
RISCV_SET8 
RISCV_SET16 
RISCV_SET32 
RISCV_32_PCREL 
RISCV_IRELATIVE 
RISCV_PLT32 
RISCV_SET_ULEB128 
RISCV_SUB_ULEB128 
RISCV_TLSDESC_HI20 
RISCV_TLSDESC_LOAD_LO12 
RISCV_TLSDESC_ADD_LO12 
RISCV_TLSDESC_CALL 
BPF_NONE 
BPF_64_64 
BPF_64_ABS64 
BPF_64_ABS32 
BPF_64_NODYLD32 
BPF_64_32 

Constructor & Destructor Documentation

◆ Relocation() [1/4]

LIEF::ELF::Relocation::Relocation ( uint64_t address,
TYPE type,
ENCODING enc )

◆ Relocation() [2/4]

LIEF::ELF::Relocation::Relocation ( )
default

◆ Relocation() [3/4]

LIEF::ELF::Relocation::Relocation ( ARCH arch)
inline

◆ ~Relocation()

LIEF::ELF::Relocation::~Relocation ( )
overridedefault

◆ Relocation() [4/4]

LIEF::ELF::Relocation::Relocation ( const Relocation & other)
inline

Copy constructor.

Warning
When this constructor is invoked, referenced sections or symbols are discarded. This means that on the copied Relocation, Relocation::section, Relocation::symbol and Relocation::symbol_table are set to a nullptr.

Member Function Documentation

◆ accept()

void LIEF::ELF::Relocation::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.

◆ addend() [1/2]

int64_t LIEF::ELF::Relocation::addend ( ) const
inline

Additional value that can be involved in the relocation processing.

◆ addend() [2/2]

void LIEF::ELF::Relocation::addend ( int64_t addend)
inline

◆ architecture()

ARCH LIEF::ELF::Relocation::architecture ( ) const
inline

Target architecture for this relocation.

◆ encoding()

ENCODING LIEF::ELF::Relocation::encoding ( ) const
inline

The encoding of the relocation.

◆ has_section()

bool LIEF::ELF::Relocation::has_section ( ) const
inline

True if the relocation has an associated section.

◆ has_symbol()

bool LIEF::ELF::Relocation::has_symbol ( ) const
inline

True if the current relocation is associated with a symbol.

◆ info() [1/2]

uint32_t LIEF::ELF::Relocation::info ( ) const
inline

Relocation info which contains, for instance, the symbol index.

◆ info() [2/2]

void LIEF::ELF::Relocation::info ( uint32_t v)
inline

◆ is_android_packed()

bool LIEF::ELF::Relocation::is_android_packed ( ) const
inline

True if the relocation is using the Android packed relocation format.

◆ is_rel()

bool LIEF::ELF::Relocation::is_rel ( ) const
inline

Check if the relocation uses the implicit addend (i.e. not present in the ELF structure)

◆ is_rela()

bool LIEF::ELF::Relocation::is_rela ( ) const
inline

Check if the relocation uses the explicit addend() field (this is usually the case for 64 bits binaries)

◆ is_relative()

bool LIEF::ELF::Relocation::is_relative ( ) const
inline

True if the semantic of the relocation is <ARCH>_RELATIVE

◆ is_relatively_encoded()

bool LIEF::ELF::Relocation::is_relatively_encoded ( ) const
inline

True if the relocation is using the relative encoding.

◆ operator=()

Relocation & LIEF::ELF::Relocation::operator= ( Relocation other)
inline

Copy assignment operator.

Please read the notice of the copy constructor

◆ purpose() [1/2]

PURPOSE LIEF::ELF::Relocation::purpose ( ) const
inline

◆ purpose() [2/2]

void LIEF::ELF::Relocation::purpose ( PURPOSE purpose)
inline

◆ r_info()

uint64_t LIEF::ELF::Relocation::r_info ( Header::CLASS clazz) const
inline

(re)Compute the raw r_info attribute based on the given ELF class

◆ resolve()

result< uint64_t > LIEF::ELF::Relocation::resolve ( uint64_t base_address = 0) const

Try to resolve the value of the relocation such as *address() = resolve()

◆ section() [1/3]

Section * LIEF::ELF::Relocation::section ( )
inline

The section in which the relocation is applied (or a nullptr)

◆ section() [2/3]

const Section * LIEF::ELF::Relocation::section ( ) const
inline

◆ section() [3/3]

void LIEF::ELF::Relocation::section ( Section * section)
inline

◆ size()

size_t LIEF::ELF::Relocation::size ( ) const
overridevirtual

Return the size (in bits) of the value associated with this relocation Return -1 if the size can't be determined.

Reimplemented from LIEF::Relocation.

◆ swap()

void LIEF::ELF::Relocation::swap ( Relocation & other)
inline

◆ symbol() [1/3]

Symbol * LIEF::ELF::Relocation::symbol ( )
inline

Symbol associated with the relocation (or a nullptr)

◆ symbol() [2/3]

const Symbol * LIEF::ELF::Relocation::symbol ( ) const
inline

◆ symbol() [3/3]

void LIEF::ELF::Relocation::symbol ( Symbol * symbol)
inline

◆ symbol_table() [1/3]

Section * LIEF::ELF::Relocation::symbol_table ( )
inline

The associated symbol table (or a nullptr)

◆ symbol_table() [2/3]

const Section * LIEF::ELF::Relocation::symbol_table ( ) const
inline

◆ symbol_table() [3/3]

void LIEF::ELF::Relocation::symbol_table ( Section * section)
inline

◆ to_value()

static uint32_t LIEF::ELF::Relocation::to_value ( TYPE type)
inlinestatic

◆ type() [1/2]

TYPE LIEF::ELF::Relocation::type ( ) const
inline

Type of the relocation.

◆ type() [2/2]

void LIEF::ELF::Relocation::type ( TYPE type)
inline

◆ type_from()

static TYPE LIEF::ELF::Relocation::type_from ( uint32_t value,
ARCH arch )
static

Member Data Documentation

◆ R_AARCH64

uint64_t LIEF::ELF::Relocation::R_AARCH64 = uint64_t(2) << R_BIT
staticconstexpr

◆ R_ARM

uint64_t LIEF::ELF::Relocation::R_ARM = uint64_t(3) << R_BIT
staticconstexpr

◆ R_BIT

uint64_t LIEF::ELF::Relocation::R_BIT = 27
staticconstexpr

◆ R_BPF

uint64_t LIEF::ELF::Relocation::R_BPF = uint64_t(13) << R_BIT
staticconstexpr

◆ R_HEXAGON

uint64_t LIEF::ELF::Relocation::R_HEXAGON = uint64_t(4) << R_BIT
staticconstexpr

◆ R_LARCH

uint64_t LIEF::ELF::Relocation::R_LARCH = uint64_t(6) << R_BIT
staticconstexpr

◆ R_MASK

uint64_t LIEF::ELF::Relocation::R_MASK = (uint64_t(1) << R_BIT) - 1
staticconstexpr

◆ R_MIPS

uint64_t LIEF::ELF::Relocation::R_MIPS = uint64_t(7) << R_BIT
staticconstexpr

◆ R_PPC

uint64_t LIEF::ELF::Relocation::R_PPC = uint64_t(8) << R_BIT
staticconstexpr

◆ R_PPC64

uint64_t LIEF::ELF::Relocation::R_PPC64 = uint64_t(9) << R_BIT
staticconstexpr

◆ R_RISCV

uint64_t LIEF::ELF::Relocation::R_RISCV = uint64_t(12) << R_BIT
staticconstexpr

◆ R_SPARC

uint64_t LIEF::ELF::Relocation::R_SPARC = uint64_t(10) << R_BIT
staticconstexpr

◆ R_SYSZ

uint64_t LIEF::ELF::Relocation::R_SYSZ = uint64_t(11) << R_BIT
staticconstexpr

◆ R_X64

uint64_t LIEF::ELF::Relocation::R_X64 = uint64_t(1) << R_BIT
staticconstexpr

◆ R_X86

uint64_t LIEF::ELF::Relocation::R_X86 = uint64_t(5) << R_BIT
staticconstexpr

The documentation for this class was generated from the following file: