http://sourceware.org/bugzilla/show_bug.cgi?id=13125
Bug #: 13125 Summary: readelf does not exit 0 when DWARF information requested but none present Product: binutils Version: 2.22 (HEAD) Status: NEW Severity: normal Priority: P2 Component: binutils AssignedTo: unassig...@sources.redhat.com ReportedBy: jonstan...@gmail.com Classification: Unclassified If you request DWARF data from a file using readelf (for example using -wi) and it does not exist, readelf exits with status 0 rather than an error. I've reproduced this going pretty far back in binutils (back to whatever was shipped in RHEL5) and all the way up to current HEAD. It also provides no diagnostic information to indicate that there is no information to display. $ ./readelf -wi /bin/ls $ echo $? 0 $ ./readelf --version GNU readelf (GNU Binutils) 2.21.53.20110823 Copyright 2011 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty. $ Reference the elfutils version of readelf, which does both of these things: $ eu-readelf -winfo /bin/ls eu-readelf: cannot get debug context descriptor: No DWARF information found $ echo $? 1 -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils