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: Add some minor options


The GNU linker supports the options -assert, -g, and -i.  These
options do nothing.  However, according to PR 10980, there are
packages which nevertheless use these options.  This patch adds these
no-op options to gold.

The GNU linker also supports the -G option which in some cases is a
synonym for --shared.  In other cases it sets the size at which data
items should be moved into the small data section.  Fortunately no
current gold target cares about the latter case yet, so for now I've
just made -G be a short option for --shared.

Committed to mainline.

Ian


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

	PR 10980
	* options.h (class General_options): Add -G as a short version of
	--shared.  Add no-op options -assert, -g, and -i.


Index: options.h
===================================================================
RCS file: /cvs/src/src/gold/options.h,v
retrieving revision 1.125
diff -p -u -r1.125 options.h
--- options.h	31 Dec 2009 06:05:49 -0000	1.125
+++ options.h	4 Jan 2010 23:53:33 -0000
@@ -588,6 +588,10 @@ class General_options
               N_("Only set DT_NEEDED for dynamic libs if used"),
               N_("Always DT_NEEDED for dynamic libs"));
 
+  DEFINE_enum(assert, options::ONE_DASH, '\0', NULL,
+	      N_("Ignored"), N_("[ignored]"),
+	      {"definitions", "nodefinitions", "nosymbolic", "pure-text"});
+
   // This should really be an "enum", but it's too easy for folks to
   // forget to update the list as they add new targets.  So we just
   // accept any string.  We'll fail later (when the string is parsed),
@@ -692,9 +696,15 @@ class General_options
   DEFINE_string(fini, options::ONE_DASH, '\0', "_fini",
                 N_("Call SYMBOL at unload-time"), N_("SYMBOL"));
 
+  DEFINE_bool(g, options::EXACTLY_ONE_DASH, '\0', false,
+	      N_("Ignored"), NULL);
+
   DEFINE_string(soname, options::ONE_DASH, 'h', NULL,
                 N_("Set shared library name"), N_("FILENAME"));
 
+  DEFINE_bool(i, options::EXACTLY_ONE_DASH, '\0', false,
+	      N_("Ignored"), NULL);
+
   DEFINE_double(hash_bucket_empty_fraction, options::TWO_DASHES, '\0', 0.0,
 		N_("Min fraction of empty buckets in dynamic hash"),
 		N_("FRACTION"));
@@ -845,7 +855,7 @@ class General_options
               N_("Use less memory and more disk I/O "
                  "(included only for compatibility with GNU ld)"), NULL);
 
-  DEFINE_bool(shared, options::ONE_DASH, '\0', false,
+  DEFINE_bool(shared, options::ONE_DASH, 'G', false,
               N_("Generate shared library"), NULL);
 
   DEFINE_bool(Bshareable, options::ONE_DASH, '\0', false,

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