This is the mail archive of the
mailing list for the binutils project.
Re: Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section
- From: Suprateeka R Hegde <hegdesmailbox at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>, David Edelsohn <dje dot gcc at gmail dot com>, Rafael Avila de Espindola <rafael dot espindola at gmail dot com>
- Cc: Binutils Development <binutils at sourceware dot org>, Alan Modra <amodra at gmail dot com>, Cary Coutant <ccoutant at gmail dot com>, Sriraman Tallam <tmsriram at google dot com>, gnu-gabi at sourceware dot org, Xinliang David Li <davidxl at google dot com>, Sterling Augustine <saugustine at google dot com>, Paul Pluzhnikov <ppluzhnikov at google dot com>, Ian Lance Taylor <iant at google dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, Rahul Chaudhry <rahulchaudhry at google dot com>, Luis Lozano <llozano at google dot com>, Peter Collingbourne <pcc at google dot com>, Rui Ueyama <ruiu at google dot com>
- Date: Tue, 2 May 2017 22:47:13 +0530
- Subject: Re: Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section
- Authentication-results: sourceware.org; auth=none
- References: <CAGWvnynFwXFGLj3tAVgDatn0zmuHcWHyRNuDvR+wRZCXLnar_A@mail.gmail.com> <firstname.lastname@example.org> <CAGWvnynEe3QkhDMGc=Tx8Vr44egtv3xLuh1yiVcAhv+e3GLtZg@mail.gmail.com> <email@example.com> <firstname.lastname@example.org>
- Reply-to: hegdesmailbox at gmail dot com
On 02-May-2017 12:05 AM, Florian Weimer wrote:
> On 05/01/2017 08:28 PM, Suprateeka R Hegde wrote:
>> So the ratio shows ~96% is RELATIVE reloc. And only ~4% others. This is
>> not the case on HP-UX/Itanium. But as I said, this comparison does not
>> make sense as the runtime architecture and ISA are totally different.
> It could be that HP-UX was written in a way to reduce relative
Rather, the Itanium runtime architecture itself provides a way to reduce
> or that the final executables aren't actually PIC anymore.
I was referring to shlibs (PIC) on HP-UX and it was implicit in my mind.
Sorry for that.
I just built a large C++ shlib both on HP-UX/Itanium with our aCC
compiler and Linux x86-64 using GCC-6.2. The sources are almost same
with only a couple of lines differing between platforms.
I will try to check the reason for such a huge difference in RELATIVE
reloc count. It might be useful for this discussion (just a guess)