llvm::ELF

Constants, structures, and helpers for the ELF object-file format.

Types

NameDescription
Elf32_Chdr 32-bit ELF compressed section header.
Elf32_Dyn 32-bit ELF dynamic table entry.
Elf32_Ehdr 32-bit ELF file header.
Elf32_Nhdr 32-bit ELF note header.
Elf32_Phdr 32-bit ELF program header.
Elf32_Rel 32-bit ELF relocation entry without an explicit addend.
Elf32_Rela 32-bit ELF relocation entry with an explicit addend.
Elf32_Shdr 32-bit ELF section header.
Elf32_Sym 32-bit ELF symbol table entry.
Elf64_Chdr 64-bit ELF compressed section header.
Elf64_Dyn 64-bit ELF dynamic table entry.
Elf64_Ehdr 64-bit ELF file header.
Elf64_Nhdr 64-bit ELF note header.
Elf64_Phdr 64-bit ELF program header.
Elf64_Rel 64-bit ELF relocation entry without an explicit addend.
Elf64_Rela 64-bit ELF relocation entry with an explicit addend.
Elf64_Shdr 64-bit ELF section header.
Elf64_Sym 64-bit ELF symbol table entry.
Elf_Crel In-memory representation of a CREL relocation.

Type Aliases

NameDescription
Elf32_Addr 32-bit ELF program address type.
Elf32_Half 32-bit ELF unsigned medium-integer type.
Elf32_Off 32-bit ELF file offset type.
Elf32_Relr 32-bit relative relocation bitmap/offset entry.
Elf32_Sword 32-bit ELF signed integer type.
Elf32_Word 32-bit ELF unsigned integer type.
Elf64_Addr 64-bit ELF program address type.
Elf64_Half 64-bit ELF unsigned medium-integer type.
Elf64_Off 64-bit ELF file offset type.
Elf64_Relr 64-bit relative relocation bitmap/offset entry.
Elf64_Sword 64-bit ELF signed 32-bit integer type.
Elf64_Sxword 64-bit ELF signed integer type.
Elf64_Word 64-bit ELF unsigned 32-bit integer type.
Elf64_Xword 64-bit ELF unsigned integer type.

Enums

