platform_bionic/libc/private
Evgeniy Stepanov 1a78fbb5c8 Initialize TLS before any application code is run.
Since e19d702b8e, dlsym and friends use recursive mutexes that
require the current thread id, which is not available before the libc
constructor. This prevents us from using dlsym() in .preinit_array.

This change moves TLS initialization from libc constructor to the earliest
possible point - immediately after linker itself is relocated. As a result,
pthread_internal_t for the initial thread is available from the start.

As a bonus, values stored in TLS in .preinit_array are not lost when libc is
initialized.

Change-Id: Iee5a710ee000173bff63e924adeb4a4c600c1e2d
2012-04-13 00:08:11 +04:00
..
isc auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
__dso_handle.S Enable functional DSO object destruction 2011-06-20 14:44:44 -07:00
__dso_handle_so.S Enable functional DSO object destruction 2011-06-20 14:44:44 -07:00
arpa_nameser.h Fix spurious DNS lookups in the C library. 2010-03-08 15:22:13 -08:00
arpa_nameser_compat.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
bionic_atomic_arm.h bionic: Do not use <sys/atomics.h> for platform code. 2011-11-16 16:28:10 +01:00
bionic_atomic_gcc_builtin.h bionic: Do not use <sys/atomics.h> for platform code. 2011-11-16 16:28:10 +01:00
bionic_atomic_inline.h bionic: Do not use <sys/atomics.h> for platform code. 2011-11-16 16:28:10 +01:00
bionic_atomic_x86.h bionic: Do not use <sys/atomics.h> for platform code. 2011-11-16 16:28:10 +01:00
bionic_futex.h Use private futexes for semaphores, unless they are initialized with pshared != 0. 2010-06-08 17:04:49 -07:00
bionic_pthread.h Handle pthread-related changes (mutex/atfork) 2012-03-26 15:38:59 -07:00
bionic_time.h libc: Copy private C library declarations to private/ 2012-01-13 13:26:50 +01:00
bionic_tls.h Initialize TLS before any application code is run. 2012-04-13 00:08:11 +04:00
cpuacct.h Remove compiler warnings when building Bionic. 2010-06-22 17:51:41 -07:00
ctype_private.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
logd.h Revert "Revert "libc: Add logcat error message for memory corruption"" 2011-07-06 12:58:56 -07:00
nsswitch.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
rand48.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
resolv_cache.h Add support for a dns cache per interface 2011-06-08 15:39:29 +02:00
resolv_iface.h libc: Copy private C library declarations to private/ 2012-01-13 13:26:50 +01:00
resolv_private.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
resolv_static.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
syscommon.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
thread_private.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00