]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: Fix accessing errno from rtld
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 24 Mar 2018 23:48:01 +0000 (00:48 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 24 Mar 2018 23:48:01 +0000 (00:48 +0100)
Letting rtld access errno through TLS can not work at early stages since
TLS will not be initialized yet.  When a private errno is not possible,
we thus have no other way than going through __errno_location.

* include/errno.h [IS_IN(rtld) && !RTLD_PRIVATE_ERRNO]: Do not use the
TLS declaration of errno.

ChangeLog
include/errno.h

index 94175ab4b9caf426fd7b7716ecd68b2a9f3b7e28..1b7ddba10c77bdde0d171d563fd05c251034ae35 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-03-25  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+       * include/errno.h [IS_IN(rtld) && !RTLD_PRIVATE_ERRNO]: Do not use the
+       TLS declaration of errno.
+
 2018-03-24  H.J. Lu  <hongjiu.lu@intel.com>
 
        [BZ #22998]
index 3c3d2288c8bb2a8dab9f1b49e36b7e06463a3ff1..457114b27a77868b2913825e4d9d77e792fb4a8d 100644 (file)
@@ -20,7 +20,7 @@
 #  define errno rtld_errno
 extern int rtld_errno attribute_hidden;
 
-# elif IS_IN_LIB
+# elif IS_IN_LIB && !IS_IN (rtld)
 
 #  include <tls.h>