From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7638 invoked by alias); 4 Feb 2015 18:57:54 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 7608 invoked by uid 89); 4 Feb 2015 18:57:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_STOCKGEN,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ob0-f175.google.com Received: from mail-ob0-f175.google.com (HELO mail-ob0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 04 Feb 2015 18:57:52 +0000 Received: by mail-ob0-f175.google.com with SMTP id va2so3060750obc.6 for ; Wed, 04 Feb 2015 10:57:50 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.182.210.197 with SMTP id mw5mr7059628obc.26.1423076270561; Wed, 04 Feb 2015 10:57:50 -0800 (PST) Received: by 10.76.134.102 with HTTP; Wed, 4 Feb 2015 10:57:50 -0800 (PST) In-Reply-To: References: <20150203193615.GZ1746@tucnak.redhat.com> <20150203221935.GA1746@tucnak.redhat.com> <20150204183127.GU1746@tucnak.redhat.com> <20150204184205.GW1746@tucnak.redhat.com> Date: Wed, 04 Feb 2015 18:57:00 -0000 Message-ID: Subject: Re: [PATCH x86_64] Optimize access to globals in "-fpie -pie" builds with copy relocations From: "H.J. Lu" To: Sriraman Tallam Cc: Jakub Jelinek , Uros Bizjak , "gcc-patches@gcc.gnu.org" , David Li , Cary Coutant Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00278.txt.bz2 On Wed, Feb 4, 2015 at 10:51 AM, Sriraman Tallam wrote: > On Wed, Feb 4, 2015 at 10:45 AM, H.J. Lu wrote: >> On Wed, Feb 4, 2015 at 10:42 AM, Jakub Jelinek wrote: >>> On Wed, Feb 04, 2015 at 10:38:48AM -0800, H.J. Lu wrote: >>>> Common symbol should be resolved locally for PIE. >>> >>> binds_local_p yes, binds_to_current_def_p no. >>> >> >> Is SYMBOL_REF_LOCAL_P set to binds_local_p or >> binds_to_current_def_p? > > Looks like binds_local_p: > > varasm.c: > void > default_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED) > { > ... > if (targetm.binds_local_p (decl)) > flags |= SYMBOL_FLAG_LOCAL; > Why is SYMBOL_REF_LOCAL_P false? -- H.J.