From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19585 invoked by alias); 24 Mar 2018 23:50:35 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 18381 invoked by uid 89); 24 Mar 2018 23:50:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_NEUTRAL autolearn=ham version=3.3.2 spammy=samuel, Samuel, H*r:sk:static-, Hx-spam-relays-external:sk:static- X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [hurd,commited] hurd: Fix accessing errno from rtld Date: Sat, 24 Mar 2018 23:50:00 -0000 Message-Id: <20180324235026.25560-1-samuel.thibault@ens-lyon.org> X-SW-Source: 2018-03/txt/msg00543.txt.bz2 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 | 5 +++++ include/errno.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 94175ab4b9..1b7ddba10c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-03-25 Samuel Thibault + + * include/errno.h [IS_IN(rtld) && !RTLD_PRIVATE_ERRNO]: Do not use the + TLS declaration of errno. + 2018-03-24 H.J. Lu [BZ #22998] diff --git a/include/errno.h b/include/errno.h index 3c3d2288c8..457114b27a 100644 --- a/include/errno.h +++ b/include/errno.h @@ -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 -- 2.16.2