From: Roland McGrath Date: Thu, 16 Aug 2012 00:05:10 +0000 (-0700) Subject: Fix dl-load.c for [!_LIBC_REENTRANT] case. X-Git-Tag: glibc-2.17~675 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b4f2771c217d7b038bcfc17c985ba057da554db;p=thirdparty%2Fglibc.git Fix dl-load.c for [!_LIBC_REENTRANT] case. --- diff --git a/ChangeLog b/ChangeLog index 3a658d6403e..22c9c6c6b01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2012-08-15 Roland McGrath + * elf/dl-load.c (_dl_map_object_from_fd) [SHARED]: Conditionalize + check of GL(dl_error_catch_tsd) on [_LIBC_REENTRANT]. + * bits/libc-lock.h (__rtld_lock_initialize): New macro. * elf/dl-sym.c: Include . diff --git a/elf/dl-load.c b/elf/dl-load.c index 43e1269c432..7bf0c12a7c2 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1194,9 +1194,11 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp, was executed directly. The setup will happen later. */ break; +# ifdef _LIBC_REENTRANT /* In a static binary there is no way to tell if we dynamically loaded libpthread. */ if (GL(dl_error_catch_tsd) == &_dl_initial_error_catch_tsd) +# endif #endif { /* We have not yet loaded libpthread.