[Patch] Don't relocate compressed sections

Roland McGrath roland at hack.frob.com
Wed Mar 28 17:50:04 UTC 2012


> 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



More information about the elfutils-devel mailing list