From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54840 invoked by alias); 29 Mar 2016 19:54:43 -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 54783 invoked by uid 89); 29 Mar 2016 19:54:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1143, clients X-HELO: mail-qg0-f41.google.com Received: from mail-qg0-f41.google.com (HELO mail-qg0-f41.google.com) (209.85.192.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 29 Mar 2016 19:54:39 +0000 Received: by mail-qg0-f41.google.com with SMTP id j35so21735308qge.0 for ; Tue, 29 Mar 2016 12:54:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-transfer-encoding; bh=elvxE6qs+8z9IgfAGKmbFPnTQPkjI+W7oQb0KDAcoos=; b=dWgbLyd5vPJPb+0n7NAbqY6NMW+TvDXos1HOdofkTH6kynnkXmOLnSsO/YKAy0ctSI cLM6AMmges3dXi1QJNDeQwerHJroY9k73bBD+Bn3vyIESph58FeR+sDxTvIuk+yQmOQv AxUgAWPdz5C3MOL/Xpgb4IjZlww0A81+eHpFrC5PEaNtKgGIODeaK0IjfpOR6NmTaqD6 7Df5diYmgwu7tU8CBslZ/GoUH/4D+LbmS+9FD13WuiuHtaMKa3c+oG+qTGbm3MoHhzSv EPv1k2Y1tCbtJJ+Ll+VEx0flOFNnoZP4EjL6hSezxexQTFEVEtrt1nT+sYZYY/Dxbo04 qBFg== X-Gm-Message-State: AD7BkJLDxu6IrgQOaZ0mjpdJNZa4yTBszHvplO7mxPhvdclCpvd8lI7XuC1MRqRgsy3CspchXCN6whxYJsai9g== MIME-Version: 1.0 X-Received: by 10.140.31.135 with SMTP id f7mr5305361qgf.96.1459281277142; Tue, 29 Mar 2016 12:54:37 -0700 (PDT) Received: by 10.55.57.203 with HTTP; Tue, 29 Mar 2016 12:54:36 -0700 (PDT) In-Reply-To: <6AAD87D2-90F9-4AD7-A195-AC91B76EA6AE@apple.com> References: <983472E1-A1BC-4970-9CF9-0138A6BAD16D@apple.com> <6AAD87D2-90F9-4AD7-A195-AC91B76EA6AE@apple.com> Date: Tue, 29 Mar 2016 19:54:00 -0000 Message-ID: Subject: Re: Preventing preemption of 'protected' symbols in GNU ld 2.26 From: "H.J. Lu" To: Joe Groff Cc: Alan Modra , Cary Coutant , Binutils Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00396.txt.bz2 On Tue, Mar 29, 2016 at 12:51 PM, Joe Groff wrote: > >> On Mar 29, 2016, at 12:43 PM, H.J. Lu wrote: >> >> 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 alter= native tools like llvm or gold, and it sounds like protected was never inte= nded to work this way either. Rather If gcc is interested in pursuing this = optimization, it seems more responsible to me they could investigate introd= ucing language-level annotations that let libraries opt into the optimizati= on, instead of unilaterally breaking things for other binutils clients and = introducing new complexity to get back to the original behavior. > Protected symbol never worked correctly on x86 before. My change closed a few long-standing bugs. There is no going-back. --=20 H.J.