This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch 6/7] [gold] Add initial source code for dwp utility.
On Fri, Oct 19, 2012 at 3:12 PM, Cary Coutant <ccoutant@google.com> wrote:
> +extern int optind;
> +extern char* optarg;
These are in getopt.h, you don't need them here.
> +struct option dwp_options[] =
> + {
> + { "verbose", no_argument, NULL, 'v' },
> + { "output", required_argument, NULL, 'o' },
> + { NULL, 0, NULL, 0 }
The GNU standards require you to add --version and --help options, and
their output has to follow a certain format. See
http://www.gnu.org/prep/standards/standards.html#Command_002dLine-Interfaces
for details. For --version you may be able to share version.cc with
gold, or copy the code in binutils/version.c. For --help you'll want
the bug reporting address REPORT_BUGS_TO in ../bfd/bfdver.h. Make
sure that --help output goes to stdout, although reporting a usage
error goes to stderr.
You can do all this trivia in a followup patch.
This patch is OK.
Thanks.
Ian