2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
[deliverable/binutils-gdb.git] / gold / options.h
index f14582e00b440fa36ef69a09447c3e56742027f3..ef27de1099e5d0e12c9980bc6a53c1a6efe7e9e0 100644 (file)
@@ -687,6 +687,9 @@ class General_options
              N_("Treat warnings as errors"),
              N_("Do not treat warnings as errors"));
 
+  DEFINE_string(fini, options::ONE_DASH, '\0', "_fini",
+                N_("Call SYMBOL at unload-time"), N_("SYMBOL"));
+
   DEFINE_string(soname, options::ONE_DASH, 'h', NULL,
                 N_("Set shared library name"), N_("FILENAME"));
 
@@ -714,9 +717,18 @@ class General_options
   DEFINE_special(incremental_unknown, options::TWO_DASHES, '\0',
                  N_("Use timestamps to check files (default)"), NULL);
 
+  DEFINE_string(init, options::ONE_DASH, '\0', "_init",
+                N_("Call SYMBOL at load-time"), N_("SYMBOL"));
+
   DEFINE_special(just_symbols, options::TWO_DASHES, '\0',
                  N_("Read only symbol values from FILE"), N_("FILE"));
 
+  DEFINE_bool(keep_files_mapped, options::TWO_DASHES, '\0',
+             sizeof(void*) >= 8,
+              N_("Map whole files to memory (default on 64-bit hosts)"),
+              N_("Map relevant file parts to memory (default on 32-bit "
+                 "hosts)"));
+
   DEFINE_special(library, options::TWO_DASHES, 'l',
                  N_("Search for library LIBNAME"), N_("LIBNAME"));
 
@@ -757,6 +769,12 @@ class General_options
   DEFINE_string(oformat, options::EXACTLY_TWO_DASHES, '\0', "elf",
                N_("Set output format"), N_("[binary]"));
 
+  DEFINE_bool(pie, options::ONE_DASH, '\0', false,
+             N_("Create a position independent executable"), NULL);
+  DEFINE_bool_alias(pic_executable, pie, options::TWO_DASHES, '\0',
+                   N_("Create a position independent executable"), NULL,
+                   false);
+
 #ifdef ENABLE_PLUGINS
   DEFINE_special(plugin, options::TWO_DASHES, '\0',
                  N_("Load a plugin library"), N_("PLUGIN"));
@@ -1003,7 +1021,7 @@ class General_options
   // the output is position-independent or not.
   bool
   output_is_position_independent() const
-  { return this->shared(); }
+  { return this->shared() || this->pie(); }
 
   // Return true if the output is something that can be exec()ed, such
   // as a static executable, or a position-dependent or
@@ -1011,13 +1029,7 @@ class General_options
   // object file.
   bool
   output_is_executable() const
-  { return !this->shared() || this->output_is_pie(); }
-
-  // Return true if the output is a position-independent executable.
-  // This is currently not supported.
-  bool
-  output_is_pie() const
-  { return false; }
+  { return !this->shared() && !this->relocatable(); }
 
   // This would normally be static(), and defined automatically, but
   // since static is a keyword, we need to come up with our own name.
This page took 0.023595 seconds and 4 git commands to generate.