template <class RemoteModule, elfldltl::ElfMachine Machine>
class RemoteAbi
Defined at line 32 of file ../../sdk/lib/ld/include/lib/ld/remote-abi.h
The RemoteAbi object handles all the details of populating the passive ABI
for a given dynamic linking domain in a remote process. It takes the
RemoteAbiStub collected from the stub dynamic linker ELF file and modifies
the RemoteLoadModule representing the instance of the stub module, based on
a list of RemoteLoadModule objects representing the load order of modules
going into the remote dynamic linking domain.
There are only two methods: Init is called after decoding all modules but
before laying out the remote address space; Finish is called after address
space layout is known, to finalize the data.
Public Methods
void RemoteAbi<RemoteModule, Machine> ()
Defined at line 48 of file ../../sdk/lib/ld/include/lib/ld/remote-abi.h
void RemoteAbi<RemoteModule, Machine> (RemoteAbi<RemoteModule, Machine> && )
Defined at line 50 of file ../../sdk/lib/ld/include/lib/ld/remote-abi.h
RemoteAbi<RemoteModule, Machine> & operator= (RemoteAbi<RemoteModule, Machine> && )
Defined at line 52 of file ../../sdk/lib/ld/include/lib/ld/remote-abi.h
template <class Diagnostics>
zx::result<> Init (Diagnostics & diag, AbiStubPtr stub, RemoteModule & stub_module, ModuleList & modules, size_type max_tls_modid)
Lay out the final stub data segment given the full decoded module list.
Then modify the decoded stub_module (which could be a copy of the one that
was used to initialize abi_stub, or the same one) so its mutable segment
is replaced by a longer ConstantSegment. After this, the stub_module has
its final vaddr_size; load addresses can be selected for all modules.
Defined at line 60 of file ../../sdk/lib/ld/include/lib/ld/remote-abi.h
template <class Diagnostics>
zx::result<> Finish (Diagnostics & diag, const RemoteModule & stub_module, ModuleList & modules)
After every module's load_bias() is finalized, this writes the data out.
This must be the last method called. After this, the stub_module is ready
to be loaded into the target address space along with the other modules.
Note that this modifies the RemoteLoadModule objects in the list to
install the linked-list pointers in each one's module().link_map.
Defined at line 157 of file ../../sdk/lib/ld/include/lib/ld/remote-abi.h