From fef400a2f976d1fd6a4639e6980f6c50ee13fbf5 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 28 Jun 2021 14:33:53 +0200 Subject: nptl: Export libthread_db-used symbols under GLIBC_PRIVATE This allows distributions to strip debugging information from libc.so.6 without impacting the debugging experience. Reviewed-by: Carlos O'Donell --- nptl/pthread_create.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'nptl/pthread_create.c') diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index 3f017f1..d1b6817 100644 --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -43,21 +43,24 @@ /* Globally enabled events. */ -static td_thr_events_t __nptl_threads_events __attribute_used__; +td_thr_events_t __nptl_threads_events __attribute__ ((nocommon)); +libc_hidden_proto (__nptl_threads_events) +libc_hidden_data_def (__nptl_threads_events) /* Pointer to descriptor with the last event. */ -static struct pthread *__nptl_last_event __attribute_used__; +struct pthread *__nptl_last_event __attribute__ ((nocommon)); +libc_hidden_proto (__nptl_last_event) +libc_hidden_data_def (__nptl_last_event) #ifdef SHARED /* This variable is used to access _rtld_global from libthread_db. If GDB loads libpthread before ld.so, it is not possible to resolve _rtld_global directly during libpthread initialization. */ -static struct rtld_global *__nptl_rtld_global __attribute_used__ - = &_rtld_global; +struct rtld_global *__nptl_rtld_global = &_rtld_global; #endif /* Version of the library, used in libthread_db to detect mismatches. */ -static const char nptl_version[] __attribute_used__ = VERSION; +const char __nptl_version[] = VERSION; /* This performs the initialization necessary when going from single-threaded to multi-threaded mode for the first time. */ -- cgit v1.1