mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 02:55:49 +03:00
LibELF: Call DT_INIT method now that startfiles are correct for DSOs
We weren't calling the method here before because it was ill-formed. No start files meant that we got the front half of the init section but not the back half (no 'ret' in _init!). Now that we have the proper crtbeginS and crtendS files from libgcc to help us out, we can assume that DSOs will have the proper _init method defined.
This commit is contained in:
parent
a755b80057
commit
f23dc4ea69
Notes:
sideshowbarker
2024-07-19 10:27:34 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/f23dc4ea698 Pull-request: https://github.com/SerenityOS/serenity/pull/988
@ -290,14 +290,8 @@ bool ELFDynamicObject::load(unsigned flags)
|
||||
#ifdef DYNAMIC_LOAD_DEBUG
|
||||
dbgprintf("Calling DT_INIT at %p\n", init_function);
|
||||
#endif
|
||||
// FIXME:
|
||||
// Disassembly of section .init:
|
||||
//
|
||||
// 00007e98 <_init>:
|
||||
// 7e98: 55 push ebp
|
||||
//
|
||||
// Where da ret at? related to -nostartfiles for sure...
|
||||
//(init_function)();
|
||||
|
||||
(init_function)();
|
||||
|
||||
InitFunc* init_begin = (InitFunc*)(load_addr + m_init_array_offset);
|
||||
u32 init_end = (u32)((u8*)init_begin + m_init_array_size);
|
||||
|
Loading…
Reference in New Issue
Block a user