[PATCH] readelf: Warn zero-sized relocation sections
Jan Beulich
jbeulich@suse.com
Mon Apr 20 05:33:08 GMT 2020
On 17.04.2020 17:46, Nick Clifton wrote:
> I am of a mind to allow this patch, given that one of readelf's
> main functions is to diagnose problems with ELF files. If these
> warnings really are a problem for users however then we could
> provide an option to filter them out.
While I can see the "diagnose problems" aspect, zero-sized relocation
sections aren't something the ELF standard disallows. So there's no
problem with the ELF files in this case, just a _possible_ problem
with consumers thereof.
> That said, the patch as it currently exists causes lots of new
> failures in the linker testsuite for various targets. Especially
> powerpc64-linux. There may well be others, eg alpha-linux-gnu,
> but my regression tester is still running. The failures are from
> messages like this:
>
> readelf: Warning: Section '.rela.plt': zero-sized relocation section
>
> and
>
> readelf: Warning: Section '.rela.dyn': zero-sized relocation section
Aren't these a good enough indication that zero-sized relocation
sections aren't this unusual, and hence a default-on warning is
going too far?
Jan
More information about the Binutils
mailing list