summaryrefslogtreecommitdiffstats
path: root/linker/linker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r--linker/linker.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 6a55571..aaa653f 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -2167,16 +2167,6 @@ static void init_linker_info_for_gdb(ElfW(Addr) linker_base) {
* and other non-local data at this point.
*/
static ElfW(Addr) __linker_init_post_relocation(KernelArgumentBlock& args, ElfW(Addr) linker_base) {
- /* NOTE: we store the args pointer on a special location
- * of the temporary TLS area in order to pass it to
- * the C Library's runtime initializer.
- *
- * The initializer must clear the slot and reset the TLS
- * to point to a different location to ensure that no other
- * shared library constructor can access it.
- */
- __libc_init_tls(args);
-
#if TIMING
struct timeval t0, t1;
gettimeofday(&t0, 0);
@@ -2403,6 +2393,8 @@ extern "C" ElfW(Addr) __linker_init(void* raw_args) {
_exit(EXIT_FAILURE);
}
+ __libc_init_tls(args);
+
// Initialize the linker's own global variables
linker_so.CallConstructors();
@@ -2412,7 +2404,6 @@ extern "C" ElfW(Addr) __linker_init(void* raw_args) {
solist = get_libdl_info();
sonext = get_libdl_info();
-
// We have successfully fixed our own relocations. It's safe to run
// the main part of the linker now.
args.abort_message_ptr = &g_abort_message;