ddn.elf.strtab
ELF string table handling functionality.
This module provides utilities for reading, searching, and building ELF string tables. String tables are used extensively in ELF files to store section names, symbol names, and other string data.
Types 2
structElfStringTable
Represents an ELF string table.
This struct provides efficient access to strings stored in an ELF string table section, which consists of null-terminated strings concatenated together.
Fields
const(ubyte)[] _dataMethods
string getString(size_t offset)Get a string by its offset in the string table.size_t findString(string str)Find the offset of a string in the string table.bool hasString(string str)Check if a string exists in the string table.Constructors
this(const(ubyte)[] data)Constructor from raw string table data.structStringTableBuilder
Builder for creating ELF string tables.
This struct allows incremental construction of a string table with automatic deduplication of strings.
Fields
ubyte[] _buffersize_t[string] _stringOffsetsFunctions 1
fn
ElfStringTable getSectionStringTable(ElfFile file)Get the section header string table from an ELF file.