diff options
Diffstat (limited to 'linker/linker_main.cpp')
-rw-r--r-- | linker/linker_main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/linker/linker_main.cpp b/linker/linker_main.cpp index a8741527e..43f12d378 100644 --- a/linker/linker_main.cpp +++ b/linker/linker_main.cpp @@ -585,6 +585,12 @@ __linker_init_post_relocation(KernelArgumentBlock& args, // couldn't make system calls on x86 at that point, but we can now... if (!linker_so.protect_relro()) __linker_cannot_link(args.argv[0]); + // Initialize the linker/libc.so shared global inside the linker. + static libc_shared_globals shared_globals; + __libc_shared_globals = &shared_globals; + __libc_init_shared_globals(&shared_globals); + args.shared_globals = __libc_shared_globals; + // Initialize the linker's static libc's globals __libc_init_globals(args); |