[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: Rafael Espíndola <rafael.espindola@gmail.com>
- Date: Thu, 27 Apr 2017 16:04:16 -0400
- 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=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=rSERFHoQMjd9WPK+P0XZZhKIgZK/RsfWooZuLKRTTaw=; b=YLKdHV0/s4SOpIdJ+a26pEgXBTVjw5eHSo4yDr4HMjs8j7wd7bqSFYJvepAuIIjdsH vReBSvtM0N/PvLqnoeXhTdMiCasiI+HC0815FfFZLHgqFOdmfGsDPaAUprgQg8/Z7bog twXqHmGYyQRr6/4TrCyg/4H+hXQjG2Puz4tmVJ6P6wINd6RABL9e0PJgZKcv3q1cLJMb pwdsLDqzndga3cPPfizVdVIhvqsaTqOP9wHgoiWdciLG1RD04E85VuUZzDkFT+/c3yDx pYpk0+u4pVI7jTUVXV2M3vd3Nl95st5jGxjIlr60iZqXDCDuFry0J7TGMYeeSK3qtWwr P+Hw==
- In-reply-to: <CAAs8HmyKSjqo2GKD0TQy8R80sVcXB3mNORMpXZ_a6sDdmWQOdg@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>
- Sender: gnu-gabi-owner@sourceware.org
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.
* The startup time is a problem and a compact table makes the dynamic
linker faster.
* The memory usage is a problem.
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