aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/pthread.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-03-02 11:45:12 +0000
committerRoland McGrath <roland@gnu.org>2003-03-02 11:45:12 +0000
commitbb0ddc2f1eca652aa8af56825b2ba3182498cc5a (patch)
tree8b03305facff745ff0bd14c50e811dfd77cef343 /linuxthreads/pthread.c
parent3093b1c70cd227c3329d2bbb77cd59ce2cbdcbd4 (diff)
downloadglibc-bb0ddc2f1eca652aa8af56825b2ba3182498cc5a.tar
glibc-bb0ddc2f1eca652aa8af56825b2ba3182498cc5a.tar.gz
glibc-bb0ddc2f1eca652aa8af56825b2ba3182498cc5a.tar.bz2
glibc-bb0ddc2f1eca652aa8af56825b2ba3182498cc5a.zip
* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_fixup_plt):
Don't use weak_extern for dl_rtld_map. Instead check only if [SHARED]. (elf_machine_rela): Clean up. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Clean up. PowerPC TLS support contributed by Paul Mackerras <paulus@samba.org>. * sysdeps/powerpc/powerpc32/elf/configure.in: New file. * sysdeps/powerpc/powerpc32/elf/configure: New generated file. * elf/tls-macros.h [__powerpc__ && !__powerpc64__] (TLS_LE, TLS_IE, TLS_LD, TLS_GD): Define them. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Support new relocs for TLS. * sysdeps/powerpc/dl-tls.h (TLS_TP_OFFSET, TLS_DTV_OFFSET): Move these macros out of [SHARED]. (TLS_TPREL_VALUE, TLS_DTPREL_VALUE): New macros. * elf/elf.h: Define R_PPC_* relocs for TLS support. Clean up R_PPC64_* macro definition comments.
Diffstat (limited to 'linuxthreads/pthread.c')
-rw-r--r--linuxthreads/pthread.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index 2888a6a2f7..01be30ba12 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -566,8 +566,10 @@ int __pthread_initialize_manager(void)
#endif
__pthread_multiple_threads = 1;
- __pthread_main_thread->p_header.data.multiple_threads = 1;
- * __libc_multiple_threads_ptr = 1;
+#if TLS_MULTIPLE_THREADS_IN_TCB || !defined USE_TLS || !TLS_DTV_AT_TP
+ __pthread_main_thread->p_multiple_threads = 1;
+#endif
+ *__libc_multiple_threads_ptr = 1;
#ifndef HAVE_Z_NODELETE
if (__builtin_expect (&__dso_handle != NULL, 1))
@@ -611,9 +613,13 @@ int __pthread_initialize_manager(void)
__pthread_handles[1].h_descr = manager_thread = mgr;
/* Initialize the descriptor. */
+#if !defined USE_TLS || !TLS_DTV_AT_TP
mgr->p_header.data.tcb = tcbp;
mgr->p_header.data.self = mgr;
mgr->p_header.data.multiple_threads = 1;
+#elif TLS_MULTIPLE_THREADS_IN_TCB
+ mgr->p_multiple_threads = 1;
+#endif
mgr->p_lock = &__pthread_handles[1].h_lock;
# ifndef HAVE___THREAD
mgr->p_errnop = &mgr->p_errno;