From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81185 invoked by alias); 26 Apr 2017 05:48:20 -0000 Mailing-List: contact gnu-gabi-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: gnu-gabi-owner@sourceware.org Received: (qmail 70681 invoked by uid 89); 26 Apr 2017 05:46:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable version=3.3.2 spammy=H*MI:sk:CAJimCs, H*i:sk:CAJimCs, H*i:sk:3Ku9Jcj, H*MI:sk:3Ku9Jcj X-Spam-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mail.ud10.udmedia.de 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= Date: Sun, 01 Jan 2017 00:00:00 -0000 From: Markus Trippelsdorf To: Sriraman Tallam Cc: gnu-gabi@sourceware.org, binutils , Xinliang David Li , Cary Coutant , Sterling Augustine , Paul Pluzhnikov , Ian Lance Taylor , "H.J. Lu" , Rahul Chaudhry , Luis Lozano , Rafael =?iso-8859-1?Q?Esp=EDndola?= , Peter Collingbourne , Rui Ueyama Subject: Re: Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section Message-ID: <20170426054636.GB31793@x4> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SW-Source: 2017-q2/txt/msg00004.txt.bz2 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