From f6fc6973e34a3c250457aed1710ee0872800acdd Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 23 Dec 2008 10:16:51 +0000 Subject: Get non nptl threads compiled on x86. --- libc/misc/elf/dl-support.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'libc/misc/elf/dl-support.c') diff --git a/libc/misc/elf/dl-support.c b/libc/misc/elf/dl-support.c index 2f6682706..ce05f348a 100644 --- a/libc/misc/elf/dl-support.c +++ b/libc/misc/elf/dl-support.c @@ -11,14 +11,21 @@ * */ +#if USE_TLS #include #include -#include #include #include +#endif +#include +#include + +#if USE_TLS void (*_dl_init_static_tls) (struct link_map *) = &_dl_nothread_init_static_tls; +#endif + ElfW(Phdr) *_dl_phdr; size_t _dl_phnum; @@ -33,6 +40,7 @@ _dl_aux_init (ElfW(auxv_t) *av) _dl_phnum = (size_t) av[AT_PHNUM].a_un.a_val; } +#if USE_TLS /* Initialize static TLS area and DTV for current (only) thread. libpthread implementations should provide their own hook to handle all threads. */ @@ -57,3 +65,6 @@ _dl_nothread_init_static_tls (struct link_map *map) memset (mempcpy (dest, map->l_tls_initimage, map->l_tls_initimage_size), '\0', map->l_tls_blocksize - map->l_tls_initimage_size); } + +#endif + -- cgit v1.2.3