Replace TLS_SLOT_BIONIC_PREINIT w/ shared globals
Instead of passing the address of a KernelArgumentBlock to libc.so for
initialization, use __loader_shared_globals() to initialize globals.
Most of the work happened in the previous CLs. This CL switches a few
KernelArgumentBlock::getauxval calls to [__bionic_]getauxval and stops
routing the KernelArgumentBlock address through the libc init functions.
Bug: none
Test: bionic unit tests
Change-Id: I96c7b02c21d55c454558b7a5a9243c682782f2dd
Merged-In: I96c7b02c21d55c454558b7a5a9243c682782f2dd
(cherry picked from commit 746ad15912cfa82271424747e94d8125acc43d8c)
diff --git a/libc/private/bionic_tls.h b/libc/private/bionic_tls.h
index f65de34..80dc9bc 100644
--- a/libc/private/bionic_tls.h
+++ b/libc/private/bionic_tls.h
@@ -63,12 +63,6 @@
TLS_SLOT_OPENGL_API = 3,
TLS_SLOT_OPENGL = 4,
- // This slot is only used to pass information from the dynamic linker to
- // libc.so when the C library is loaded in to memory. The C runtime init
- // function will then clear it. Since its use is extremely temporary,
- // we reuse an existing location that isn't needed during libc startup.
- TLS_SLOT_BIONIC_PREINIT = TLS_SLOT_OPENGL_API,
-
TLS_SLOT_STACK_GUARD = 5, // GCC requires this specific slot for x86.
TLS_SLOT_DLERROR,
@@ -133,7 +127,7 @@
#if defined(__cplusplus)
class KernelArgumentBlock;
extern void __libc_init_main_thread_early(KernelArgumentBlock& args);
-extern void __libc_init_main_thread_late(KernelArgumentBlock& args);
+extern void __libc_init_main_thread_late();
#endif
#endif /* __BIONIC_PRIVATE_BIONIC_TLS_H_ */