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

Ian Lance Taylor iant@google.com
Fri Mar 6 05:31:00 GMT 2009


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



More information about the Binutils mailing list