HomeFreeBSD

readelf: return error in case of invalid file

Description

readelf: return error in case of invalid file

GNU readelf exits with an error for a number of invalid file cases.
Previously ELF Tool Chain readelf always exited with 0. Now we exit 1
upon detecting an error with one or more input files, but in any case
all of them are processed.

This should catch common failure cases. We still do not report an error
for some types of malformed ELF files, but this is consistent with GNU
readelf.

PR: 252727
Reviewed by: jkoshy, markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29377

Details

Provenance
emasteAuthored on Apr 5 2021, 1:01 AM
Reviewer
markj
Differential Revision
D29377: readelf: return error in case of invalid file
Parents
rG6f2addd83881: nfsd: fix BindConnectionToSession so that it clears "cb path down"
Branches
Unknown
Tags
Unknown