This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Fixes "readelf -s --wide" not returning an error status or help message.
- From: Nick Clifton <nickc at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 10 Mar 2015 13:45:41 -0000
- Subject: [binutils-gdb] Fixes "readelf -s --wide" not returning an error status or help message.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b6370efb1efe39e62abd01e95c7957834c8bdf47
commit b6370efb1efe39e62abd01e95c7957834c8bdf47
Author: Nick Clifton <nickc@redhat.com>
Date: Tue Mar 10 13:44:51 2015 +0000
Fixes "readelf -s --wide" not returning an error status or help message.
PR binutils/18101
* readelf.c (parse_args): Enhance check for nothing to do by
accounting for the --wide option.
Diff:
---
binutils/ChangeLog | 4 ++++
binutils/readelf.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 550111b..062cec4 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,9 @@
2015-03-10 Nick Clifton <nickc@redhat.com>
+ PR binutils/18101
+ * readelf.c (parse_args): Enhance check for nothing to do by
+ accounting for the --wide option.
+
PR binutils/17636
* objcopy.c (copy_object): Avoid calling fatal as that does not
allow the parent to clean up temporary files.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index d0b66ae..771d29d 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -4232,7 +4232,7 @@ parse_args (int argc, char ** argv)
&& !do_section_groups && !do_archive_index
&& !do_dyn_syms)
usage (stderr);
- else if (argc < 3)
+ else if (argc < 3 || (do_wide && argc < 4))
{
warn (_("Nothing to do.\n"));
usage (stderr);