[PATCH] readelf: Warn zero-sized relocation sections

Hans-Peter Nilsson hp@bitrange.com
Fri Apr 24 16:20:56 GMT 2020


On Fri, 24 Apr 2020, Nick Clifton wrote:

> Hi Guys,
>
>   OK, here is a first draft of a patch to implement a checking mode
>   for readelf.  It incorporates H.J.'s zero-size section test, although
>   I have extended it to cover any SHT_PROGBITS section as well.  (Mainly
>   because it makes writing a test case much easier).
>
>   One thing that the patch does not do, but which maybe it should, is
>   disable the normal non-warning output when the checking mode is enabled.
>   The effect can be achieved by redirecting stdout to the null device
>   of course, but I appreciate that this is not always possible/easy to do.
>
>   Anyway - comments ?

LGTM!

brgds, H-P


More information about the Binutils mailing list