mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 01:27:31 +00:00
LibELF: Check if initializers ran instead of trusting s_global_objects
The original heuristic of "a library being in `s_global_objects` means that it was fully initialized already" doesn't hold up anymore since we changed the loading order. This was causing us to skip parts of the initialization of dependency libraries when running dlopen (since it was the only user of that setting). Instead, set a flag after we run stage 4 (which is the "run the global initializers" stage) and check that flag when determining unfinished dependencies. This entirely replaces the `skip_global_objects` logic.
This commit is contained in:
committed by
Linus Groh
parent
ef1c97e3d8
commit
082a7baa3b
@@ -249,6 +249,8 @@ Result<NonnullRefPtr<DynamicObject>, DlErrorMessage> DynamicLoader::load_stage_3
|
||||
void DynamicLoader::load_stage_4()
|
||||
{
|
||||
call_object_init_functions();
|
||||
|
||||
m_fully_initialized = true;
|
||||
}
|
||||
|
||||
void DynamicLoader::do_lazy_relocations()
|
||||
|
||||
Reference in New Issue
Block a user