558#define ELF64_ST_BIND(i) ((i) >> 4)
581#define ELF64_ST_TYPE(i) ((i) & 0xf)
609#define ELF64_ST_INFO(b, t) (((b) << 4) + ((t) & 0xf))
640#define ELF64_R_SYM(i) ((i) >> 32)
650#define ELF64_R_TYPE(i) ((i) & 0xffffffffL)
717#define ELF64_R_INFO(s, t) (((s) << 32) + ((t) & 0xffffffffL))
795#define ELF64_GET_PHDR(elf, index) \
796 ((Elf64_Phdr*)((uint8_t*)(elf)->header + (elf)->header->e_phoff + ((index) * (elf)->header->e_phentsize)))
805#define ELF64_GET_SHDR(elf, index) \
806 ((Elf64_Shdr*)((uint8_t*)(elf)->header + (elf)->header->e_shoff + ((index) * (elf)->header->e_shentsize)))
814#define ELF64_AT_OFFSET(elf, offset) ((void*)((uint8_t*)(elf)->header + (offset)))
899 void* (*resolve_symbol)(
const char* name,
void*
private),
void*
private);
const char * elf64_get_string(const Elf64_File *elf, Elf64_Xword strTabIndex, Elf64_Off offset)
Get a string from the string table section at the given offset.
Elf64_Magic
Expected magic values in e_ident[EI_MAG0] to e_ident[EI_MAG3].
Elf64_Shn_Indexes
Special section indexes.
uint64_t Elf64_Sxword
ELF64 Signed long integer.
Elf64_Sym * elf64_get_dynamic_symbol_by_index(const Elf64_File *elf, Elf64_Xword symbolIndex)
Get a dynamic symbol by its index from the dynamic symbol table.
Elf64_Class
File class values for e_ident[EI_CLASS].
Elf64_Data
Data encoding values for e_ident[EI_DATA].
Elf64_Version
Version values for e_ident[EI_VERSION] and e_version.
int32_t Elf64_Sword
ELF64 Signed integer.
Elf64_Section_Flags
Section flag values for sh_flags.
Elf64_Sym * elf64_get_symbol_by_name(const Elf64_File *elf, const char *name)
Get a symbol by its name from the symbol table.
uint64_t Elf64_Xword
ELF64 Unsigned long integer.
const char * elf64_get_section_name(const Elf64_File *elf, const Elf64_Shdr *section)
Get the name of a section.
Elf64_Symbol_Binding
Symbol binding values stored in st_info.
uint64_t elf64_relocate(const Elf64_File *elf, Elf64_Addr base, Elf64_Off offset, void *(*resolve_symbol)(const char *name, void *private), void *private)
Perform relocations on an ELF file loaded into memory.
void elf64_load_segments(const Elf64_File *elf, Elf64_Addr base, Elf64_Off offset)
Load all loadable segments of an ELF file into memory.
uint64_t elf64_validate(Elf64_File *elf, void *data, uint64_t size)
Validate a files content and initalize a ELF64_File structure using it.
uint64_t Elf64_Off
ELF64 Unsigned file offset.
Elf64_Ident_Indexes
Indices for e_ident[].
const char * elf64_get_dynamic_symbol_name(const Elf64_File *elf, const Elf64_Sym *symbol)
Get the name of a dynamic symbol.
Elf64_Program_Types
Segment type values for p_type.
Elf64_Machine
Machine architecture values for e_machine.
Elf64_Sym * elf64_get_symbol_by_index(const Elf64_File *elf, Elf64_Xword symbolIndex)
Get a symbol by its index from the symbol table.
Elf64_Relocation_Types_x86_64
Relocation type values for r_info.
uint32_t Elf64_Word
ELF64 Unsigned integer.
const char * elf64_get_symbol_name(const Elf64_File *elf, const Elf64_Sym *symbol)
Get the name of a symbol.
Elf64_OsAbi
OS/ABI identification values for e_ident[EI_OSABI].
void elf64_get_loadable_bounds(const Elf64_File *elf, Elf64_Addr *minAddr, Elf64_Addr *maxAddr)
Get the loadable virtual memory bounds of an ELF file.
Elf64_Section_Types
Section type values for sh_type.
uint16_t Elf64_Half
ELF64 Unsigned medium integer.
Elf64_Program_Flags
Segment flag values for p_flags.
uint64_t Elf64_Addr
ELF64 Unsigned program address.
Elf64_Type
Object file type values for e_type.
Elf64_Shdr * elf64_get_section_by_name(const Elf64_File *elf, const char *name)
Get a section by its name.
Elf64_Symbol_Type
Symbol type values stored in st_info.
@ ELFMAG1
Expected value for e_ident[EI_MAG1]
@ ELFMAG0
Expected value for e_ident[EI_MAG0]
@ ELFMAG3
Expected value for e_ident[EI_MAG3]
@ ELFMAG2
Expected value for e_ident[EI_MAG2]
@ SHN_XINDEX
Indicates that the actual index is too large to fit and is stored elsewhere.
@ SHN_LOOS
Start of OS-specific indexes.
@ SHN_COMMON
Symbols defined relative to this section are common symbols.
@ SHN_UNDEF
Undefined section.
@ SHN_HIPROC
End of processor-specific indexes.
@ SHN_LOPROC
Start of processor-specific indexes.
@ SHN_HIOS
End of OS-specific indexes.
@ SHN_ABS
Specifies absolute values for the corresponding reference.
@ SHN_LORESERVE
Start of reserved indexes.
@ SHN_HIRESERVE
End of reserved indexes.
@ ELFCLASS64
64-bit objects, we always expect this value
@ ELFCLASS32
32-bit objects
@ ELFCLASSNONE
Invalid class.
@ ELFDATAMSB
Big-endian encoding.
@ ELFDATALSB
Little-endian encoding, we always expect this value.
@ ELFDATANONE
Invalid data encoding.
@ EV_CURRENT
Current version, we always expect this value.
@ EV_NONE
Invalid version.
@ SHF_MERGE
Section may be merged to eliminate duplication.
@ SHF_INFO_LINK
sh_info contains a section header table index
@ SHF_STRINGS
Section contains null-terminated strings, sh_entsize contains the char size.
@ SHF_ALLOC
Section should be loaded to memory.
@ SHF_MASKPROC
All bits in this mask are reserved for processor-specific semantics.
@ SHF_COMPRESSED
Section holds compressed data.
@ SHF_GROUP
Is part of a section group.
@ SHF_EXECINSTR
Section should be executable when loaded to memory.
@ SHF_OS_NONCONFORMING
Section requires special OS-specific processing.
@ SHF_LINK_ORDER
Preserve section ordering when linking.
@ SHF_TLS
Section holds thread-local storage.
@ SHF_WRITE
Section should be writable when loaded to memory.
@ SHF_MASKOS
All bits in this mask are reserved for OS-specific semantics.
@ STB_LOOS
Start of OS-specific symbol bindings.
@ STB_GLOBAL
Global symbol, visible to all object files being combined.
@ STB_LOPROC
Start of processor-specific symbol bindings.
@ STB_LOCAL
Local symbol, not visible outside the object file.
@ STB_WEAK
Weak symbol, like global but with lower precedence.
@ STB_HIPROC
End of processor-specific symbol bindings.
@ STB_HIOS
End of OS-specific symbol bindings.
@ EI_ABIVERSION
Index of the ABI version byte.
@ EI_MAG1
Index of magic number byte 1.
@ EI_DATA
Index of the data encoding byte.
@ EI_MAG0
Index of magic number byte 0.
@ EI_PAD
Index of the start of padding bytes.
@ EI_MAG3
Index of magic number byte 3.
@ EI_CLASS
Index of the file class byte.
@ EI_OSABI
Index of the OS/ABI identification byte.
@ EI_NIDENT
Total size of e_ident.
@ EI_VERSION
Index of the file version byte.
@ EI_MAG2
Index of magic number byte 2.
@ PT_LOPROC
Start of processor-specific segment types.
@ PT_HIOS
End of OS-specific segment types.
@ PT_SHLIB
Reserved, has unspecified semantics.
@ PT_PHDR
Location and size of program header table.
@ PT_TLS
Thread-local storage template.
@ PT_HIPROC
End of processor-specific segment types.
@ PT_LOOS
Start of OS-specific segment types.
@ PT_DYNAMIC
Dynamic linking information.
@ PT_NOTE
Auxiliary information.
@ PT_INTERP
Program interpreter path name.
@ PT_LOAD
Loadable segment.
@ EM_TI_C2000
The Texas Instruments TMS320C2000 DSP family.
@ EM_H8_300
Hitachi H8/300.
@ EM_TRICORE
Siemens TriCore embedded processor.
@ EM_VIDEOCORE
Alphamosaic VideoCore processor.
@ EM_SCORE7
Sunplus S+core7 RISC processor.
@ EM_C166
Infineon C16x/XC16x processor.
@ EM_MCHP_PIC
Microchip 8-bit PIC(r) family.
@ EM_CSKY
C-SKY processor family.
@ EM_STARCORE
Motorola Star*Core processor.
@ EM_56800EF
NXP 56800EF Digital Signal Controller (DSC)
@ EM_CE
Freescale Communication Engine RISC core.
@ EM_RL78
Renesas RL78 family.
@ EM_SVX
Silicon Graphics SVx.
@ EM_IA_64
Intel IA-64 processor architecture.
@ EM_OPEN8
Open8 8-bit RISC soft processor core.
@ EM_TPC
Tenor Network TPC processor.
@ EM_NS32K
National Semiconductor 32000 series.
@ EM_S370
IBM System/370 Processor.
@ EM_SLE9X
Infineon Technologies SLE9X core.
@ EM_S390
IBM System/390 Processor.
@ EM_TSK3000
Altium TSK3000 core.
@ EM_TILEPRO
Tilera TILEPro multicore architecture family.
@ EM_COREA_2ND
KIPO-KAIST Core-A 2nd generation processor family.
@ EM_MMIX
Donald Knuth’s educational 64-bit processor.
@ EM_ARC_COMPACT3
Synopsys ARCv2.3 32-bit.
@ EM_PDSP
Sony DSP Processor.
@ EM_CEVA
CEVA Processor Architecture Family.
@ EM_TI_C5500
The Texas Instruments TMS320C55x DSP family.
@ EM_AIECTRLCODE
AMD/Xilinx AIEngine ctrlcode.
@ EM_KMX32
KM211 KMX32 32-bit processor.
@ EM_LANAI
Lanai processor.
@ EM_X86_64
AMD x86-64 architecture, we always expect this value.
@ EM_XGATE
Motorola XGATE embedded processor.
@ EM_ECOG16
Cyan Technology eCOG16 family.
@ EM_TILEGX
Tilera TILE-Gx multicore architecture family.
@ EM_IP2K
Ubicom IP2xxx microcontroller family.
@ EM_OPENRISC
OpenRISC 32-bit embedded processor.
@ EM_68HC11
Motorola MC68HC11 Microcontroller.
@ EM_INTEL207
Reserved by Intel.
@ EM_U16_U8CORE
LAPIS nX-U16/U8.
@ EM_BPF
Linux BPF – in-kernel virtual machine.
@ EM_M32R
Mitsubishi M32R.
@ EM_ARM
ARM 32-bit architecture (AARCH32)
@ EM_TI_C6000
The Texas Instruments TMS320C6000 DSP family.
@ EM_TI_ARP32
Texas Instruments Application Specific RISC Processor, 32bit fetch.
@ EM_LOONGGPU
Loongson LoongGPU.
@ EM_H8_300H
Hitachi H8/300H.
@ EM_MMDSP_PLUS
STMicroelectronics 64bit VLIW Data Signal Processor.
@ EM_CLOUDSHIELD
CloudShield architecture family.
@ EM_QDSP6
QUALCOMM DSP6 Processor.
@ EM_MIPS_RS3_LE
MIPS RS3000 Little-endian.
@ EM_ECOG1X
Cyan Technology eCOG1X family.
@ EM_CSR_KALIMBA
CSR Kalimba architecture family.
@ EM_COREA_1ST
KIPO-KAIST Core-A 1st generation processor family.
@ EM_F2MC16
Fujitsu F2MC16.
@ EM_ST19
STMicroelectronics ST19 8-bit microcontroller.
@ EM_MMA
Fujitsu MMA Multimedia Accelerator.
@ EM_KVX
Kalray VLIW core of the MPPA processor family.
@ EM_INTEL208
Reserved by Intel.
@ EM_SHARC
Analog Devices SHARC family of 32-bit DSP processors.
@ EM_ARC_COMPACT3_64
Synopsys ARCv2.3 64-bit.
@ EM_CRAYNV2
Cray Inc. NV2 vector architecture.
@ EM_JAVELIN
Infineon Technologies 32-bit embedded processor.
@ EM_KF32
ChipON KungFu32.
@ EM_ETPU
Freescale Extended Time Processing Unit.
@ EM_ST9PLUS
STMicroelectronics ST9+ 8/16 bit microcontroller.
@ EM_VIDEOCORE3
Broadcom VideoCore III processor.
@ EM_RX
Renesas RX family.
@ EM_AVR32
Atmel Corporation 32-bit microprocessor family.
@ EM_LOONGARCH
Loongson Loongarch.
@ EM_MCST_ELBRUS
MCST Elbrus general purpose hardware architecture.
@ EM_MANIK
M2000 Reconfigurable RISC Microprocessor.
@ EM_68HC08
Motorola MC68HC08 Microcontroller.
@ EM_XCORE
XMOS xCORE processor family.
@ EM_TMM_GPP
Thompson Multimedia General Purpose Processor.
@ EM_ME16
Toyota ME16 processor.
@ EM_VE
NEC Vector Engine.
@ EM_ALTERA_NIOS2
Altera Nios II soft-core processor.
@ EM_56800EX
Freescale 56800EX Digital Signal Controller (DSC)
@ EM_MIPS
MIPS I Architecture.
@ EM_TI_PRU
Texas Instruments Programmable Realtime Unit.
@ EM_BLACKFIN
Analog Devices Blackfin (DSP) processor.
@ EM_65816
WDC 65816/65C816.
@ EM_MOXIE
Moxie processor family.
@ EM_FT32
FTDI Chip FT32 high performance 32-bit RISC architecture.
@ EM_78KOR
Renesas 78KOR family.
@ EM_KMX16
KM211 KMX16 16-bit processor.
@ EM_SE_C17
Seiko Epson C17 family.
@ EM_SBF
Solana Bytecode Format.
@ EM_SE_C33
S1C33 Family of Seiko Epson processors.
@ EM_STXP7X
STMicroelectronics STxP7x family of configurable and extensible RISC processors.
@ EM_M32C
Renesas M32C series microprocessors.
@ EM_VISIUM
Controls and Data Services VISIUMcore processor.
@ EM_KMX8
KM211 KMX8 8-bit processor.
@ EM_AARCH64
ARM 64-bit architecture (AARCH64)
@ EM_TILE64
Tilera TILE64 multicore architecture family.
@ EM_M16C
Renesas M16C series microprocessors.
@ EM_CRIS
Axis Communications 32-bit embedded processor.
@ EM_ECOG2
Cyan Technology eCOG2 microprocessor.
@ EM_HUANY
Harvard University machine-independent object files.
@ EM_NDS32
Andes Technology compact code size embedded RISC processor family.
@ EM_68HC16
Motorola MC68HC16 Microcontroller.
@ EM_PDP10
Digital Equipment Corp. PDP-10.
@ EM_CR
National Semiconductor CompactRISC microprocessor.
@ EM_68HC05
Motorola MC68HC05 Microcontroller.
@ EM_H8_500
Hitachi H8/500.
@ EM_VPP500
Fujitsu VPP500.
@ EM_PARISC
Hewlett-Packard PA-RISC.
@ EM_SNP1K
Trebia SNP 1000 processor.
@ EM_DXP
Icera Semiconductor Inc. Deep Execution Processor.
@ EM_TINYJ
Advanced Logic Corp. TinyJ embedded processor family.
@ EM_ST200
STMicroelectronics (www.st.com) ST200 microcontroller.
@ EM_KM32
KM211 KM32 32-bit processor.
@ EM_METAG
Imagination Technologies META processor architecture.
@ EM_INTEL209
Reserved by Intel.
@ EM_MCS6502
MOS Technology MCS 6502 processor.
@ EM_DSPIC30F
Microchip Technology dsPIC30F Digital Signal Controller.
@ EM_FX66
Siemens FX66 microcontroller.
@ EM_ARC_COMPACT
ARC International ARCompact processor (old spelling/synonym: EM_ARC_A5)
@ EM_KVARC
KM211 KVARC processor.
@ EM_XTENSA
Tensilica Xtensa Architecture.
@ EM_68HC12
Motorola M68HC12.
@ EM_DSP24
New Japan Radio (NJR) 24-bit DSP Processor.
@ EM_MN10200
Matsushita MN10200.
@ EM_RS08
Freescale RS08 embedded processor.
@ EM_CRX
National Semiconductor CompactRISC CRX microprocessor.
@ EM_CR16
National Semiconductor CompactRISC CR16 16-bit microprocessor.
@ EM_TACHYUM
Reserved for Tachyum processor.
@ EM_BA1
Beyond BA1 CPU architecture.
@ EM_COLDFIRE
Motorola ColdFire.
@ EM_IMG1
Imagination Technologies.
@ EM_CDP
Paneve CDP architecture family.
@ EM_SPARC32PLUS
Enhanced instruction set SPARC.
@ EM_AIENGINE
AMD/Xilinx AIEngine architecture.
@ EM_ARCA
Arca RISC Microprocessor.
@ EM_XIMO16
New Japan Radio (NJR) 16-bit DSP Processor.
@ EM_PDP11
Digital Equipment Corp. PDP-11.
@ EM_NORC
Nanoradio Optimized RISC.
@ EM_ECOG1
Cyan Technology eCOG1X family.
@ EM_R32C
Renesas R32C series microprocessors.
@ EM_ARC
Argonaut RISC Core, Argonaut Technologies Inc.
@ EM_ZSP
LSI Logic 16-bit DSP Processor.
@ EM_NDR1
Denso NDR1 microprocessor.
@ EM_EXCESS
eXcess: 16/32/64-bit configurable embedded CPU
@ EM_SW64
Wuxi Institute of Advanced Technology SW64.
@ EM_ST100
STMicroelectronics ST100 processor.
@ EM_CEVA_X2
CEVA X2 Processor Family.
@ EM_MSP430
Texas Instruments embedded microcontroller msp430.
@ EM_COOL
Bluechip Systems CoolEngine.
@ EM_CYPRESS_M8C
Cypress M8C microprocessor.
@ EM_8051
Intel 8051 and variants.
@ EM_INTEL205
Reserved by Intel.
@ EM_GRAPHCORE_IPU
Graphcore Intelligent Processing Unit.
@ EM_NFP
Netronome Flow Processor (NFP)
@ EM_AVR
Atmel AVR 8-bit microcontroller.
@ EM_VIDEOCORE5
Broadcom VideoCore V processor.
@ EM_NCPU
Sony nCPU embedded RISC processor.
@ EM_MIPS_X
Stanford MIPS-X.
@ EM_MAXQ30
Dallas Semiconductor MAXQ30 Core Micro-controllers.
@ EM_CUDA
NVIDIA CUDA architecture.
@ EM_D30V
Mitsubishi D30V.
@ EM_UNICORE
Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University.
@ EM_SEP
Sharp embedded microprocessor.
@ EM_BA2
Beyond BA2 CPU architecture.
@ EM_MN10300
Matsushita MN10300.
@ EM_D10V
Mitsubishi D10V.
@ EM_SPARCV9
SPARC Version 9.
@ EM_INTEL206
Reserved by Intel.
@ EM_LATTICEMICO32
RISC processor for Lattice FPGA architecture.
@ EM_MICROBLAZE
Xilinx MicroBlaze 32-bit RISC soft processor core.
@ EM_AMDGPU
AMD GPU architecture.
@ EM_FIREPATH
Element 14 64-bit DSP Processor.
@ EM_ARC_COMPACT2
Synopsys ARCompact V2.
@ EM_TRIMEDIA
NXP Semiconductors TriMedia architecture family.
@ EM_STM8
STMicroeletronics STM8 8-bit microcontroller.
@ EM_COGE
Cognitive Smart Memory Processor.
@ EM_ST7
STMicroelectronics ST7 8-bit microcontroller.
@ R_X86_64_SIZE32
word32 Z + A
@ R_X86_64_RELATIVE
word64 B + A
@ R_X86_64_GLOB_DAT
word64 S
@ R_X86_64_GOTTPOFF
word32
@ R_X86_64_32
word32 S + A
@ R_X86_64_GOTOFF64
word64 S + A - GOT
@ R_X86_64_IRELATIVE
word64 indirect (B + A)
@ R_X86_64_GOTPCREL
word32 G + GOT + A - P
@ R_X86_64_64
word64 S + A
@ R_X86_64_TLSDESC_CALL
none
@ R_X86_64_GOTPC32
word32 GOT + A - P
@ R_X86_64_GOTPC32_TLSDESC
word32
@ R_X86_64_DTPOFF64
word64
@ R_X86_64_32S
word32 S + A
@ R_X86_64_PC64
word64 S + A - P
@ R_X86_64_GOT32
word32 G + A
@ R_X86_64_PC16
word16 S + A - P
@ R_X86_64_SIZE64
word64 Z + A
@ R_X86_64_PC8
word8 S + A - P
@ R_X86_64_JUMP_SLOT
word64 S
@ R_X86_64_PC32
word32 S + A - P
@ R_X86_64_DTPOFF32
word32
@ R_X86_64_DTPMOD64
word64
@ R_X86_64_PLT32
word32 L + A - P
@ R_X86_64_16
word16 S + A
@ R_X86_64_TLSDESC
word64×2
@ ELFOSABI_LINUX
Linux, alias for ELFOSABI_GNU.
@ ELFOSABI_TRU64
Compaq TRU64 UNIX.
@ ELFOSABI_HPUX
Hewlett-Packard HP-UX.
@ ELFOSABI_NSK
Hewlett-Packard Non-Stop Kernel.
@ ELFOSABI_AROS
Amiga Research OS.
@ ELFOSABI_OPENVMS
Open VMS.
@ ELFOSABI_OPENBSD
Open BSD.
@ ELFOSABI_NONE
No extensions or unspecified.
@ ELFOSABI_SOLARIS
Sun Solaris.
@ ELFOSABI_OPENVOS
Stratus Technologies OpenVOS.
@ ELFOSABI_FENIXOS
Fenix OS.
@ ELFOSABI_GNU
GNU, we always expect this value.
@ ELFOSABI_FREEBSD
FreeBSD.
@ ELFOSABI_CLOUDABI
Nuxi CloudABI.
@ ELFOSABI_MODESTO
Novell Modesto.
@ SHT_HASH
Contains a symbol hash table, only 1 per file.
@ SHT_RELA
Contains relocation entries with explicit addends.
@ SHT_PROGBITS
Contains information defined by the program.
@ SHT_STRTAB
Contains a string table.
@ SHT_SYMTAB_SHNDX
Contains extended section indexes for a symbol table, used with SHN_XINDEX
@ SHT_REL
Contains relocation entries without explicit addends.
@ SHT_HIOS
End of OS-specific section types.
@ SHT_FINI_ARRAY
Contains an array of pointers to termination functions.
@ SHT_HIPROC
End of processor-specific section types.
@ SHT_GROUP
Contains a section group, can only appear in relocatable files.
@ SHT_INIT_ARRAY
Contains an array of pointers to initialization functions.
@ SHT_NOTE
Contains unspecified auxiliary information.
@ SHT_SYMTAB
Contains a symbol table, only 1 per file.
@ SHT_NOBITS
Acts like SHT_PROGBITS but does not occupy any space in the file.
@ SHT_LOUSER
Start of application-specific section types.
@ SHT_NULL
Does not have an associated section.
@ SHT_HIUSER
End of application-specific section types.
@ SHT_LOOS
Start of OS-specific section types.
@ SHT_DYNSYM
Acts like SHT_SYMTAB but holds a minimal set of dynamic linking symbols, only 1 per file.
@ SHT_RELR
Contains relocation entries for relative relocations without explicit addends.
@ SHT_PREINIT_ARRAY
Contains an array of pointers to pre-initialization functions.
@ SHT_SHLIB
Reserved, has unspecified semantics.
@ SHT_LOPROC
Start of processor-specific section types.
@ SHT_DYNAMIC
Contains dynamic linking information, only 1 per file.
@ PF_MASKPROC
All bits in this mask are reserved for processor-specific semantics.
@ PF_X
Executable segment.
@ PF_MASKOS
All bits in this mask are reserved for OS-specific semantics.
@ ET_REL
Relocatable file.
@ ET_DYN
Shared object file.
@ ET_EXEC
Executable file.
@ STT_LOPROC
Start of processor-specific symbol types.
@ STT_FUNC
Symbol is a code object.
@ STT_LOOS
Start of OS-specific symbol types.
@ STT_NOTYPE
Symbol type is unspecified.
@ STT_OBJECT
Symbol is a data object.
@ STT_HIOS
End of OS-specific symbol types.
@ STT_FILE
Symbol's name is the name of a source file.
@ STT_SECTION
Symbol associated with a section.
@ STT_HIPROC
End of processor-specific symbol types.
Elf64_Half e_type
Object file type.
Elf64_Half e_shentsize
Size in bytes of one entry in the files section header table.
Elf64_Word e_version
Object file version.
Elf64_Half e_ehsize
Size of this header in bytes, should be sizeof(Elf64_Ehdr)
Elf64_Off e_shoff
Section header table's file offset in bytes, or 0 if there are no section headers.
Elf64_Addr e_entry
Entry point virtual address.
Elf64_Half e_phentsize
Size in bytes of one entry in the files program header table.
Elf64_Off e_phoff
Program header tables's file offset in bytes, or 0 if there are no program headers.
Elf64_Half e_machine
The required architecture.
Elf64_Word e_flags
Processor-specific flags.
Elf64_Half e_phnum
Number of entries in the program header table.
ELF File Helper structure.
uint64_t size
The size of the file in bytes.
Elf64_Shdr * dynsym
The dynamic symbol table section, or NULL if not found.
Elf64_Ehdr * header
The data in the file, pointed to the start of the ELF header.
Elf64_Shdr * symtab
The symbol table section, or NULL if not found.
Elf64_Xword p_memsz
Size of segment in memory in bytes.
Elf64_Addr p_vaddr
Target virtual address in memory.
Elf64_Addr p_paddr
Target physical address, ignored on systems without physical addressing.
Elf64_Off p_offset
Segment file offset in bytes.
Elf64_Xword p_align
Segment alignment requirement.
Elf64_Word p_flags
Segment flags.
Elf64_Word p_type
Segment type.
Elf64_Xword p_filesz
Size of segment in file in bytes.
ELF64 Rel Entry without addend.
ELF64 Rela Entry with addend.
Elf64_Word sh_name
Index of the section name in the string table.
Elf64_Xword sh_flags
Section flags.
Elf64_Word sh_type
Section type.
Elf64_Word sh_info
Depends on section type.
Elf64_Xword sh_size
Section size in bytes.
Elf64_Xword sh_addralign
Section byte alignment requirement.
Elf64_Addr sh_addr
If the section will appear in memory, this will be its virtual address, otherwise 0
Elf64_Off sh_offset
Section's file offset in bytes.
ELF64 Symbol Table Entry.