NameDescription
Unnamed enum e_ident size and indices.
Unnamed enum File types. See current registered ELF types at: http://www.sco.com/developers/gabi/latest/ch4.eheader.html
Unnamed enum Object file version values for e_version.
Unnamed enum ELF e_machine architecture identifiers.
Unnamed enum Object file classes.
Unnamed enum Object file byte orderings.
Unnamed enum OS ABI identification.
Unnamed enum AMDGPU OS ABI Version identification.
Unnamed enum CUDA OS ABI Version identification.
Unnamed enum X86_64 relocations.
Unnamed enum i386 relocations.
Unnamed enum ELF Relocation types for PPC32
Unnamed enum Specific e_flags for PPC64
Unnamed enum Special values for the st_other field in the symbol table entry for PPC64.
Unnamed enum ELF Relocation types for PPC64
Unnamed enum ELF Relocation types for AArch64
Unnamed enum Special values for the st_other field in the symbol table entry for AArch64.
Unnamed enum ARM Specific e_flags
Unnamed enum ELF Relocation types for ARM
Unnamed enum ARC Specific e_flags
Unnamed enum ELF Relocation types for ARC
Unnamed enum AVR specific e_flags
Unnamed enum ELF Relocation types for AVR
Unnamed enum Mips Specific e_flags
Unnamed enum MIPS-specific section indexes
Unnamed enum ELF Relocation types for Mips
Unnamed enum Special values for the st_other field in the symbol table entry for MIPS.
Unnamed enum .MIPS.options section descriptor kinds
Unnamed enum Hexagon-specific e_flags
Unnamed enum Hexagon-specific section indexes for common small data
Unnamed enum ELF Relocation types for Hexagon
Unnamed enum ELF Relocation type for Lanai.
Unnamed enum RISCV Specific e_flags
Unnamed enum ELF Relocation types for RISC-V
Unnamed enum Special st_other values for RISC-V symbols.
Unnamed enum ELF Relocation types for S390/zSeries
Unnamed enum SPARC Specific e_flags
Unnamed enum ELF Relocation type for Sparc.
Unnamed enum AMDGPU-specific e_flags values (machine selection and features).
Unnamed enum ELF Relocation types for AMDGPU
Unnamed enum NVPTX specific e_flags.
Unnamed enum ELF Relocation types for BPF
Unnamed enum ELF Relocation types for M68k
Unnamed enum MSP430 specific e_flags
Unnamed enum ELF Relocation types for MSP430
Unnamed enum ELF Relocation type for VE.
Unnamed enum CSKY Specific e_flags
Unnamed enum ELF Relocation types for CSKY
Unnamed enum LoongArch Specific e_flags
Unnamed enum ELF Relocation types for LoongArch
Unnamed enum Xtensa specific e_flags
Unnamed enum ELF Relocation types for Xtensa
Unnamed enum Sentinel indicating the real program-header count is stored elsewhere.
Unnamed enum Special section indices.
Unnamed enum Section types.
Unnamed enum Section flags.
Unnamed enum Section Group Flags
Unnamed enum The size (in bytes) of symbol table entries.
Unnamed enum Symbol bindings.
Unnamed enum Symbol types.
Unnamed enum Symbol visibility values for the st_other field.
Unnamed enum Special symbol table indices.
Unnamed enum Special relocation symbols used in the MIPS64 ELF relocation entries
Unnamed enum Segment types.
Unnamed enum Segment flag bits.
Unnamed enum Dynamic table entry tags.
Unnamed enum DT_FLAGS values.
Unnamed enum State flags selectable in the `d_un.d_val' element of the DT_FLAGS_1 entry.
Unnamed enum DT_MIPS_FLAGS values.
Unnamed enum ElfXX_VerDef structure version (GNU versioning).
Unnamed enum VerDef flags (ElfXX_VerDef::vd_flags).
Unnamed enum Special constants for the version table. (SHT_GNU_versym/.gnu.version)
Unnamed enum ElfXX_VerNeed structure version (GNU versioning).
Unnamed enum Generic note types.
Unnamed enum Core note types.
Unnamed enum LLVM-specific notes.
Unnamed enum GNU note types.
Unnamed enum Android note types.
Unnamed enum Memory tagging values used in NT_ANDROID_TYPE_MEMTAG notes.
Unnamed enum Property types used in GNU_PROPERTY_TYPE_0 notes.
Unnamed enum aarch64 processor feature bits.
Unnamed enum aarch64 PAuth platforms.
Unnamed enum Bit positions of version flags for AARCH64_PAUTH_PLATFORM_LLVM_LINUX.
Unnamed enum x86 processor feature bits.
Unnamed enum RISC-V processor feature bits.
Unnamed enum FreeBSD note types.
Unnamed enum NT_FREEBSD_FEATURE_CTL values (see FreeBSD's sys/sys/elf_common.h).
Unnamed enum FreeBSD core note types.
Unnamed enum NetBSD core note types.
Unnamed enum OpenBSD core note types.
Unnamed enum AMDGPU-specific section indices.
Unnamed enum AMD vendor specific notes. (Code Object V2)
Unnamed enum AMDGPU vendor specific notes. (Code Object V3)
Unnamed enum LLVMOMPOFFLOAD specific notes.
Unnamed enum OS identifiers used in NT_GNU_ABI_TAG notes.
Unnamed enum Android packed relocation group flags.
Unnamed enum Legal values for ch_type field of compressed section header.

Functions

NameDescription
convertArchNameToEMachine Convert an architecture name into ELF's e_machine value.
convertEMachineToArchName Convert an ELF's e_machine value into an architecture name.
convertNameToOSABI Convert a lowercase string identifier into an OSABI value.
convertOSABIToName Convert an OSABI value into a string that identifies the OS- or ABI-specific ELF extension.
convertTripleArchTypeToEMachine Convert a triple's architecture to ELF's e_machine value.
encodeCrel Encode a sequence of relocations in ELF CREL format to an output stream.
writeHeader Write an ELF file header (Elf32_Ehdr or Elf64_Ehdr) for an ET_REL object.
writeSectionHeader Write a single ELF section header entry (Elf32_Shdr or Elf64_Shdr).

Variables

NameDescription
CREL_HDR_ADDEND CREL header flag bit indicating that addends are present.
ELF_NOTE_GNU Owner name string for GNU ELF notes ("GNU").