From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109618 invoked by alias); 7 Mar 2015 00:15:59 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 109585 invoked by uid 89); 7 Mar 2015 00:15:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-pd0-f182.google.com Received: from mail-pd0-f182.google.com (HELO mail-pd0-f182.google.com) (209.85.192.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 07 Mar 2015 00:15:57 +0000 Received: by pdjp10 with SMTP id p10so41798276pdj.10; Fri, 06 Mar 2015 16:15:55 -0800 (PST) X-Received: by 10.70.6.1 with SMTP id w1mr30294600pdw.62.1425687355440; Fri, 06 Mar 2015 16:15:55 -0800 (PST) Received: from bubble.grove.modra.org (CPE-58-160-155-134.oycza5.sa.bigpond.net.au. [58.160.155.134]) by mx.google.com with ESMTPSA id fx8sm2318211pbd.61.2015.03.06.16.15.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Mar 2015 16:15:54 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 6EF47EA0150; Sat, 7 Mar 2015 10:45:49 +1030 (ACDT) Date: Sat, 07 Mar 2015 00:15:00 -0000 From: Alan Modra To: "H.J. Lu" Cc: GCC Patches , GNU C Library , Binutils Subject: Re: RFC: PATCHES: Properly handle reference to protected data on x86 Message-ID: <20150307001549.GA11451@bubble.grove.modra.org> Mail-Followup-To: "H.J. Lu" , GCC Patches , GNU C Library , Binutils References: <20150306041931.GE25172@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00061.txt.bz2 On Fri, Mar 06, 2015 at 05:04:56AM -0800, H.J. Lu wrote: > On Thu, Mar 5, 2015 at 8:19 PM, Alan Modra wrote: > > On Wed, Mar 04, 2015 at 03:26:10PM -0800, H.J. Lu wrote: > >> Protected symbol means that it can't be pre-emptied. It > >> doesn't mean its address won't be external. This is true > >> for pointer to protected function. With copy relocation, > >> address of protected data defined in the shared library may > >> also be external. We only know that for sure at run-time. > >> Here are patches for glibc, binutils and GCC to handle it > >> properly. > >> > >> Any comments? > > > > I'd like to see this pass some more tests. For example > > > > reference in non-PIC exe to var x > > protected visibility definition of x in libA > > protected visibility definition of x in libB > > > > I suspect you don't have this case correct, but congratulations if you > > do! Assuming libA is first on the breadth first search for libraries, > > then exe and libA ought to use the same x, but libB have its own x. > > I believe my new testcases on hjl/pr17711 branch at > > https://sourceware.org/git/?p=glibc.git;a=summary > > covers those and they work correctly. The test that I see in commit 9ea148bb does not. Please notice that I'm asking you about two protected definitions in the libraries, not one protected and one with default visibility. -- Alan Modra Australia Development Lab, IBM