[Patch] Don't relocate compressed sections

Mark Wielaard mjw at redhat.com
Wed Mar 28 21:10:03 UTC 2012


On Wed, Mar 28, 2012 at 01:44:23PM -0700, Roland McGrath wrote:
> > > As I've said at least twice now, I want to see the actual example of how
> > > something produces these files before making any decisions.
> > 
> > https://bugzilla.redhat.com/show_bug.cgi?id=807053#c0 
> 
> Ok, so gas now has an option to produce them that way.
> That's pretty inane, but so it is.
> 
> How does the rest of binutils deal with this?  Does it decompress .zfoo and
> pretend it was called .foo and then apply a .rel.foo section's relocs to
> it?  (I guess the name of the reloc section doesn't actually matter, if
> it's just following the sh_info pointer as it should.)

Yes, that is how I believe gold is doing it. It maps compressed input
section names to their uncompressed output name counterpart, decompresses
the input section into the output section and applies the relocations on
the uncompressed output data.

The use case is to make the "bandwidth" between compiler and linker as
small as possible. Which apparently helps if network or disk is a
bottleneck between the two.

Cheers,

Mark


More information about the elfutils-devel mailing list