This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]