[PATCH] readelf: Change some errors to warnings

H.J. Lu hjl.tools@gmail.com
Sun Aug 9 09:05:28 GMT 2026


On Sun, Aug 9, 2026 at 4:37 PM Alan Modra <amodra@gmail.com> wrote:
>
> On Sun, Aug 09, 2026 at 08:25:01AM +0800, H.J. Lu wrote:
> > Change readelf to return error if there are errors in inputs.
>
> Why?  Do you want to implement a silent readelf mode where it
> validates an ELF input, returning validity via exit status?  If so,
> then why say that bad leb128 values are OK?  The patch doesn't make
> sense.

Normally there is no point to continue when there are errors in input.
In both cases here, the values are ignored and readelf keeps going.
These aren't errors which prevent readelf from continuing.

> readelf non-zero exit status is currently for cases where readelf
> can't process the file for some reason.
>
> --
> Alan Modra



-- 
H.J.


More information about the Binutils mailing list