class SelfBase
Defined at line 27 of file ../../src/lib/elfldltl/include/lib/elfldltl/self.h
The elfldltl::Self calls provide introspection for a program to inspect its
own ELF headers. Note these always refer to the containing ELF module's
static link image; i.e. calls made inside a shared library (or a static
library linked into it) refer to the shared library's runtime image, while
calls inside the main executable (or a static library linked into it) refer
to the main executable's runtime image. The elfldltl::Self class itself is
always an empty object, just used for scoping and template parameterization.
All methods are static.
Protected Members
static std::byte[] kImage
static std::byte[] kImageEnd
static const std::byte[] kDynamic
static const uintptr_t[] kGot
static const std::byte[] kBase
Public Methods
uintptr_t LoadBias ()
Compute the load bias: the difference between the runtime load address of
the first PT_LOAD segment and its page-truncated p_vaddr. (That aligned
p_vaddr is usually zero, but not always.)
Defined at line 32 of file ../../src/lib/elfldltl/include/lib/elfldltl/self.h
DirectMemory Memory (std::byte * start, std::byte * end)
This returns a memory-access object for referring to the program's own ELF
metadata directly in memory. See
<lib
/elfldltl/memory.h> about the API.
Defined at line 68 of file ../../src/lib/elfldltl/include/lib/elfldltl/self.h
DirectMemory Memory ()
This version can be used in normal ELF objects with standard layout. The
explicit image bounds must be passed for e.g. kernels with special layout.
Defined at line 76 of file ../../src/lib/elfldltl/include/lib/elfldltl/self.h