This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [Patch] Don't relocate compressed sections
- From: Cary Coutant <ccoutant at google dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 28 Mar 2012 15:20:17 -0700
- Subject: Re: [Patch] Don't relocate compressed sections
> Ok, so gas now has an option to produce them that way.
> That's pretty inane, but so it is.
Admittedly, a more principled approach would have been to add an
SHF_COMPRESSED flag to ELF without changing the section name, but the
".zdebug_" approach matches what was done a few years ago for ET_EXEC
files. It's also easier to handle it that way in the non-ELF file
formats.
> 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?
Yes. There's a BFD flag that lets the client specify whether it wants
to see the decompressed contents or not. If you're asking for
relocated section contents, it'll decompress first.
> (I guess the name of the reloc section doesn't actually matter, if
> it's just following the sh_info pointer as it should.)
Right.
-cary