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]

gold patch committed: Use DEFINE_bool_alias


I forgot about DEFINE_bool_alias, which is the right way to handle the
fact that --allow-multiple-definition and -z muldefs are the same
option under different names.

Ian


2010-01-05  Ian Lance Taylor  <iant@google.com>

	* options.h (class General_options): Use DEFINE_bool_alias for
	allow_multiple_definition.
	* resolve.cc (Symbol_table::should_override): Don't test
	allow_multiple_definition.


Index: options.h
===================================================================
RCS file: /cvs/src/src/gold/options.h,v
retrieving revision 1.129
diff -u -p -r1.129 options.h
--- options.h	5 Jan 2010 21:52:51 -0000	1.129
+++ options.h	5 Jan 2010 22:54:46 -0000
@@ -584,9 +584,9 @@ class General_options
 	      N_("Not supported"),
 	      N_("Do not copy DT_NEEDED tags from shared libraries"));
 
-  DEFINE_bool(allow_multiple_definition, options::TWO_DASHES, '\0', false,
-	      N_("Allow multiple definitions of symbols"),
-	      N_("Do not allow multiple definitions"));
+  DEFINE_bool_alias(allow_multiple_definition, muldefs, options::TWO_DASHES,
+		    '\0', N_("Allow multiple definitions of symbols"),
+		    N_("Do not allow multiple definitions"), false);
 
   DEFINE_bool(allow_shlib_undefined, options::TWO_DASHES, '\0', false,
               N_("Allow unresolved references in shared libraries"),
Index: resolve.cc
===================================================================
RCS file: /cvs/src/src/gold/resolve.cc,v
retrieving revision 1.49
diff -u -p -r1.49 resolve.cc
--- resolve.cc	5 Jan 2010 05:56:28 -0000	1.49
+++ resolve.cc	5 Jan 2010 22:54:46 -0000
@@ -1,6 +1,6 @@
 // resolve.cc -- symbol resolution for gold
 
-// Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -440,8 +440,7 @@ Symbol_table::should_override(const Symb
           || (object != NULL && object->just_symbols()))
         return false;
 
-      if (!parameters->options().allow_multiple_definition()
-	  && !parameters->options().muldefs())
+      if (!parameters->options().muldefs())
 	Symbol_table::report_resolve_problem(true,
 					     _("multiple definition of '%s'"),
 					     to, defined, object);

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