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 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
> relocations,

Rather, the Itanium runtime architecture itself provides a way to reduce
them.

> 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.

(HP-UX/Linux)
Total:    12224/38311
RELATIVE: 18/6397

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)

--
Supra


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