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: Roland McGrath <roland at hack dot frob dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 28 Mar 2012 10:50:04 -0700
- Subject: Re: [Patch] Don't relocate compressed sections
> They are not hard to prepare by hand. A robust toolkit should not
> corrupt its own data just because they are unusual.
Sure. But where they come from in practice speaks to whether we actually
want to try to support them (about which I'm somewhat dubious) or whether
we just need to be robust to their presence as bogus input.
> Does the code correctly treat the "end of the section" values as being
> pre-compression vs. post-compression?
I can't quite parse exactly what you're asking here. But the answer you're
probably looking for is that the check I mentioned is based on the size of
the ELF section data that the reloc would be applied to (what appears in
the file). So it is correct in the sense that it is checking the sanity of
what it would actually do (which would be to try to apply the reloc to the
compressed data) and thus there is, as I said, no possibility of the
"clobber something outside the section" notion that you asked about.
Thanks,
Roland