struct InitModule

Defined at line 186 of file ../../sdk/lib/ld/include/lib/ld/remote-dynamic-linker.h

The Init method takes an InitModuleList as an argument. Each element

describes an initial module, which is either a root module or an

implicitly-loaded module. Init loads all these modules and all their

transitive dependencies as indicated by DT_NEEDED entries.

Convenience functions are provided for creating InitModule objects for the

usual cases, or they can be default-constructed or aggregate-initialized

and their members set directly. Each object requires a DecodedModulePtr,

acquired via

<lib

/ld/remote-decoded-module.h> RemoteDecodedModule::Create.

The root modules are distinguished by having the `.visible_name` member

set. The module list for this dynamic linking session starts with the

root modules in the order provided. The list is then extended with all

their transitive dependencies, in breadth-first order, aka "load order".

Each module with `.visible_name = std::nullopt` is an implicitly-loaded

module. These are always loaded, but their place in the load order

depends on the DT_NEEDED dependency graph. An implicitly-loaded module

must have a DT_SONAME; when a DT_NEEDED entry matches that name, the

module goes onto the list. If no DT_NEEDED entry required the module,

then it is still loaded, but appears last in the list, with false for its

ld::abi::Abi

<

>::Module::symbols_visible flag.

The `.load` member may optionally be initialized to direct how to load

that module.

Public Members

DecodedModulePtr decoded_module
std::optional<Soname> visible_name
Load load

Records