[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: Rafael Espíndola <rafael.espindola@gmail.com>
- Subject: Re: Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section
- From: Sriraman Tallam <tmsriram@google.com>
- Date: Thu, 27 Apr 2017 14:21:42 -0700
- 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>, 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=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==
- In-reply-to: <CAG3jReKcwAOzm9UYmUUHU_peNRoK3u=sLd5FqKaca30zD29bew@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
- References: <CAAs8HmyKSjqo2GKD0TQy8R80sVcXB3mNORMpXZ_a6sDdmWQOdg@mail.gmail.com> <CAG3jReKcwAOzm9UYmUUHU_peNRoK3u=sLd5FqKaca30zD29bew@mail.gmail.com>
- Sender: gnu-gabi-owner@sourceware.org
On Thu, Apr 27, 2017 at 1:04 PM, Rafael Espíndola
<rafael.espindola@gmail.com> wrote:
> On 25 April 2017 at 13:12, Sriraman Tallam <tmsriram@google.com> 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