[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section
- To: Sriraman Tallam <tmsriram@google.com>
- Subject: Re: Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section
- From: Markus Trippelsdorf <markus@trippelsdorf.de>
- Date: Wed, 26 Apr 2017 07:46:36 +0200
- Authentication-results: sourceware.org; auth=none
- Cc: gnu-gabi@sourceware.org, binutils <binutils@sourceware.org>, Xinliang David Li <davidxl@google.com>, Cary Coutant <ccoutant@gmail.com>, Sterling Augustine <saugustine@google.com>, Paul Pluzhnikov <ppluzhnikov@google.com>, Ian Lance Taylor <iant@google.com>, "H.J. Lu" <hjl.tools@gmail.com>, Rahul Chaudhry <rahulchaudhry@google.com>, Luis Lozano <llozano@google.com>, Rafael Espíndola <rafael.espindola@gmail.com>, Peter Collingbourne <pcc@google.com>, Rui Ueyama <ruiu@google.com>
- Delivered-to: listarch-gnu-gabi@sourceware.org
- Delivered-to: mailing list gnu-gabi@sourceware.org
- Dkim-signature: v=1; a=rsa-sha256; c=simple; d=trippelsdorf.de; h=date :from:to:cc:subject:message-id:mime-version:content-type :in-reply-to; s=k1; bh=1ogopno22LXQ+n/Lx5Qn8cBO2fmGTsJoZrHGpNDPv Sk=; b=EEVw+g/W3Ek040pVePAOo8uVbXkk2fJay5T0R5x6UTndXZfLK/EUOZTa7 oJMXs/pveoFMNRBVFXCLA0mOiamE/uo/o4gmz6VTEVC6EOgjGnUuQifEa727sOiL uJOMvMuMA3BowznQzsxf0eKUnQz/HWmqFVyW8uaMcrO0w6Dnzg=
- In-reply-to: <CAJimCsFzz1qy9qCcvaMRtgcRv9oNE7C-+3Ku9JcjBGOvqtWrVg@mail.gmail.com>
- List-help: <mailto:gnu-gabi-help@sourceware.org>
- List-id: <gnu-gabi.sourceware.org>
- List-post: <mailto:gnu-gabi@sourceware.org>
- List-subscribe: <mailto:gnu-gabi-subscribe@sourceware.org>
- Mailing-list: contact gnu-gabi-help@sourceware.org; run by ezmlm
- Sender: gnu-gabi-owner@sourceware.org
On 2017.04.25 at 21:06 -0700, Cary Coutant wrote:
> > Idea A: Shrinking the size of the dynamic relocations
>
> In a RELATIVE relocation, the r_offset field is really the only field
> of interest. The symbol and addend are not used -- the dynamic loader
> simply adjusts the address at the given offset by the relocation
> factor for the load module. Thus, it truly is possible to reduce these
> relocations to just the one word.
>
> Simon Baldwin did a lot of work on this a few years ago for Chromium,
> writing a post-link utility to extract all the RELATIVE relocations
> and rewrite them to a new section.
FYI Mike Hommey did something similar for Firefox and wrote about here:
https://glandium.org/blog/?p=1177
--
Markus