From patchwork Sat Mar 24 23:50:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 890591 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-91236-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="ju8D1oCm"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 407xxG1dsZz9s08 for ; Sun, 25 Mar 2018 10:50:41 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=uBRyi+YFZcsjewqqb2FNsUC09qzcjmG+/tUdJFsE+xij0WJDEnwlk IxXfX67sTrkF2LK17BZ+EfMKEZNA0v/mhKTUQ8jMpoH6vuNuplFXJZjQLHv0/GR9 cPW3rSotgl6QmndedkumDd2LtHuubvZrSyBKN/ADPcdoOYP0+TqCvA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=0ld4rA9m7wcc7EzDVlzz672kTx0=; b=ju8D1oCmugBuVDoXY5lTa20tJ/8Y kkl2v8Kud4j5dchTp7GyWNvyrSQCjekvvzuDVJmTjvcOd0pgLPJb4oGOcfPCYTJh YvNRReAbCikkkDzDI9TvMq3bHhsFj7Gkk4H+cdd0XXwM0bRSbKLEwxQ3+T0w7m6z 22FWx9JADMr3S+k= 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-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@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: Sun, 25 Mar 2018 00:50:26 +0100 Message-Id: <20180324235026.25560-1-samuel.thibault@ens-lyon.org> 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