Don't corrupt the thread list in static executables.
Several previous changes conspired to make a mess of the thread list
in static binaries. This was most obvious when trying to call
pthread_key_delete(3) on the main thread.
Bug: http://code.google.com/p/android/issues/detail?id=36893
Change-Id: I2a2f553114d8fb40533c481252b410c10656da2e
diff --git a/libc/bionic/libc_init_common.c b/libc/bionic/libc_init_common.c
index 4ce4db6..6508c0b 100644
--- a/libc/bionic/libc_init_common.c
+++ b/libc/bionic/libc_init_common.c
@@ -76,7 +76,7 @@
pthread_attr_init(&thread_attr);
pthread_attr_setstack(&thread_attr, (void*)stackbottom, stacksize);
- _init_thread(&thread, gettid(), &thread_attr, (void*)stackbottom);
+ _init_thread(&thread, gettid(), &thread_attr, (void*)stackbottom, false);
__init_tls(tls_area, &thread);
tls_area[TLS_SLOT_BIONIC_PREINIT] = elfdata;