From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38434 invoked by alias); 29 Mar 2016 19:51:19 -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 38414 invoked by uid 89); 29 Mar 2016 19:51:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=pursuing, H*MI:sk:983472E, clients X-HELO: mail-in2.apple.com Received: from mail-out2.apple.com (HELO mail-in2.apple.com) (17.151.62.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 29 Mar 2016 19:51:08 +0000 Received: from relay6.apple.com (relay6.apple.com [17.128.113.90]) by mail-in2.apple.com (Apple Secure Mail Relay) with SMTP id 72.B3.06427.AACDAF65; Tue, 29 Mar 2016 12:51:06 -0700 (PDT) Received: from nwk-mmpp-sz13.apple.com (nwk-mmpp-sz13.apple.com [17.128.115.216]) (using TLS with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by relay6.apple.com (Apple SCV relay) with SMTP id A3.57.18091.9ACDAF65; Tue, 29 Mar 2016 12:51:05 -0700 (PDT) Received: from [17.153.78.77] by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Mar 31 2015)) with ESMTPSA id <0O4T006FIGH4YD40@nwk-mmpp-sz13.apple.com> for binutils@sourceware.org; Tue, 29 Mar 2016 12:51:05 -0700 (PDT) Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Preventing preemption of 'protected' symbols in GNU ld 2.26 From: Joe Groff In-reply-to: Date: Tue, 29 Mar 2016 19:51:00 -0000 Cc: Alan Modra , Cary Coutant , Binutils Content-transfer-encoding: quoted-printable Message-id: <6AAD87D2-90F9-4AD7-A195-AC91B76EA6AE@apple.com> References: <983472E1-A1BC-4970-9CF9-0138A6BAD16D@apple.com> To: "H.J. Lu" X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00395.txt.bz2 > On Mar 29, 2016, at 12:43 PM, H.J. Lu wrote: >=20 > The link-time shared library may be very different from the run-time > shared library. Since copy relocation works correctly against protected > symbol with the current gcc, binutils and glibc, we can't simply disallow > copy relocation against protected symbol at link-time. However, protected doesn't work this way in older binutils, or with alterna= tive tools like llvm or gold, and it sounds like protected was never intend= ed to work this way either. Rather If gcc is interested in pursuing this op= timization, it seems more responsible to me they could investigate introduc= ing language-level annotations that let libraries opt into the optimization= , instead of unilaterally breaking things for other binutils clients and in= troducing new complexity to get back to the original behavior. -Joe