From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123521 invoked by alias); 24 Mar 2016 16:42:12 -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 123457 invoked by uid 89); 24 Mar 2016 16:42:11 -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=ccoutantgmailcom, ccoutant@gmail.com, proposing, Hx-languages-length:898 X-HELO: mail-qg0-f47.google.com Received: from mail-qg0-f47.google.com (HELO mail-qg0-f47.google.com) (209.85.192.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 24 Mar 2016 16:42:01 +0000 Received: by mail-qg0-f47.google.com with SMTP id u110so42806925qge.3 for ; Thu, 24 Mar 2016 09:42:01 -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; bh=MNGtpcWraom8olpRhKMWgAucwu2YOLSi7Q8+62DF/XA=; b=JyX5OOye5vSm0wdYwcAvp3d+YrjAu+YPQ1p11KCvsEDR4vem1BxFki21ojTmDYazqk pBv6N3nL9J9aI8iclGRlJAdhPML2vpTlNw5rgaBleZ9kyRgd0MIVsNIzAUAbk2yoDBnc oWf+xfgArb4xVsKssQVYC1fn+MOJuUWafIdIegK7dllYQFVDgQsPk6Yhqck1jUKymcN/ F2S9KrEsxsAXKL48+xEej9cEL5o6ge9KzWkeCEwZw1gKBk9pe1j8yAvs7SGT/9CAnRTy 7kD4sfjDaBYEz3lSpBlT95nPXZ5xxqV/dP5MXoV7Ecgk0HUYL7iYPXj+P2Wxb7L+SLjH Pl2g== X-Gm-Message-State: AD7BkJL2/DAuOTC9NTdzREHnZsBT4/B6fk7sh6G6jbUxsrd2ex7KD6EwePfBfEPhgSAFpvpNlYctJpC1E59Hyw== MIME-Version: 1.0 X-Received: by 10.141.1.87 with SMTP id c84mr12568001qhd.1.1458837719283; Thu, 24 Mar 2016 09:41:59 -0700 (PDT) Received: by 10.55.57.203 with HTTP; Thu, 24 Mar 2016 09:41:59 -0700 (PDT) In-Reply-To: References: <9106B2FB-BB06-413A-A04D-EEFB992784FA@apple.com> Date: Thu, 24 Mar 2016 16:42:00 -0000 Message-ID: Subject: Re: Preventing preemption of 'protected' symbols in GNU ld 2.26 From: "H.J. Lu" To: Cary Coutant Cc: Joe Groff , Binutils Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00324.txt.bz2 On Thu, Mar 24, 2016 at 9:06 AM, Cary Coutant wrote: >> I disagree. Protected means that it won't be preempted. It >> doesn't mean the address of protected symbol will be local. >> With copy relocation, the run-time address of the protected >> symbol can be in executable. There are a couple run-time >> tests in glibc to verify it. See: >> >> https://sourceware.org/bugzilla/show_bug.cgi?id=17711 > > No. You can't just redefine away the meaning of "must resolve to a > definition in that component." A COPY relocation makes a new > definition in the main program and that new definition pre-empts the > one in the shared library. That breaks everything that the rule in the > gABI was designed to allow. > What you are proposing is to disallow copy relocation against protected symbol. Am I correct? -- H.J.