Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
core.internal.elf.dl
Simplifies working with shared ELF objects of the current process.
Reference http://www.dwarfstd.org/
License:
Authors:
Martin Kinkelin
Source core/internal/elf/dl.d
- struct
SharedObjects; - Enables iterating over the process' currently loaded shared objects.
- alias
Callback= int delegate(SharedObject) nothrow @nogc; - static nothrow @nogc int
opApply(scope Callbackdg);
- struct
SharedObject; - A loaded shared ELF object/binary, i.e., executable or shared library.
- static nothrow @nogc SharedObject
thisExecutable(); - Returns the executable of the current process.
- static nothrow @nogc bool
findForAddress(scope const void*address, out SharedObjectresult); - Tries to find the shared object containing the specified address in one of its segments.Returns:True on success.
- dl_phdr_info
info; - OS-dependent info structure.
- nothrow @nogc @property void*
baseAddress() const; - Returns the base address of the object.
- nothrow @nogc const(char)[]
name() const; - Returns the name of (usually: path to) the object. Null-terminated.
- char[]
getPath(size_t N)(ref char[N]buffer) const
if (N > 1); - Tries to fill the specified buffer with the path to the ELF file, according to the /proc/
/maps file. Returns:The filled slice (null-terminated), or null if an error occurs. - nothrow @nogc int
opApply(scope int delegate(ref const Elf_Phdr) nothrow @nogcdg) const; - Iterates over this object's segments.
- nothrow @nogc bool
findSegmentForAddress(scope const void*address, out const(Elf_Phdr)*result) const; - Tries to find the segment containing the specified address.Returns:True on success.
Copyright © 1999-2025 by the D Language Foundation | Page generated by
Ddoc on Mon Mar 31 10:27:34 2025