diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-12-28 09:27:26 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-12-28 09:27:26 +0000 |
commit | 131fd126cddad8379741597892cdfcd5cab3a49f (patch) | |
tree | ae4e3dc6182f230ae952cd95fecb2ee20948387b /elf | |
parent | ca78735936e87a2b72c553636e815bd555c4ef7e (diff) | |
download | glibc-131fd126cddad8379741597892cdfcd5cab3a49f.tar.gz glibc-131fd126cddad8379741597892cdfcd5cab3a49f.tar.xz glibc-131fd126cddad8379741597892cdfcd5cab3a49f.zip |
Update.
2002-12-28 Ulrich Drepper <drepper@redhat.com> * descr.h (struct pthread): Move header.data.list to the back of the struct. * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct. (MULTIPLE_THREADS_OFFSET): Adjust offset. (SYSINFO_OFFSEET): Likewise. 2002-12-27 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO): Define. (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings. * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define. (USE_DL_SYSINFO): Undef. 2002-12-22 Jakub Jelinek <jakub@redhat.com> * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of $(common-objpfx)libc.so. * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that it is bigger than pipe buffer size even on arches with bigger page size. (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/rtld.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/elf/rtld.c b/elf/rtld.c index d510018cb4..b8e7f9af6b 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -1150,6 +1150,10 @@ of this helper program; chances are you did not intend to run this program.\n\ /* Assign a module ID. */ GL(dl_rtld_map).l_tls_modid = _dl_next_tls_modid (); +# ifndef TLS_INIT_TP_EXPENSIVE +# define TLS_INIT_TP_EXPENSIVE 0 +# endif + /* We do not initialize any of the TLS functionality unless any of the initial modules uses TLS. This makes dynamic loading of modules with TLS impossible, but to support it requires either eagerly doing setup @@ -1157,7 +1161,7 @@ of this helper program; chances are you did not intend to run this program.\n\ an old kernel that can't perform TLS_INIT_TP, even if no TLS is ever used. Trying to do it lazily is too hairy to try when there could be multiple threads (from a non-TLS-using libpthread). */ - if (GL(dl_tls_max_dtv_idx) > 0) + if (GL(dl_tls_max_dtv_idx) > 0 || !TLS_INIT_TP_EXPENSIVE) { struct link_map *l; size_t nelem; @@ -1565,8 +1569,12 @@ cannot allocate TLS data structures for initial thread"); we need it in the memory handling later. */ GL(dl_initial_searchlist) = *GL(dl_main_searchlist); +#ifndef NONTLS_INIT_TP +# define NONTLS_INIT_TP do { } while (0) +#endif + #ifdef USE_TLS - if (GL(dl_tls_max_dtv_idx) > 0 || USE___THREAD) + if (GL(dl_tls_max_dtv_idx) > 0 || USE___THREAD || !TLS_INIT_TP_EXPENSIVE) { /* Now that we have completed relocation, the initializer data for the TLS blocks has its final values and we can copy them @@ -1579,7 +1587,9 @@ cannot allocate TLS data structures for initial thread"); if (__builtin_expect (lossage != NULL, 0)) _dl_fatal_printf ("cannot set up thread-local storage: %s\n", lossage); } + else #endif + NONTLS_INIT_TP; { /* Initialize _r_debug. */ |