mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:54:58 +00:00
LibC+LibELF: Pass information from linker via magic lookup
This works by defining a set of weak symbols in dynamic linker whose value would be provided by it. This has the same effect as preloading library that magically knows right addresses of functions shared between dynamic linker and LibC. We were previously passing the same information by rewriting values based on hardcoded library name, so the new approach seems a little nicer to me.
This commit is contained in:
parent
a17041fe7f
commit
982799f7a0
6 changed files with 59 additions and 71 deletions
|
@ -345,7 +345,7 @@ static T c_str_to_floating_point(char const* str, char** endptr)
|
|||
|
||||
extern "C" {
|
||||
|
||||
void (*__call_fini_functions)();
|
||||
[[gnu::weak]] void (*__call_fini_functions)();
|
||||
|
||||
void exit(int status)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue