From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79697 invoked by alias); 26 Apr 2017 05:47:50 -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 70680 invoked by uid 89); 26 Apr 2017 05:46:42 -0000 Authentication-Results: sourceware.org; auth=none 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=ham version=3.3.2 spammy=H*MI:sk:CAJimCs, H*i:sk:CAJimCs, H*i:sk:3Ku9Jcj, H*MI:sk:3Ku9Jcj X-HELO: mail.ud10.udmedia.de Received: from ud10.udmedia.de (HELO mail.ud10.udmedia.de) (194.117.254.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Apr 2017 05:46:39 +0000 Received: (qmail 22072 invoked from network); 26 Apr 2017 07:46:36 +0200 Received: from ip5b405f78.dynamic.kabel-deutschland.de (HELO x4) (ud10?360p3@91.64.95.120) by mail.ud10.udmedia.de with ESMTPSA (ECDHE-RSA-AES256-SHA encrypted, authenticated); 26 Apr 2017 07:46:36 +0200 Date: Wed, 26 Apr 2017 05:47: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-04/txt/msg00236.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