From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63082 invoked by alias); 19 Jul 2017 15:19:57 -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 63072 invoked by uid 89); 19 Jul 2017 15:19:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy= X-HELO: mail-oi0-f66.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=QK+AXXkCxlGBkc+5/zRD1caF+smC3KAaruF2QYKSXSs=; b=k7pP480Bm+OL4cMw9DnNbaOCbF8oQqwdAKzSGlF5yIFvk3ZuPCVbLsEoZRgQEVYw3x bKeYqO7kCToYCeRgilp8oci9VEjyNqfDpP5oHU2eJR7d15NBkNrgxTPMT/Bjy+UROlg5 eX+Tg+JdNHGIeMFXZb2ISGHY4GlYMBBO5z7WJ405hhHVoicaSBz1c9IpYRlmdD5OSykJ s+6GUHw8d3gOrxJZNDJIhAnQoVaLlPVycUYj0rOicDz58HZTN18E9JU0oRuexCFK2NLb wL+k4i1lPBDTqRe+Wdsm2/eYeO2vSrN+aZztkgkn1XUVGDBmakfMTxhUQgYhBHIN1B6b G7DA== X-Gm-Message-State: AIVw111Aqnql5kaUrHviM2fb5boteFE1EXIjmNGY1CSh7z8krX7K72Nx CyVrxR+EZoD7Egxz+ZDIbOFXuaApsQ== X-Received: by 10.202.61.195 with SMTP id k186mr2235805oia.19.1500477594199; Wed, 19 Jul 2017 08:19:54 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <87zic18yca.fsf@esperi.org.uk> References: <20170709154233.GA10935@gmail.com> <87d198lg6d.fsf@esperi.org.uk> <20170710131401.GA15657@gmail.com> <87shi4ju8l.fsf@esperi.org.uk> <87zic18yca.fsf@esperi.org.uk> From: "H.J. Lu" Date: Wed, 19 Jul 2017 15:19:00 -0000 Message-ID: Subject: Re: [PATCH] Remove debug/stack_chk_fail_local.c [BZ #21740] To: Nick Alcock Cc: Nick Alcock , GNU C Library Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-07/txt/msg00688.txt.bz2 On Tue, Jul 18, 2017 at 10:11 AM, Nick Alcock wrote: > On 18 Jul 2017, H. J. Lu uttered the following: >> From 47d95763a35fbc83ac871b10fc59f9eca1ef0a40 Mon Sep 17 00:00:00 2001 >> From: "H.J. Lu" >> Date: Sun, 9 Jul 2017 08:39:17 -0700 >> Subject: [PATCH] Don't add stack_chk_fail_local.o to libc.a [BZ #21740] >> >> commit 524a8ef2ad76af8ac049293d993a1856b0d888fb >> Author: Nick Alcock >> Date: Mon Dec 26 10:08:57 2016 +0100 >> >> PLT avoidance for __stack_chk_fail [BZ #7065] >> >> Add a hidden __stack_chk_fail_local alias to libc.so, >> and make sure that on targets which use __stack_chk_fail, >> this does not introduce a local PLT reference into libc.so. >> >> which unconditionally added >> >> strong_alias (__stack_chk_fail, __stack_chk_fail_local) >> >> defines __stack_chk_fail_local as an alias of __stack_chk_fail in libc.a. >> There is no need to add stack_chk_fail_local.o to libc.a. We only need >> to add stack_chk_fail_local.oS to libc_nonshared.a. > > Completely agreed -- we only need the _local alias because of internal > calls within the *shared* libc and related objects (in all of which the > symbol is hidden). The nonshared libc just calls __stack_chk_fail > directly and should not reference stack_chk_fail_local at all, and > nothing else should have undefined references to it because the only > objects that presently reference it should also contain a definition of > it. I am checking it in. -- H.J.