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]

[RFA] Add some trivial gold options for ld compatibility


2009-01-20  Chris Faylor <me.sourceware@sourceware.org>

	* options.h (General_options::gc_sections): Define as a no-op for now.
	(General_options::no_keep_memory): Ditto.
	(General_options::Bshareable): Define.
	* options.cc (General_options::finalize): Honor -Bshareable.


Index: gold/options.cc
===================================================================
RCS file: /cvs/src/src/gold/options.cc,v
retrieving revision 1.80
diff -d -u -p -r1.80 options.cc
--- gold/options.cc	5 Dec 2008 21:34:50 -0000	1.80
+++ gold/options.cc	20 Jan 2009 19:12:28 -0000
@@ -696,6 +696,9 @@ General_options::finalize()
   if (this->strip_debug_non_line())
     this->set_strip_debug_gdb(true);
 
+  if (this->Bshareable())
+    this->set_shared(true);
+
   // If the user specifies both -s and -r, convert the -s to -S.
   // -r requires us to keep externally visible symbols!
   if (this->strip_all() && this->relocatable())
Index: gold/options.h
===================================================================
RCS file: /cvs/src/src/gold/options.h,v
retrieving revision 1.91
diff -d -u -p -r1.91 options.h
--- gold/options.h	18 Dec 2008 01:53:38 -0000	1.91
+++ gold/options.h	20 Jan 2009 19:12:28 -0000
@@ -581,6 +581,10 @@ class General_options
 	      N_("Check segment addresses for overlaps (default)"),
 	      N_("Do not check segment addresses for overlaps"));
 
+  DEFINE_bool(gc_sections, options::TWO_DASHES, '\0', true,
+	      N_("(noop) Garbage collect sections"),
+	      N_("(noop) Do not Garbage collect sections"));
+
 #ifdef HAVE_ZLIB_H
   DEFINE_enum(compress_debug_sections, options::TWO_DASHES, '\0', "none",
               N_("Compress .debug_* sections in the output file"),
@@ -754,9 +762,15 @@ class General_options
   DEFINE_bool(strip_lto_sections, options::TWO_DASHES, '\0', true,
               N_("Strip LTO intermediate code sections"), NULL);
 
+  DEFINE_bool(no_keep_memory, options::TWO_DASHES, 's', false,
+              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,
               N_("Generate shared library"), NULL);
 
+  DEFINE_bool(Bshareable, options::ONE_DASH, '\0', false,
+              N_("Generate shared library"), NULL);
+
   // This is not actually special in any way, but I need to give it
   // a non-standard accessor-function name because 'static' is a keyword.
   DEFINE_special(static, options::ONE_DASH, '\0',


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