1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:27:34 +00:00

Loader.so+LibELF: Move most of Loader.so's logic into ELF::DynamicLinker

Loader.so now just performs the initial self relocations and static
LibC initialisation before handing over to ELF::DynamicLinker::linker_main
to handle the rest of the process.

As a trade-off, ELF::DynamicLinker needs to be explicitly excluded from
Lagom unless we really want to try writing a cross platform dynamic loader
This commit is contained in:
William Marlow 2021-01-01 23:54:43 +00:00 committed by Andreas Kling
parent 4d32121293
commit 3e815ad5b1
8 changed files with 327 additions and 220 deletions

View file

@ -75,9 +75,6 @@ public:
template<typename F>
void for_each_needed_library(F) const;
DynamicObject::SymbolLookupFunction m_global_symbol_lookup_func { nullptr };
void set_global_symbol_lookup_function(DynamicObject::SymbolLookupFunction func) { m_global_symbol_lookup_func = func; }
VirtualAddress text_segment_load_address() const { return m_text_segment_load_address; }
bool is_dynamic() const { return m_elf_image.is_dynamic(); }