Namespaces
Enumerations
enum RemoteLoadZygote
| Name | Value |
|---|---|
| kNo | false |
| kYes | true |
This the type of the second optional template parameter to RemoteLoadModule.
It's a flag saying whether the module is going to be used as a "zygote". A
fully-relocated module ready to be loaded as VMOs of relocate data. In the
default case, those VMOs are mutable and get directly mapped into a process
by the Load method, where they may be mutated further via writing mappings.
In a zygote module, those VMOs are immutable after relocation and instead
get copy-on-write clones mapped in by Load.
Defined at line 34 of file ../../sdk/lib/ld/include/lib/ld/remote-load-module.h
enum AbiModuleInline
| Name | Value |
|---|---|
| kNo | 0 |
| kYes | 1 |
This template parameter indicates whether the ld::abi::Abi
<
...>::Module is
stored directly (inline) in the ld::DecodedModule or is allocated
separately. For in-process dynamic linking, it's allocated separately to
survive in the passive ABI after the LoadModule object is no longer needed.
For other cases like out-of-process, that's not needed since publishing its
data to the passive ABI requires separate work anyway.
Defined at line 43 of file ../../sdk/lib/ld/include/lib/ld/decoded-module.h
enum AuxvTag
| Name | Value |
|---|---|
| kNull | 0 |
| kExecFd | 2 |
| kPhdr | 3 |
| kPhent | 4 |
| kPhnum | 5 |
| kPagesz | 6 |
| kEntry | 9 |
| kSysinfoEhdr | 33 |
These are the AT_* tag values of potential interest here.
Defined at line 44 of file ../../sdk/lib/ld/posix.h
enum DecodedModuleRelocInfo
| Name | Value |
|---|---|
| kNo | 0 |
| kYes | 1 |
This template parameter indicates whether an elfldltl::RelocationInfo
object is included. For simple dynamic linking, the whole LoadModule
object is ephemeral and discarded shortly after relocation is finished.
For a zygote model, the LoadModule might be kept indefinitely after
relocation to be used for repeated loading or symbol resolution.
Defined at line 50 of file ../../sdk/lib/ld/include/lib/ld/decoded-module.h
enum RemoteAbiTranscriberImplType
| Name | Value |
|---|---|
| kIntegral | 0 |
| kVerbatim | 1 |
| kArray | 2 |
| kClass | 3 |
| kUnsupported | 4 |
Implementation declarations used below.
Defined at line 58 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
enum RemoteZygoteVmo
| Name | Value |
|---|---|
| kVmo | false |
| kDecodedPtr | true |
ld::RemoteZygoteVmo is the type of the template parameter to
ld::RemoteZygote that says how to "own" original file VMO handles.
The ld::RemoteDynamicLinker object owns segment VMOs for relocated (and
partial-page zeroed) segments, which are transferred into the zygote by
Insert(). But it doesn't directly own the VMO handles for each module's
whole original ELF file (read-only, executable handles to VMOs ultimately
owned by the filesystem). Those are owned indirectly by reference-counted
ld::RemoteDecodedModule objects the ld::RemoteDynamicLinker::modules() list
points to.
The zygote needs access to these VMO handles, but it doesn't need to own
them. On the other hand, it doesn't need any other information from the
ld::RemoteDecodedModule object. So there are two options for what the
zygote will own:
* a zx::vmo for the VMO handle
* a Linker::Module::Decoded::Ptr for the module that owns the VMO
The size of the ld::RemoteZygote object is about the same either way, but a
Decoded::Ptr references a second object (which itself also owns a read-only
mapping of the whole ELF file into the current address space). If there are
other references to these ld::RemoteDecodedModule objects anyway in a cache
of decoded modules reused for new dynamic linking sessions, then holding
another reference in the zygote saves the overhead of duplicating the VMO
handle. Doing that caching is probably preferable to recreating new
ld::RemoteDecodedModule objects (and their whole-file mappings) for the same
underlying file VMO later. It has nontrivial setup overhead that can be
amortized; while the memory overhead to maintain it is fairly modest when
the original file VMO itself is being kept alive anyway.
However, if no further dynamic linking sessions will reuse the same file
VMOs, then that modest memory overhead can be eliminated by dropping all
references to the ld::RemoteDecodedModule after duplicating its VMO handle.
ld::RemoteZygoteVmo::kDecodedPtr says to store the reference, while
ld::RemoteZygoteVmo::kVmo says to store just the zx::vmo handle.
A zygote of either type can be spliced into a zygote that uses zx::vmo.
Defined at line 83 of file ../../sdk/lib/ld/include/lib/ld/remote-zygote.h
enum TlsdescRuntime
| Name | Value |
|---|---|
| kStatic | 0 |
| kUndefinedWeak | 1 |
| kUndefinedWeakAddend | 2 |
ld::TlsdescRuntime::k* can be used as indices into an array of
kTlsdescRuntimeCount to cover all the entry points.
Defined at line 247 of file ../../sdk/lib/ld/include/lib/ld/tlsdesc.h
Records
-
class Bootstrap -
class Debugdata -
class DecodedModule -
class DecodedModuleBase -
class DecodedModuleInMemory -
class Diagnostics -
class DiagnosticsReport -
class DlPhdrInfoCounts -
class LoadModule -
class LoadModuleRef -
class LocalRuntimeTlsDescResolver -
class Log -
class ModuleDiagnosticsPrintfReportBase -
class ModuleDiagnosticsReportBase -
class ModuleMemory -
class ModulePhdrInfo -
class ProcessargsBuffer -
class RemoteAbi -
class RemoteAbiHeap -
class RemoteAbiHeapLayout -
class RemoteAbiSpan -
class RemoteAbiString -
class RemoteAbiStub -
class RemoteAbiTranscriber -
class RemoteAbiTranscriber -
class RemoteAbiTranscriber -
class RemoteAbiTranscriber -
class RemoteAbiTranscriber -
class RemoteAbiTranscriberImpl -
class RemoteAbiTranscriberImpl -
class RemoteAbiTranscriberImpl -
class RemoteAbiTranscriberImpl -
class RemoteAbiTranscriberImpl -
class RemoteDecodedFile -
class RemoteDecodedModule -
class RemoteDynamicLinker -
class RemoteLoadModule -
class RemoteZygote -
class RemoteZygoteDomain -
class ScopedModuleDiagnostics -
class StartLdResult -
class StartupBootstrap -
class StartupData -
class StartupDiagnosticsFlags -
class StartupLoadModule -
class StartupLoadResult -
class StartupStack -
class StaticTlsDescResolver -
class TlsSegment
Functions
-
template <size_t BufferSize, typename Log, class Module>void ModuleSymbolizerContext (Log && log, const Module & module)This produces symbolizer context markup describing one module. The
BufferSize template parameter is required and gives the size of a local
stack buffer that will be used to minimize repeated calls to the Log
function. The Log object must be callable as `void(std::string_view)`.
It will get one call per line (if `.back() == '
'`) or for partial
lines if the buffer fills. The Module object can be an ld::LoadModule
subclass or something that has similar `.name()`, `.module()`, and
`.load_info()` methods with a `.module().build_id` and where the
`.module().vaddr_start` is a final value including the load bias.
Defined at line 26 of file ../../sdk/lib/ld/include/lib/ld/diagnostics.h
-
template <size_t BufferSize, typename Log, class Module>void ModuleSymbolizerContext (Log && log, const Module & module)This produces symbolizer context markup describing one module. The
BufferSize template parameter is required and gives the size of a local
stack buffer that will be used to minimize repeated calls to the Log
function. The Log object must be callable as `void(std::string_view)`.
It will get one call per line (if `.back() == '
'`) or for partial
lines if the buffer fills. The Module object can be an ld::LoadModule
subclass or something that has similar `.name()`, `.module()`, and
`.load_info()` methods with a `.module().build_id` and where the
`.module().vaddr_start` is a final value including the load bias.
Defined at line 26 of file ../../sdk/lib/ld/include/lib/ld/diagnostics.h
-
template <class Elf = elfldltl::Elf<>, class LoadInfo, class Memory>void SetModulePhdrs (AbiModule<Elf> & module, const typename Elf::Ehdr & ehdr, const LoadInfo & load_info, Memory & memory)Set the module Phdrs, which is read directly from the load image, as opposed
to from a buffer read from the file.
Defined at line 30 of file ../../sdk/lib/ld/include/lib/ld/load.h
-
template <class Elf, class AbiTraits>DlPhdrInfoCounts DlPhdrInfoInitialExecCounts (const abi::Abi<Elf, AbiTraits> & abi)This yields the current counts as of program startup, from ld::abi::_ld_abi.
Defined at line 31 of file ../../sdk/lib/ld/include/lib/ld/dl-phdr-info.h
-
StartupData ReadBootstrap (zx::unowned_channel bootstrap)Defined at line 32 of file ../../sdk/lib/ld/procargs.cc
-
template <class Diagnostics>ScopedModuleDiagnostics<Diagnostics> <deduction guide for ScopedModuleDiagnostics> (Diagnostics & , std::string_view )Deduction guide.
-
template <class Memory>auto MakeScratchAllocator (Memory && memory)The scratch allocator gets fresh pages from the system and then unmaps them
all at the end of the allocator object's lifetime.
Defined at line 23 of file ../../sdk/lib/ld/allocator.h
-
template <const auto& Names, class Elf = elfldltl::Elf<>, auto... SetArgs, class Diagnostics>ld::RemoteLoadModule<Elf>::SymbolFilter RemotePerfectSymbolFilter (Diagnostics & diag, typename RemoteDecodedModule<Elf>::Ptr module, bool undef_ok)This instantiates an elfldltl::PerfectSymbolFilter with the same template
arguments, and fills it by doing lookups in the module. If the optional
flag is true, then symbols in the underlying elfldltl::PerfectSymbolSet not
found in the module will just not be returned by the filter; otherwise,
diag.UndefinedSymbol will be called for each one. The return value is
nullptr when the diagnostics object returned false.
Note that the returned filter will hold onto the ld::RemoteDecodedModule
reference just in case, but it should ordinarily be the same one underlying
the ld::RemoteLoadModule object passed to the filter.
**NOTE:** As with elfldltl::PerfectSymbolSet et al, this should only be
instantiated where it will have internal linkage, e.g. using a Names
reference that's inside an anonymous namespace.
Defined at line 32 of file ../../sdk/lib/ld/include/lib/ld/remote-perfect-symbol-filter.h
-
template <class Memory>auto MakeInitialExecAllocator (Memory && memory)The initial-exec allocator gets fresh pages from the system. When they've
been written, they'll be made read-only. They're never freed. Both the
current whole-page chunk and the previous one allocated are kept writable.
This always permits doing two consecutive allocations of data structures and
then updating the first data structure to point to the second.
Defined at line 34 of file ../../sdk/lib/ld/allocator.h
-
template <invocable<std::string_view> Take>uint32_t GetProcessargsStrings (std::string_view message, uint32_t off, uint32_t num, Take && take)Given a whole
<zircon
/processargs.h> message buffer as a std::string_view,
extract (up to) num strings by calling take as void(std::string_view). This
count should match the zx_proc_args_t::*_num value corresponding to the
zx_proc_args_t::*_off value passed here. The return value is exactly num if
everything was normal, or shorter if the strings in the message were
incorrectly truncated for the given *_off and *_num values from the header.
Defined at line 40 of file ../../sdk/lib/ld/include/lib/ld/processargs.h
-
void CheckErrors (Diagnostics & diag)This is called before proceeding from loading to relocation / linking, and
then again when proceeding from final cleanup to transferring control.
Defined at line 41 of file ../../sdk/lib/ld/startup-diagnostics.cc
-
dl_phdr_info MakeDlPhdrInfo (const abi::Abi<>::Module & module, void * tls_data, DlPhdrInfoCounts counts)Form the dl_iterate_phdr API's data structure from passive ABI module data.
The caller must compute the TLS data pointer. For the initial-exec set
described in the passive ABI, see
<lib
/ld/tls.h> ld::TlsInitialExecData.
The counts can be an instantaneous sample for this call, or can be a single
sample taken at the beginning of the iteration and passed to all callbacks.
For the initial-exec set only, use ld::DlPhdrInfoInitialExecCounts (above).
Defined at line 43 of file ../../sdk/lib/ld/include/lib/ld/dl-phdr-info.h
-
void CheckAlloc (Diagnostics & diag, fbl::AllocChecker & ac, std::string_view what)Defined at line 49 of file ../../sdk/lib/ld/allocator.h
-
template <class Elf = elfldltl::Elf<>, class LoadInfo>void SetModuleVaddrBounds (AbiModule<Elf> & module, const LoadInfo & load_info, typename Elf::size_type load_bias)Set the module vaddr bounds, calculated from the runtime load bias.
Defined at line 57 of file ../../sdk/lib/ld/include/lib/ld/load.h
-
bool IsProcessargsLogHandle (uint32_t info)Returns true if this is PA_FD type handle_info value value denotes the
logging handle (stderr file descriptor).
Defined at line 60 of file ../../sdk/lib/ld/include/lib/ld/processargs.h
-
template <auto& os>decltype(auto) operator<< (auto & os, DlPhdrInfoCounts counts)Defined at line 65 of file ../../sdk/lib/ld/include/lib/ld/dl-phdr-info.h
-
template <class Elf = elfldltl::Elf<>, class Diagnostics, typename... PhdrObservers>std::optional<ModulePhdrInfo<Elf>> DecodeModulePhdrs (Diagnostics & diag, std::span<const typename Elf::Phdr> phdrs, PhdrObservers &&... phdr_observers)This uses elfldltl::DecodePhdrs for the things needed by all dynamic linking
cases, but that aren't stored directly in abi::Abi
<
>::Module, so they are
just returned in ModulePhdrInfo. Additional phdr observers can be passed to
combine these into a single phdr scan. This might be used in a single pass
with the elfldltl::LoadInfo
<
...>::GetPhdrObserver() observer, when the
entire ELF file image is already accessible in memory and things like notes
can be examined in the same one pass using elfldltl::PhdrFileNoteObserver or
similar things that find data via p_offset. Or it might be used in a second
pass after the LoadInfo has been filled in a first pass and the segments
have been mapped; then elfldltl::PhdrMemoryNoteObserver can be used, or
similar things that find data via p_vaddr.
Defined at line 84 of file ../../sdk/lib/ld/include/lib/ld/load.h
-
template <class Elf = elfldltl::Elf<>, class Diagnostics, typename... PhdrObservers>std::optional<ModulePhdrInfo<Elf>> DecodeModulePhdrs (Diagnostics & diag, std::span<const typename Elf::Phdr> phdrs, PhdrObservers &&... phdr_observers)This uses elfldltl::DecodePhdrs for the things needed by all dynamic linking
cases, but that aren't stored directly in abi::Abi
<
>::Module, so they are
just returned in ModulePhdrInfo. Additional phdr observers can be passed to
combine these into a single phdr scan. This might be used in a single pass
with the elfldltl::LoadInfo
<
...>::GetPhdrObserver() observer, when the
entire ELF file image is already accessible in memory and things like notes
can be examined in the same one pass using elfldltl::PhdrFileNoteObserver or
similar things that find data via p_offset. Or it might be used in a second
pass after the LoadInfo has been filled in a first pass and the segments
have been mapped; then elfldltl::PhdrMemoryNoteObserver can be used, or
similar things that find data via p_vaddr.
Defined at line 84 of file ../../sdk/lib/ld/include/lib/ld/load.h
-
template <typename T = void>T * TpRelative (ptrdiff_t offset, void * tp)Fetch the current thread pointer with the given byte offset.
With a second argument, use that instead of the current thread pointer.
Defined at line 87 of file ../../sdk/lib/ld/include/lib/ld/tls.h
-
template <typename T = void>T * TpRelative (ptrdiff_t offset, void * tp)Fetch the current thread pointer with the given byte offset.
With a second argument, use that instead of the current thread pointer.
Defined at line 87 of file ../../sdk/lib/ld/include/lib/ld/tls.h
-
template <typename T>ptrdiff_t TpRelativeToOffset (T * ptr)Return the given pointer's byte offset from the thread pointer.
`TpRelative(TpRelativeToOffset(ptr)) == ptr` should always be true.
Defined at line 94 of file ../../sdk/lib/ld/include/lib/ld/tls.h
-
template <typename T>ptrdiff_t TpRelativeToOffset (T * ptr)Return the given pointer's byte offset from the thread pointer.
`TpRelative(TpRelativeToOffset(ptr)) == ptr` should always be true.
Defined at line 94 of file ../../sdk/lib/ld/include/lib/ld/tls.h
-
template <class Elf = elfldltl::Elf<>, class Diagnostics, class Memory, typename... DynamicObservers>fit::result<bool, std::span<const typename Elf::Dyn>> DecodeModuleDynamic (AbiModule<Elf> & module, Diagnostics & diag, Memory & memory, const std::optional<typename Elf::Phdr> & dyn_phdr, DynamicObservers &&... dynamic_observers)This uses elfldltl::DecodeDynamic to fill the Module fields. Additional
dynamic section observers can be passed to include in the same scan.
Defined at line 102 of file ../../sdk/lib/ld/include/lib/ld/load.h
-
template <class Elf = elfldltl::Elf<>, class Diagnostics, class Memory, typename... DynamicObservers>fit::result<bool, std::span<const typename Elf::Dyn>> DecodeModuleDynamic (AbiModule<Elf> & module, Diagnostics & diag, Memory & memory, const std::optional<typename Elf::Phdr> & dyn_phdr, DynamicObservers &&... dynamic_observers)This uses elfldltl::DecodeDynamic to fill the Module fields. Additional
dynamic section observers can be passed to include in the same scan.
Defined at line 102 of file ../../sdk/lib/ld/include/lib/ld/load.h
-
template <class Elf, class AbiTraits>ptrdiff_t TlsInitialExecOffset (const typename abi::Abi<Elf, AbiTraits> & abi, typename Elf::size_type modid)Interrogate the passive ABI (e.g. ld::abi::_ld_abi) for the thread-pointer
offset of each thread's static TLS data area for the given TLS module ID
among the initial-exec set of TLS modules.
Defined at line 103 of file ../../sdk/lib/ld/include/lib/ld/tls.h
-
template <class Elf, class AbiTraits>ptrdiff_t TlsInitialExecOffset (const typename abi::Abi<Elf, AbiTraits> & abi, typename Elf::size_type modid)Interrogate the passive ABI (e.g. ld::abi::_ld_abi) for the thread-pointer
offset of each thread's static TLS data area for the given TLS module ID
among the initial-exec set of TLS modules.
Defined at line 103 of file ../../sdk/lib/ld/include/lib/ld/tls.h
-
template <class Module>void TlsModuleInit (const Module & module, std::span<std::byte> segment, bool known_zero)Populate a static TLS segment for the given module in one thread. The size
of the segment must match .tls_size().
Defined at line 113 of file ../../sdk/lib/ld/include/lib/ld/tls.h
-
template <class Module>void TlsModuleInit (const Module & module, std::span<std::byte> segment, bool known_zero)Populate a static TLS segment for the given module in one thread. The size
of the segment must match .tls_size().
Defined at line 113 of file ../../sdk/lib/ld/include/lib/ld/tls.h
-
template <class Elf, class AbiTraits>input_range auto TlsInitialExecSegments (const typename abi::Abi<Elf, AbiTraits> & abi, std::span<std::byte> block, size_t tp_offset)This returns an input range of TlsSegment objects for each module that has a
PT_TLS segment. The span passed should cover the whole area allocated for
static TLS data (and the like) for a given thread. The offset should be the
location within that span where the thread pointer will point (which may be
at the end of the span for x86 negative TLS offsets).
Defined at line 142 of file ../../sdk/lib/ld/include/lib/ld/tls.h
-
template <class Elf, class AbiTraits>input_range auto TlsInitialExecSegments (const typename abi::Abi<Elf, AbiTraits> & abi, std::span<std::byte> block, size_t tp_offset)This returns an input range of TlsSegment objects for each module that has a
PT_TLS segment. The span passed should cover the whole area allocated for
static TLS data (and the like) for a given thread. The offset should be the
location within that span where the thread pointer will point (which may be
at the end of the span for x86 negative TLS offsets).
Defined at line 142 of file ../../sdk/lib/ld/include/lib/ld/tls.h
-
template <class Elf = elfldltl::Elf<>>auto ObserveBuildIdNote (AbiModule<Elf> & module)This returns a callback that fills in the ABI module's build ID. Use it
with elfldltl::PhdrFileNoteObserver or elfldltl::PhdrMemoryNoteObserver.
The module.build_id member must be default-initialized before this.
The callback always return success so that the NoteObserver will never
short-circuit the phdrs scan it's part of, only short-circuit unnecessary
note scanning.
Defined at line 149 of file ../../sdk/lib/ld/include/lib/ld/load.h
-
template <class Elf, class AbiTraits>void TlsInitialExecDataInit (const typename abi::Abi<Elf, AbiTraits> & abi, std::span<std::byte> block, size_t tp_offset, bool known_zero)Populate the static TLS block with initial data and zero'd tbss regions for
each module that has a PT_TLS segment.
Defined at line 160 of file ../../sdk/lib/ld/include/lib/ld/tls.h
-
template <class Elf, class AbiTraits>void TlsInitialExecDataInit (const typename abi::Abi<Elf, AbiTraits> & abi, std::span<std::byte> block, size_t tp_offset, bool known_zero)Populate the static TLS block with initial data and zero'd tbss regions for
each module that has a PT_TLS segment.
Defined at line 160 of file ../../sdk/lib/ld/include/lib/ld/tls.h
-
uintptr_t StartLd (StartupStack & stack)This gets called from the entry-point written in assembly, which just
passes the incoming SP value as the first argument. It returns the main
executable entry point address to jump to after unwinding the stack back
to the starting state.
Defined at line 164 of file ../../sdk/lib/ld/posix-startup.cc
-
template <class Elf = elfldltl::Elf<>, class File, typename Allocator>auto PhdrFileBuildIdObserver (File && file, Allocator && allocator, AbiModule<Elf> & module)These are convenience wrappers around ObserveBuildIdNote when no other notes
are of interest in a phdrs scan. They return phdr note observers reading
from the file or memory, respectively.
Defined at line 173 of file ../../sdk/lib/ld/include/lib/ld/load.h
-
template <class Elf, class AbiTraits>void * TlsInitialExecData (const typename abi::Abi<Elf, AbiTraits> & abi, typename Elf::size_type modid)Interrogate the passive ABI (e.g. ld::abi::_ld_abi) to locate the current
thread's TLS data area for the given TLS module ID among the initial-exec
set of TLS modules.
Defined at line 173 of file ../../sdk/lib/ld/include/lib/ld/tls.h
-
template <class Elf = elfldltl::Elf<>, class Memory>auto PhdrMemoryBuildIdObserver (Memory && memory, AbiModule<Elf> & module)Defined at line 180 of file ../../sdk/lib/ld/include/lib/ld/load.h
-
template <class Elf = elfldltl::Elf<>>AbiModuleList<Elf> AbiLoadedModules (const abi::Abi<Elf> & abi)This returns the ld::AbiModuleList for an ld::Abi::Abi
<
>.
Defined at line 188 of file ../../sdk/lib/ld/include/lib/ld/module.h
-
template <class Elf = elfldltl::Elf<>>auto AbiLoadedSymbolModules (const abi::Abi<Elf> & abi)This returns a view similar to AbiModuleList, but only for modules where
symbols_visible is true.
Defined at line 195 of file ../../sdk/lib/ld/include/lib/ld/module.h
-
template <class Module, class Writer>Writer & ModuleSymbolizerContext (Writer & writer, const Module & module, typename decltype(module.vaddr_start)::value_type page_size, std::string_view prefix)This uses the symbolizer_markup::Writer API to emit the contextual elements
describing this Module. It requires the page size used to load the module.
Defined at line 203 of file ../../sdk/lib/ld/include/lib/ld/module.h
-
template <class Module>bool ModuleUsesStaticTls (const Module & module)Defined at line 237 of file ../../sdk/lib/ld/include/lib/ld/module.h
-
template <auto& module>bool ModuleContainsVaddr (const auto & module, decltype(module.vaddr_start()) vaddr)Defined at line 242 of file ../../sdk/lib/ld/include/lib/ld/module.h
-
template <auto&& modules>input_iterator auto FindModuleByVaddr (std::ranges::input_range auto && modules, decltype(std::ranges::begin(modules)->vaddr_start()) vaddr)This returns the iterator in the range where the module containing vaddr was
found, or modules.end() if no module contains vaddr.
Defined at line 248 of file ../../sdk/lib/ld/include/lib/ld/module.h
-
template <auto& module, auto&& callback>bool OnModuleWritableSegments (const auto & module, std::invocable<std::span<std::byte>> auto && callback)Given a module, call the callback as `bool(std::span
<std
::byte>)` to cover
all the writable segment data in the module, excluding the RELRO region.
This covers all the module's global (and static) variables (excluding TLS)
that could hold root pointers for GC or leak detection, for example.
Defined at line 260 of file ../../sdk/lib/ld/include/lib/ld/module.h
-
std::optional<TlsdescRuntime> TlsdescRuntimeFromMagic (uintptr_t magic)In the stub dynamic linker, the only FDEs should be for these entry points,
so each one's LSDA should correspond to one of the TlsdescRuntime indices.
Defined at line 269 of file ../../sdk/lib/ld/include/lib/ld/tlsdesc.h
-
std::optional<TlsdescRuntime> TlsdescRuntimeFromMagic (uintptr_t magic)In the stub dynamic linker, the only FDEs should be for these entry points,
so each one's LSDA should correspond to one of the TlsdescRuntime indices.
Defined at line 269 of file ../../sdk/lib/ld/include/lib/ld/tlsdesc.h
-
ptrdiff_t _ld_tlsdesc_runtime_undefined_weak (const elfldltl::Elf<>::TlsDescGot<> & )These are used for undefined weak definitions. The value slot contains just
the addend; the first entry-point ignores the addend and is cheaper for a
zero addend (the most common case), while the second supports an addend.
The implementation returns the addend minus the thread pointer, such that
adding the thread pointer back to this offset produces zero with a zero
addend, and thus nullptr.
-
ptrdiff_t _ld_tlsdesc_runtime_undefined_weak_addend (const elfldltl::Elf<>::TlsDescGot<> & ) -
ptrdiff_t _ld_tlsdesc_runtime_static (const elfldltl::Elf<>::TlsDescGot<> & )In this minimal implementation used for PT_TLS segments in the static TLS
set, desc.valueu is always simply a fixed offset from the thread pointer.
Note this offset might be negative, but it's always handled as uintptr_t to
ensure well-defined overflow arithmetic.
Concepts
template <typename PageSizeT> BootstrapEarlyPageSize std::convertible_to<PageSizeT, size_t>
The ld::Bootstrap constructor's page_size argument can be an integer if the
page size is available immediately, i.e. before dynamic linking.
Defined at line 28 of file ../../sdk/lib/ld/include/lib/ld/bootstrap.h
template <typename PageSizeT> BootstrapPageSize BootstrapEarlyPageSize<PageSizeT> || std::is_invocable_r_v<size_t, PageSizeT>
The ld::Bootstrap constructor's page_size argument can instead be callable
as size_t() that will be called only after dynamic linking.
Defined at line 33 of file ../../sdk/lib/ld/include/lib/ld/bootstrap.h
Variables
abi::Abi<> mutable_abi
Defined at line 13 of file ../../sdk/lib/ld/mutable-abi.cc
abi::Abi<>::RDebug mutable_r_debug
Defined at line 15 of file ../../sdk/lib/ld/mutable-abi.cc
const std::string_view kRemoteAbiStubPrefix
Defined at line 22 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-stub.h
const std::string_view kRemoteAbiStubSuffix
Defined at line 23 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-stub.h
const bool kProtectData
Defined at line 52 of file ../../sdk/lib/ld/startup-bootstrap.h
const LocalRuntimeTlsDescResolver kTlsDescResolver
Defined at line 61 of file ../../sdk/lib/ld/startup-load.h
const size_t kMaxSegments
Defined at line 63 of file ../../sdk/lib/ld/include/lib/ld/decoded-module.h
const size_t kMaxPhdrs
Defined at line 67 of file ../../sdk/lib/ld/include/lib/ld/decoded-module.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 71 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const RemoteAbiTranscriberImplType kRemoteAbiTranscriberImplType
Defined at line 72 of file ../../sdk/lib/ld/include/lib/ld/remote-abi-transcriber.h
const size_t kTlsdescRuntimeCount
Defined at line 253 of file ../../sdk/lib/ld/include/lib/ld/tlsdesc.h
const uint32_t kTlsdescRuntimeMagic
Defined at line 264 of file ../../sdk/lib/ld/include/lib/ld/tlsdesc.h