From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114993 invoked by alias); 27 Apr 2017 21:21:45 -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 114970 invoked by uid 89); 27 Apr 2017 21:21:44 -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=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=shipping X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mail-it0-f50.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=JMshg+KsZfvwm1+M3AL5PvGgQxQT0fHn24/T+3ZB7ho=; b=Ueup+2UBntOhKaYpvIPLaXuCOAWI6cC4t+pWtv/MFX1vHdaF9tptPfVnzVzWmfm+R7 LQ28HiPdY2fIDDwHWAI9ZfVwdZsv7d5Xo+6dvI2BQ/zojrPzH6r+D+blpkmXtGhd8pzm tfyKjBlLjeiFsdmIzc7cr53DiL1o77CvOkW9gMTpafbqkA+Q2q0FxnELQGDlj5PgObi7 d09qyo0BxhKCBih1Y+ljMjslAuOxUt8A0FGOeujqQKU5X0E+FRsduz+LyLHti02GuAhw CxFSSq2vJkygfXGtOQQvcNtBS9Bg5sKnxE5dijWbyf6HYdeiUVdVZmRjEGSg0cn3PDFh xKYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=JMshg+KsZfvwm1+M3AL5PvGgQxQT0fHn24/T+3ZB7ho=; b=AoZRuTzRgnI4a3GZXGXqq3pNl6j0ytPIYIcRmMJ3/UJviDim9B7iBFJq9l5mXRGjZJ qUgDzDLFY+ajNCEWTWuGg7VCml90FWosQCVzgOt4dWA/5Y7DuR5XyJ3QbmP8vUNWywhp LcX9bC620WbVZDuc1K3F/HWEqANNpN7IrsfW1NKKrGrCjaaCRhuWcOZTSONcANHY8yn/ eWtX0MwDx+NGSPtcJGp0weyYH+YQY7J/PcntZSTPXfYFqL+m4PhxmUK3Zqse3gf/NCje OZgb79YrzbzgDsHzNoxqi2f9sP9dGvmea9J4ivR/neOITutO8hWUyNtb8yQrIfwqupzs 0MUQ== X-Gm-Message-State: AN3rC/4lMncov0vBsFw9obFpn/JX1/pQypX9O0VNNHvPvTfPRCKKCpbp SUhBaZaxcYccDrg+S9OLYVnMTANdYwgt X-Received: by 10.36.131.65 with SMTP id d62mr6152ite.66.1493328103015; Thu, 27 Apr 2017 14:21:43 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Sriraman Tallam Date: Sun, 01 Jan 2017 00:00:00 -0000 Message-ID: Subject: Re: Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section To: =?UTF-8?Q?Rafael_Esp=C3=ADndola?= 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 , Peter Collingbourne , Rui Ueyama Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2017-q2/txt/msg00008.txt.bz2 On Thu, Apr 27, 2017 at 1:04 PM, Rafael Esp=C3=ADndola wrote: > On 25 April 2017 at 13:12, Sriraman Tallam wrote: >> We identified a problem with PIE executables, more than 5% code size >> bloat compared to non-PIE and we have a few proposals to reduce the >> bloat. Please take a look and let us know what you think. > > Just a bit of terminology, it is not code, it is a read only data. > Why is the table size a problem? I can imagine a few reasons, but it > would be nice to know which one you are trying to solve: > > * The file size itself is a problem for shipping the file. Yes, this is a problem. Certain binaries go in size sensitive partitions and this is a blocker. > * The startup time is a problem and a compact table makes the dynamic > linker faster. I think this is useful for Chrome if it improves it. Looking at the glandium blog seems to suggest it does. > * The memory usage is a problem. Yes, this is a problem too. > > For the last one one thing that could be done is have something like > PT_GNU_RELRO but that tells the dynamic linker to unmmap the region > completely once it is done with the relocations. > > In addition what is done for COFF, the other existing solution I know > is https://wiki.mozilla.org/Elfhack. In the case of mozilla the issue > was just the size of the binary being shipped I think. > > Cheers, > Rafael