Revert "Fix the C library initialization to avoid calling static C++ constructors twice."
This reverts commit 03eabfe65e
.
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
#include <sys/atomics.h>
|
||||
|
||||
/* special private C library header - see Android.mk */
|
||||
#include <bionic_preinit.h>
|
||||
#include <bionic_tls.h>
|
||||
|
||||
#include "linker.h"
|
||||
#include "linker_debug.h"
|
||||
@@ -1691,7 +1691,6 @@ int main(int argc, char **argv)
|
||||
#define ANDROID_TLS_SLOTS BIONIC_TLS_SLOTS
|
||||
|
||||
static void * __tls_area[ANDROID_TLS_SLOTS];
|
||||
static pthread_internal_t __main_thread;
|
||||
|
||||
unsigned __linker_init(unsigned **elfdata)
|
||||
{
|
||||
@@ -1710,7 +1709,8 @@ unsigned __linker_init(unsigned **elfdata)
|
||||
gettimeofday(&t0, 0);
|
||||
#endif
|
||||
|
||||
__libc_preinit(&__main_thread, __tls_area);
|
||||
__set_tls(__tls_area);
|
||||
((unsigned *)__get_tls())[TLS_SLOT_THREAD_ID] = gettid();
|
||||
|
||||
debugger_init();
|
||||
|
||||
|
Reference in New Issue
Block a user