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 -z lazy and -z now


I committed this patch to add the -z lazy and -z now options to gold.

Ian


2009-06-22  Ian Lance Taylor  <ian@airs.com>

	PR 10141
	* options.h (class General_options): Add -z lazy and -z now.  Sort
	-z options into alphabetical order.
	* layout.cc (Layout::finish_dynamic_section): Handle -z now.


Index: options.h
===================================================================
RCS file: /cvs/src/src/gold/options.h,v
retrieving revision 1.99
diff -u -r1.99 options.h
--- options.h	5 Jun 2009 21:32:56 -0000	1.99
+++ options.h	22 Jun 2009 20:22:09 -0000
@@ -896,19 +896,20 @@
               NULL);
   DEFINE_bool(execstack, options::DASH_Z, '\0', false,
               N_("Mark output as requiring executable stack"), NULL);
-  DEFINE_uint64(max_page_size, options::DASH_Z, '\0', 0,
-                N_("Set maximum page size to SIZE"), N_("SIZE"));
-  DEFINE_bool(noexecstack, options::DASH_Z, '\0', false,
-              N_("Mark output as not requiring executable stack"), NULL);
   DEFINE_bool(initfirst, options::DASH_Z, '\0', false,
 	      N_("Mark DSO to be initialized first at runtime"),
 	      NULL);
   DEFINE_bool(interpose, options::DASH_Z, '\0', false,
 	      N_("Mark object to interpose all DSOs but executable"),
 	      NULL);
+  DEFINE_bool(lazy, options::DASH_Z, '\0', false,
+	      N_("Mark object for lazy runtime binding (default)"),
+	      NULL);
   DEFINE_bool(loadfltr, options::DASH_Z, '\0', false,
 	      N_("Mark object requiring immediate process"),
 	      NULL);
+  DEFINE_uint64(max_page_size, options::DASH_Z, '\0', 0,
+                N_("Set maximum page size to SIZE"), N_("SIZE"));
   DEFINE_bool(nodefaultlib, options::DASH_Z, '\0', false,
 	      N_("Mark object not to use default search paths"),
 	      NULL);
@@ -921,12 +922,17 @@
   DEFINE_bool(nodump, options::DASH_Z, '\0', false,
 	      N_("Mark DSO not available to dldump"),
 	      NULL);
-  DEFINE_bool(relro, options::DASH_Z, '\0', false,
-	      N_("Where possible mark variables read-only after relocation"),
-	      N_("Don't mark variables read-only after relocation"));
+  DEFINE_bool(noexecstack, options::DASH_Z, '\0', false,
+              N_("Mark output as not requiring executable stack"), NULL);
+  DEFINE_bool(now, options::DASH_Z, '\0', false,
+	      N_("Mark object for immediate function binding"),
+	      NULL);
   DEFINE_bool(origin, options::DASH_Z, '\0', false,
 	      N_("Mark DSO to indicate that needs immediate $ORIGIN "
                  "processing at runtime"), NULL);
+  DEFINE_bool(relro, options::DASH_Z, '\0', false,
+	      N_("Where possible mark variables read-only after relocation"),
+	      N_("Don't mark variables read-only after relocation"));
 
  public:
   typedef options::Dir_list Dir_list;
Index: layout.cc
===================================================================
RCS file: /cvs/src/src/gold/layout.cc,v
retrieving revision 1.126
diff -u -r1.126 layout.cc
--- layout.cc	22 Jun 2009 06:51:53 -0000	1.126
+++ layout.cc	22 Jun 2009 20:22:09 -0000
@@ -2835,6 +2835,8 @@
     flags |= elfcpp::DF_STATIC_TLS;
   if (parameters->options().origin())
     flags |= elfcpp::DF_ORIGIN;
+  if (parameters->options().now())
+    flags |= elfcpp::DF_BIND_NOW;
   odyn->add_constant(elfcpp::DT_FLAGS, flags);
 
   flags = 0;
@@ -2858,6 +2860,8 @@
 	       | elfcpp::DF_1_NOOPEN);
   if (parameters->options().origin())
     flags |= elfcpp::DF_1_ORIGIN;
+  if (parameters->options().now())
+    flags |= elfcpp::DF_1_NOW;
   if (flags)
     odyn->add_constant(elfcpp::DT_FLAGS_1, flags);
 }

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