ddn.elf.elf64
ELF64 data structures.
This module provides all ELF64-specific data structures as defined by the ELF specification. All structures are packed with align(1) to ensure proper binary layout.
Types 16
ELF64 file header.
The ELF file header appears at the beginning of every ELF file and describes the file's organization. It has a fixed size of 64 bytes.
ubyte[EI_NIDENT] e_identELF identification bytesushort e_typeObject file type (ElfType)ushort e_machineArchitecture (ElfMachine)uint e_versionObject file version (ElfVersion)ulong e_entryEntry point virtual addressulong e_phoffProgram header table file offsetulong e_shoffSection header table file offsetuint e_flagsProcessor-specific flagsushort e_ehsizeELF header size in bytesushort e_phentsizeProgram header table entry sizeushort e_phnumProgram header table entry countushort e_shentsizeSection header table entry sizeushort e_shnumSection header table entry countushort e_shstrndxSection header string table indexElfData getDataEncoding() pure nothrow @nogc @safe constGet the data encoding from the identification bytes.ElfVersion getVersion() pure nothrow @nogc @safe constGet the ELF version from the identification bytes.ubyte getAbiVersion() pure nothrow @nogc @safe constGet the ABI version from the identification bytes.Alias for backward compatibility.
ELF64 section header.
Each section in an ELF file has a section header that describes the section. Section headers have a fixed size of 64 bytes.
uint sh_nameSection name (string table index)uint sh_typeSection type (SectionType)ulong sh_flagsSection flags (SectionFlags)ulong sh_addrSection virtual address at executionulong sh_offsetSection file offsetulong sh_sizeSection size in bytesuint sh_linkLink to another sectionuint sh_infoAdditional section informationulong sh_addralignSection alignmentulong sh_entsizeEntry size if section holds tablebool isAllocatable() pure nothrow @nogc @safe constCheck if this section is allocatable (loaded into memory).Alias for backward compatibility.
ELF64 program header (segment header).
Each segment in an ELF file has a program header that describes the segment. Program headers have a fixed size of 56 bytes.
Note
uint p_typeSegment type (SegmentType)uint p_flagsSegment flags (SegmentFlags)ulong p_offsetSegment file offsetulong p_vaddrSegment virtual addressulong p_paddrSegment physical addressulong p_fileszSegment size in fileulong p_memszSegment size in memoryulong p_alignSegment alignmentAlias for backward compatibility.
ELF64 symbol table entry.
Symbol table entries describe symbols in the file. Each entry has a fixed size of 24 bytes.
Note
uint st_nameSymbol name (string table index)ubyte st_infoSymbol info (st_info)ubyte st_otherSymbol visibility (st_other)ushort st_shndxSection indexulong st_valueSymbol value (address or offset)ulong st_sizeSymbol sizeSymbolVisibility getVisibility() pure nothrow @nogc @safe constExtract symbol visibility from st_other field.Alias for backward compatibility.
ELF64 relocation entry without addend.
Relocations describe how to modify an address or offset in the file. Rel entries have a fixed size of 16 bytes.
ulong r_offsetLocation where to apply relocationulong r_infoRelocation type and symbol indexAlias for backward compatibility.
ELF64 relocation entry with addend.
Relocations describe how to modify an address or offset in the file. Rela entries include an explicit addend. They have a fixed size of 24 bytes.
ulong r_offsetLocation where to apply relocationulong r_infoRelocation type and symbol indexlong r_addendAddendAlias for backward compatibility.
ELF64 dynamic array entry.
Dynamic array entries describe dynamic linking information. Each entry has a fixed size of 16 bytes.
long d_tagDynamic entry type (DynamicTag) — Elf64_Sxword in the ELF64 specAlias for backward compatibility.
ELF64 note header.
Note headers describe note sections which contain arbitrary information.
uint n_nameszNote name sizeuint n_descszNote descriptor sizeuint n_typeNote typeAlias for backward compatibility.