diff options
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-libc.c | 25 | ||||
-rw-r--r-- | elf/dl-tsd.c | 8 |
2 files changed, 13 insertions, 20 deletions
diff --git a/elf/dl-libc.c b/elf/dl-libc.c index 828588a8b1..f44fa10e0e 100644 --- a/elf/dl-libc.c +++ b/elf/dl-libc.c @@ -307,22 +307,19 @@ libc_freeres_fn (free_mem) } } - if (USE___THREAD || GL(dl_tls_dtv_slotinfo_list) != NULL) - { - /* Free the memory allocated for the dtv slotinfo array. We can do - this only if all modules which used this memory are unloaded. */ + /* Free the memory allocated for the dtv slotinfo array. We can do + this only if all modules which used this memory are unloaded. */ #ifdef SHARED - if (GL(dl_initial_dtv) == NULL) - /* There was no initial TLS setup, it was set up later when - it used the normal malloc. */ - free_slotinfo (&GL(dl_tls_dtv_slotinfo_list)); - else + if (GL(dl_initial_dtv) == NULL) + /* There was no initial TLS setup, it was set up later when + it used the normal malloc. */ + free_slotinfo (&GL(dl_tls_dtv_slotinfo_list)); + else #endif - /* The first element of the list does not have to be deallocated. - It was allocated in the dynamic linker (i.e., with a different - malloc), and in the static library it's in .bss space. */ - free_slotinfo (&GL(dl_tls_dtv_slotinfo_list)->next); - } + /* The first element of the list does not have to be deallocated. + It was allocated in the dynamic linker (i.e., with a different + malloc), and in the static library it's in .bss space. */ + free_slotinfo (&GL(dl_tls_dtv_slotinfo_list)->next); void *scope_free_list = GL(dl_scope_free_list); GL(dl_scope_free_list) = NULL; diff --git a/elf/dl-tsd.c b/elf/dl-tsd.c index f01f8d652e..ea0fccd989 100644 --- a/elf/dl-tsd.c +++ b/elf/dl-tsd.c @@ -1,5 +1,5 @@ /* Thread-local data used by error handling for runtime dynamic linker. - Copyright (C) 2002, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2005, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -30,17 +30,13 @@ void ** __attribute__ ((const)) _dl_initial_error_catch_tsd (void) { -# if USE___THREAD static __thread void *data; -# else - static void *data; -# endif return &data; } void **(*_dl_error_catch_tsd) (void) __attribute__ ((const)) = &_dl_initial_error_catch_tsd; -# elif USE___THREAD +# else /* libpthread sets _dl_error_catch_tsd to point to this function. We define it here instead of in libpthread so that it doesn't |