From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113982 invoked by alias); 30 Mar 2016 01:44:20 -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 113968 invoked by uid 89); 30 Mar 2016 01:44:20 -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=annoying, Those, swift X-HELO: mail-pf0-f172.google.com Received: from mail-pf0-f172.google.com (HELO mail-pf0-f172.google.com) (209.85.192.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 30 Mar 2016 01:44:09 +0000 Received: by mail-pf0-f172.google.com with SMTP id n5so28867094pfn.2 for ; Tue, 29 Mar 2016 18:44:09 -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=IQp4TEJK1+sFoOcuTR6WVnCFzlChOCNfOeioFSSaVd0=; b=bLwtRXXpVPjEC3IsEfJFLKS5oheDYmcCmroRUDw31GChcTXYzWR6nEAqteoxqb7I27 d+v1s/d+0gHxuFOkO9gBpfM9w7SnBd1tYg/0IL8qsZvTUc8A3Ar2/d3ukaMDhr0nXIu5 JEkAU7Gqb0gQl2T3mumIvK8zwxcGEN2Yv5YFdJgLXjp4ZLkuNPnW8CpYnTjBxmcq/7nL dJNN7YvwOickzYQN764I56MSHM4wFLV6BXyeP7lw2htcKcWsXhFSAugVNBrzK4t1HaZx dO4ZNLU00rYpQkric4S1U00xXGaSJVjAI8vDwz1bsQ304cir/l9QVzN7Snl4IDHSIHpt JQfA== X-Gm-Message-State: AD7BkJIwDtJhj1RRqJ8TCdVEDoca4kPVaqLfHdnnFyLhV4Px7GvVoVCjDzHmBLSwN7Te+w== X-Received: by 10.98.65.203 with SMTP id g72mr8622345pfd.138.1459302248266; Tue, 29 Mar 2016 18:44:08 -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 bu17sm1173750pac.25.2016.03.29.18.44.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Mar 2016 18:44:07 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 4B474EA0157; Wed, 30 Mar 2016 12:14:03 +1030 (ACDT) Date: Wed, 30 Mar 2016 01:44:00 -0000 From: Alan Modra To: "H.J. Lu" Cc: Joe Groff , Cary Coutant , Binutils Subject: Re: Preventing preemption of 'protected' symbols in GNU ld 2.26 Message-ID: <20160330014403.GI15812@bubble.grove.modra.org> References: <983472E1-A1BC-4970-9CF9-0138A6BAD16D@apple.com> <6AAD87D2-90F9-4AD7-A195-AC91B76EA6AE@apple.com> 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: 2016-03/txt/msg00406.txt.bz2 On Tue, Mar 29, 2016 at 12:54:36PM -0700, H.J. Lu wrote: > Protected symbol never worked correctly on x86 before. My > change closed a few long-standing bugs. There is no going-back. The swift bug report and this thread should be telling you that protected visibility symbols don't work correctly *now* on x86. They did in fact work correctly before your changes, but had many annoying restrictions. Those restrictions, all due to non-PIC, can be overcome in a number of ways without breaking shared libraries. eg. ppc32 is non-PIC by default just like x64, but see bfd/elf32-ppc.c /* Convert lis;addi or lis;load/store accessing a protected variable defined in a shared library to PIC. */ Yes, this makes ppc32 executables slower. I'd rather that than making shared libraries slower. FWIW, I agree with all the points Cary makes in https://sourceware.org/ml/binutils/2016-03/msg00331.html. -- Alan Modra Australia Development Lab, IBM