From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120454 invoked by alias); 28 Mar 2016 22:22:03 -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 120439 invoked by uid 89); 28 Mar 2016 22:22:02 -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=baked, Hx-languages-length:1076 X-HELO: mail-ig0-f176.google.com Received: from mail-ig0-f176.google.com (HELO mail-ig0-f176.google.com) (209.85.213.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 28 Mar 2016 22:22:01 +0000 Received: by mail-ig0-f176.google.com with SMTP id m10so6110igt.1 for ; Mon, 28 Mar 2016 15:22: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=IFKZ9xyyFj34CwBuo5J0tLdTEQKrQWWDF8jmM583Q8M=; b=NlLQykk1XXQCxM5xInBFqDrUUzV6Mjf7oC4r/mZPfWGNt9nkfO7YlDvvhRZa0hZ6EF rimCzeOhvKlYwNQPka11H61kSHssgOgDnVgMu2R4J+8kcqL3EPKP7vhPEJTtIaLtD3lu TdxPZ/iAoi5blEJ3/co1Kb2xEum2jDmojTXsbCfSNPSaOXncRlW9ND+O8EepBLkZ6I1r mdId16mnqoEV7yRgIh2Enrnorz75k53OTlcQgPdnq6Um8D8yyM8roH1tY1I1SSXo6WVr ynS5F4BdXeA0a8MuSuDZ5tEnXFx6xI3ac+Pi78OcLjz/P2kyUhAHwig1fSYf43cSHohA oQkQ== X-Gm-Message-State: AD7BkJIBRPkCKwqYhGQPbtasjqLyqkTLvaQ52WR/3v5sUf6kn71f+h4+NdirfTFRR/KRyffMHDfmKGxccg+5Cw== MIME-Version: 1.0 X-Received: by 10.50.112.71 with SMTP id io7mr11573774igb.50.1459203719891; Mon, 28 Mar 2016 15:21:59 -0700 (PDT) Received: by 10.36.200.8 with HTTP; Mon, 28 Mar 2016 15:21:59 -0700 (PDT) In-Reply-To: References: <9106B2FB-BB06-413A-A04D-EEFB992784FA@apple.com> <9EFBBDCE-4054-4867-B3E9-9DFE216A234F@apple.com> Date: Mon, 28 Mar 2016 22:22:00 -0000 Message-ID: Subject: Re: Preventing preemption of 'protected' symbols in GNU ld 2.26 From: Cary Coutant To: Joe Groff Cc: "H.J. Lu" , Binutils Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00350.txt.bz2 > Did you look at what the costs were in startup time and dirty pages by using > copy relocations? What do you do if the size of the definition changes in a > new version of the library? There wouldn't be a measurable cost in dirty pages; the copied objects are simply allocated in bss in the executable. Startup time wasn't a concern either, simply because COPY relocations weren't the real issue. We had to support an *occasional* COPY relocation in order to enable -fPIE to access globals directly rather than through the GOT. These would be the same COPY relocations that the apps would have already been using in non-PIE mode (things like stdin, stdout, and stderr, e.g.). The size of an object is baked into the ABI when a COPY relocation is used, so any change in size is an ABI change (often handled, as HJ pointed out, with versioning). For a lot of common COPY relocations, that's not really an issue, because both the size and the layout are baked in through macros like putc() and getc(). -cary