ddn.elf.elf32
ELF32 data structures.
This module provides all ELF32-specific data structures as defined by the ELF specification. All structures are packed with align(1) to ensure proper binary layout.
Types 16
ELF32 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 52 bytes.
ubyte[EI_NIDENT] e_identELF identification bytesushort e_typeObject file type (ElfType)ushort e_machineArchitecture (ElfMachine)uint e_versionObject file version (ElfVersion)uint e_entryEntry point virtual addressuint e_phoffProgram header table file offsetuint 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.
ELF32 section header.
Each section in an ELF file has a section header that describes the section. Section headers have a fixed size of 40 bytes.
uint sh_nameSection name (string table index)uint sh_typeSection type (SectionType)uint sh_flagsSection flags (SectionFlags)uint sh_addrSection virtual address at executionuint sh_offsetSection file offsetuint sh_sizeSection size in bytesuint sh_linkLink to another sectionuint sh_infoAdditional section informationuint sh_addralignSection alignmentuint 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.
ELF32 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 32 bytes.
uint p_typeSegment type (SegmentType)uint p_offsetSegment file offsetuint p_vaddrSegment virtual addressuint p_paddrSegment physical addressuint p_fileszSegment size in fileuint p_memszSegment size in memoryuint p_flagsSegment flags (SegmentFlags)uint p_alignSegment alignmentAlias for backward compatibility.
ELF32 symbol table entry.
Symbol table entries describe symbols in the file. Each entry has a fixed size of 16 bytes.
uint st_nameSymbol name (string table index)uint st_valueSymbol value (address or offset)uint st_sizeSymbol sizeubyte st_infoSymbol type and binding info (st_info)ubyte st_otherSymbol visibility (st_other)ushort st_shndxSection indexSymbolVisibility getVisibility() pure nothrow @nogc @safe constExtract symbol visibility from st_other field.Alias for backward compatibility.
ELF32 relocation entry without addend.
Relocations describe how to modify an address or offset in the file. Rel entries have a fixed size of 8 bytes.
uint r_offsetLocation where to apply relocationuint r_infoRelocation type and symbol indexAlias for backward compatibility.
ELF32 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 12 bytes.
uint r_offsetLocation where to apply relocationuint r_infoRelocation type and symbol indexint r_addendAddendAlias for backward compatibility.
ELF32 dynamic array entry.
Dynamic array entries describe dynamic linking information. Each entry has a fixed size of 8 bytes.
uint d_tagDynamic entry type (DynamicTag)Alias for backward compatibility.
ELF32 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.