This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: fix crashing bug in 'ld -L. --help'
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Thu, 05 Mar 2009 21:31:33 -0800
- Subject: Re: PATCH: fix crashing bug in 'ld -L. --help'
- References: <20090306001758.7D5C34824A7@localhost>
csilvers@google.com (Craig Silverstein) writes:
> 2009-03-05 Craig Silverstein <csilvers@google.com>
>
> * options.cc (help): Don't print pseudo-option '-z'.
>
> --cut here--
>
> Index: options.cc
> ===================================================================
> RCS file: /cvs/src/src/gold/options.cc,v
> retrieving revision 1.83
> diff -u -r1.83 options.cc
> --- options.cc 28 Feb 2009 04:39:57 -0000 1.83
> +++ options.cc 6 Mar 2009 00:17:30 -0000
> @@ -144,7 +144,12 @@
>
> std::vector<const One_option*>::const_iterator it;
> for (it = registered_options.begin(); it !=
> registered_options.end(); ++it)
> - (*it)->print();
> + {
> + // The pseudo-flag "dash_z" may have gotten registered ihn
> + // parse_short_options(). Don't print it if we see it.
> + if (!((*it)->dashes == DASH_Z && (*it)->shortname == 'z'))
> + (*it)->print();
> + }
The comment should refer to parse_short_option() (no 's' on options).
OK with that change.
Thanks!
Ian