ddn.elf.sections
ELF section access and manipulation functionality.
This module provides comprehensive access to ELF file sections, including section enumeration, lookup by index or name, type filtering, and data access. All section access is lazy-loaded and cached for efficiency.
Types 3
structElfSection
Represents a single ELF section with lazy-loaded data.
This struct provides access to section header information, name, and data. All values are loaded lazily and cached for subsequent access.
Fields
private ElfFile _fileprivate size_t _indexprivate gelf.SectionHeader _headerprivate string _nameprivate const(ubyte)[] _dataprivate bool _headerLoadedprivate bool _nameLoadedprivate bool _dataLoadedMethods
gelf.SectionHeader getHeader()Get the section header.string getName()Get the section name.const(ubyte)[] getData()Get the section data.bool isSymtab()Check if this is a symbol table section.bool isStrtab()Check if this is a string table section.bool isRela()Check if this is a RELA section (relocation with explicit addends).bool isRel()Check if this is a REL section (relocation without addends).bool isAllocatable()Check if this section is allocatable (occupies memory during execution).bool isExecutable()Check if this section is executable.bool isWritable()Check if this section is writable.structSectionTypeRange
Input range for iterating sections of a specific type.
This range filters sections by type and provides lazy-loaded ElfSection objects.
Fields
private ElfFile _fileprivate types.SectionType _typeprivate gelf.SectionHeader[] _headersprivate size_t _currentIndexprivate bool _initializedMethods
void popFront()Advance to the next section.Constructors
this(ElfFile file, types.SectionType type)Constructor.this(ElfFile file, types.SectionType type, gelf.SectionHeader[] headers, size_t currentIndex, bool initialized)Internal constructor for save().structSectionRange
Input range for iterating all sections in an ELF file.
This range provides lazy-loaded ElfSection objects for all sections.
Methods
void popFront()Advance to the next section.Functions 4
fn
SectionTypeRange getSectionsByType(ElfFile file, types.SectionType type)Get a range for iterating sections of a specific type.