index 2a6a03b5d688462c520c2adbff3a49d064c2c6dc..15b3fd5e1177e144989cb99ba536451239096bdc 100644 (file)
void __libc_init_tls(KernelArgumentBlock& args) {
__libc_auxv = args.auxv;
- static void* tls[BIONIC_TLS_SLOTS];
static pthread_internal_t main_thread;
- main_thread.tls = tls;
// Tell the kernel to clear our tid field when we exit, so we're like any other pthread.
// As a side-effect, this tells us our pid (which is the same as the main thread's tid).
__init_thread(&main_thread, false);
__init_tls(&main_thread);
__set_tls(main_thread.tls);
- tls[TLS_SLOT_BIONIC_PREINIT] = &args;
+ main_thread.tls[TLS_SLOT_BIONIC_PREINIT] = &args;
__init_alternate_signal_stack(&main_thread);
}