From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38797 invoked by alias); 2 Apr 2016 02:53:39 -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 38784 invoked by uid 89); 2 Apr 2016 02:53:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pf0-f177.google.com Received: from mail-pf0-f177.google.com (HELO mail-pf0-f177.google.com) (209.85.192.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 02 Apr 2016 02:53:36 +0000 Received: by mail-pf0-f177.google.com with SMTP id 184so3825437pff.0 for ; Fri, 01 Apr 2016 19:53:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=66jNyRSarXmByLUhYvrUYMeTLgfrRsWXjYOCYGb/llU=; b=ggqN3R56Wsfdp83i+bpeJSTXDdrH/1S3xR6ZCA7iuH4AXrKGXjL2qbcv6Pt4mYp9Hr fIKx/lNVO0syevSGQe/vyt+N76iJhQ/mWsQCZqSHUXCGxNgDa7mmxNzNCRQ/DJZpsOyq KOVTk2gCQvMTVZP/rbmEpxoo8bMMsYryLMJQ8m10+EBkrW2ARpBM0oPPgKennxG20aWk HUCmX6wvlVRpPfcn+g2FQh5zt1iUgVAVAQbqS2LJd053EtBVYvhy5/+ksPdifQoyM1Ye Ghp1aD/jQm06CMPFQIBCZ+t9A1ejAID9dKJ75tmwSNG8tr/f6HrM24IwARE0jycDAonL VPMQ== X-Gm-Message-State: AD7BkJKvaYdW4nUj04CvCoT1JcRdTKvFKikDg3Oz41KZORuO4Xcp8K4RCC/Fq4TyV4zwBQ== X-Received: by 10.98.79.205 with SMTP id f74mr3215101pfj.68.1459565615234; Fri, 01 Apr 2016 19:53:35 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-160-146-233.sa.bigpond.net.au. [58.160.146.233]) by smtp.gmail.com with ESMTPSA id z2sm9003669pfa.90.2016.04.01.19.53.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Apr 2016 19:53:34 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 2A929EA0153; Sat, 2 Apr 2016 13:23:30 +1030 (ACDT) Date: Sat, 02 Apr 2016 02:53:00 -0000 From: Alan Modra To: Jeff Law Cc: Cary Coutant , "H.J. Lu" , Joe Groff , Binutils Subject: Re: Preventing preemption of 'protected' symbols in GNU ld 2.26 Message-ID: <20160402025329.GE27246@bubble.grove.modra.org> References: <983472E1-A1BC-4970-9CF9-0138A6BAD16D@apple.com> <6AAD87D2-90F9-4AD7-A195-AC91B76EA6AE@apple.com> <56FB5061.9010303@redhat.com> <56FED145.80307@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56FED145.80307@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00013.txt.bz2 On Fri, Apr 01, 2016 at 01:51:33PM -0600, Jeff Law wrote: > Essentially the question that needs to be answered is if we roll > back 65280, do we need to also roll back 65780? No, I don't think so. As I wrote in the bugzilla (paraphrased) What's going on here is that HJ has made changes to the linker for x86 to always copy variables defined in a shared library and referenced by the executable, into the executable's .dynbss. This is necessary to support non-PIC without text relocations, but is optional for PIEs. If you do this for PIEs and gain some performance without affecting shared library performance, and that is the case for x86_64, then the optimisation is quite reasonable. I think powerpc64 would gain too, but I haven't done anything about it yet (and for powerpc64 we should be able to implement it entirely in the linker, no gcc changes needed). I believe common variables can be treated like any other variable so far as this optimisation goes. -- Alan Modra Australia Development Lab, IBM