From e57b0c6100e63bfd816ae59339452eafc81f1d3a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 28 Mar 2013 16:52:57 -0700 Subject: Avoid unconditional __call_tls_dtors calls in static linking. --- nptl/pthread_create.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'nptl/pthread_create.c') 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 (); -- cgit 1.4.1