core.internal.elf.dl

Simplifies working with shared ELF objects of the current process.

Reference: http://www.dwarfstd.org/

Types 4

aliasElf_Ehdr = ElfW!"Ehdr"
aliasElf_Phdr = ElfW!"Phdr"

Enables iterating over the process' currently loaded shared objects.

Methods
int opApply(scope Callback dg)

A loaded shared ELF object/binary, i.e., executable or shared library.

Fields
dl_phdr_info infoOS-dependent info structure.
Methods
SharedObject thisExecutable()Returns the executable of the current process.
bool findForAddress(const scope void * address, out SharedObject result)Tries to find the shared object containing the specified address in one of its segments. Returns: True on success.
void * baseAddress() @property constReturns the base address of the object.
const(char)[] name() constReturns the name of (usually: path to) the object. Null-terminated.
char[] getPath(size_t N)(ref char[N] buffer) if (N > 1) constTries to fill the specified buffer with the path to the ELF file, according to the /proc/<PID>/maps file.
int opApply(scope int delegate(ref const Elf_Phdr) @nogc nothrow dg) constIterates over this object's segments.
bool findSegmentForAddress(const scope void * address, out const(Elf_Phdr) * result) constTries to find the segment containing the specified address. Returns: True on success.