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'


>> ? ? ? * options.cc (help): Don't print pseudo-option '-z'.

Here's an alternative fix. This one keeps the pseudo-option from
registering itself in the global list of options, simply by setting
the helpstring to NULL.

-cary


   * options.cc (parse_short_option): Keep dash_z from registering itself.


Index: options.cc
===================================================================
RCS file: /cvs/src/src/gold/options.cc,v
retrieving revision 1.83
diff -u -p -r1.83 options.cc
--- options.cc	28 Feb 2009 04:39:57 -0000	1.83
+++ options.cc	6 Mar 2009 18:43:59 -0000
@@ -587,7 +587,7 @@ parse_short_option(int argc, const char*

   // We handle -z as a special case.
   static gold::options::One_option dash_z("", gold::options::DASH_Z,
-                                          'z', "", "-z", "Z-OPTION", false,
+                                          'z', "", NULL, "Z-OPTION", false,
 					  NULL);
   gold::options::One_option* retval = NULL;
   if (this_argv[pos_in_argv_i] == 'z')


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