Re: [PATCH] readelf: Change some errors to warnings

"H.J. Lu" <[email protected]>
Newsgroups gmane.comp.gnu.binutils
Message-ID <CAMe9rOqU2sJ7uErJXsjj9LyCv-f4uohgwNJGuvKFgVJRbLUNeg@mail.gmail.com>
On Sun, Aug 9, 2026 at 4:37 PM Alan Modra <[email protected]> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.