[PATCH] readelf: Warn zero-sized relocation sections
Nick Clifton
nickc@redhat.com
Tue Apr 21 10:01:21 GMT 2020
Hi Guys,
> Time to chime in?
Go ahead... :-)
> I'd like to voice my support for *not* have readelf emit an
> empty-section warning by default (whether a relocation section
> or not). Nonetheless it would be very useful as a separate,
> non-default, option, say for generally fishy contents.
>
> If it's added anyway, please also add an option to not emit the
> warning.
I have been thinking about this. I was wondering what the best form
of such an option would be. I see three different possibilities:
* Just warn about everything, and do not have an option.
* Have a --enable-warnings option which is off by default
and which disables *all* warnings unless enabled.
This would mean changing the current behaviour of readelf...
* Have a --enable-extra-warnings option which enables the zero
sized section test but no others. (For now - in the future
I would envision us adding more tests). For this path I
think that it would also make sense to warn about any zero
sized section that does not have the SHT_NOBITS type.
Or maybe:
* Have a --enable-lint (or some such name) which enables testing
for conformance to the ELF standard, (plus strangeness things
like zero sized sections). This would count as a command option
in its own right, so that unless another option is provided
then only the warning/error messages would be displayed.
What do people think ?
Cheers
Nick
More information about the Binutils
mailing list