about summary refs log tree commit diff
path: root/nptl/pthread_create.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2013-03-28 16:52:57 -0700
committerRoland McGrath <roland@hack.frob.com>2013-03-28 16:52:57 -0700
commite57b0c6100e63bfd816ae59339452eafc81f1d3a (patch)
tree679fa9bc3f13ac3f2df0249db9966b305d6e8244 /nptl/pthread_create.c
parent288f7d79fe2dcc8e62c539f57b25d7662a2cd5ff (diff)
downloadglibc-e57b0c6100e63bfd816ae59339452eafc81f1d3a.tar.gz
glibc-e57b0c6100e63bfd816ae59339452eafc81f1d3a.tar.xz
glibc-e57b0c6100e63bfd816ae59339452eafc81f1d3a.zip
Avoid unconditional __call_tls_dtors calls in static linking.
Diffstat (limited to 'nptl/pthread_create.c')
-rw-r--r--nptl/pthread_create.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index c18278cf08..c43077fe2d 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -312,7 +312,10 @@ start_thread (void *arg)
     }
 
   /* Call destructors for the thread_local TLS variables.  */
-  __call_tls_dtors ();
+#ifndef SHARED
+  if (&__call_tls_dtors != NULL)
+#endif
+    __call_tls_dtors ();
 
   /* Run the destructor for the thread-local data.  */
   __nptl_deallocate_tsd ();