This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: fix crashing bug in 'ld -L. --help'


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]