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 Mon, Apr 24, 2017 at 05:22:00PM -0700, Sriraman Tallam via binutils wrote:
> All of these extra dynamic
> relocations are of the ELF type R_X86_64_RELATIVE.

I've noticed that RELATIVE relocs often apply to a run of consecutive
addresses.  You would probably see quite good compression by simply
defining a new reloc to add the base address to an array of words.
The size of the array could be specified by r_addend, r_sym, or
r_type.  (In the latter case you'd be defining a series of relocs).
I think the best choice would be to use r_addend.

-- 
Alan Modra
Australia Development Lab, IBM


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