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.
This commit is contained in:
Nick Clifton 2015-03-10 13:44:51 +00:00
parent cfad873011
commit b6370efb1e
2 changed files with 5 additions and 1 deletions

View 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.

View 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);