Fixes "readelf -s --wide" not returning an error status or help message.
authorNick Clifton <nickc@redhat.com>
Tue, 10 Mar 2015 13:44:51 +0000 (13:44 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 10 Mar 2015 13:44:51 +0000 (13:44 +0000)
PR binutils/18101
* readelf.c (parse_args): Enhance check for nothing to do by
accounting for the --wide option.

binutils/ChangeLog
binutils/readelf.c

index 550111b3ae33cbe8e2aab724698153eceeb2e32c..062cec4eed45ea4a7f6a447c3b78909a78a1eff2 100644 (file)
@@ -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.
index d0b66aedf443579d4161e76f7d3984a805a831db..771d29dbce600b8a1a312732aed138f8bc8224b2 100644 (file)
@@ -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);
This page took 0.033328 seconds and 4 git commands to generate.