Automatic date update in version.in
[deliverable/binutils-gdb.git] / gold / options.cc
index 731061d5654fe44a49c86836488652bb4b130dce..99fb3b6781796e4393fe6f571491f212433b990f 100644 (file)
@@ -1,6 +1,6 @@
 // options.c -- handle command line options for gold
 
-// Copyright (C) 2006-2014 Free Software Foundation, Inc.
+// Copyright (C) 2006-2016 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -345,6 +345,27 @@ General_options::parse_defsym(const char*, const char* arg,
   cmdline->script_options().define_symbol(arg);
 }
 
+void
+General_options::parse_discard_all(const char*, const char*,
+                                  Command_line*)
+{
+  this->discard_locals_ = DISCARD_ALL;
+}
+
+void
+General_options::parse_discard_locals(const char*, const char*,
+                                     Command_line*)
+{
+  this->discard_locals_ = DISCARD_LOCALS;
+}
+
+void
+General_options::parse_discard_none(const char*, const char*,
+                                   Command_line*)
+{
+  this->discard_locals_ = DISCARD_NONE;
+}
+
 void
 General_options::parse_incremental(const char*, const char*,
                                   Command_line*)
@@ -927,7 +948,8 @@ General_options::General_options()
     symbols_to_retain_(),
     section_starts_(),
     fix_v4bx_(FIX_V4BX_NONE),
-    endianness_(ENDIANNESS_NOT_SET)
+    endianness_(ENDIANNESS_NOT_SET),
+    discard_locals_(DISCARD_SEC_MERGE)
 {
   // Turn off option registration once construction is complete.
   gold::options::ready_to_register = false;
@@ -1200,13 +1222,6 @@ General_options::finalize()
   // in the path, as appropriate.
   this->add_sysroot();
 
-  // --dynamic-list overrides -Bsymbolic and -Bsymbolic-functions.
-  if (this->have_dynamic_list())
-    {
-      this->set_Bsymbolic(false);
-      this->set_Bsymbolic_functions(false);
-    }
-
   // Now that we've normalized the options, check for contradictory ones.
   if (this->shared() && this->is_static())
     gold_fatal(_("-shared and -static are incompatible"));
@@ -1263,6 +1278,8 @@ General_options::finalize()
                     "--emit-relocs"));
       if (this->has_plugins())
        gold_fatal(_("incremental linking is not compatible with --plugin"));
+      if (this->relro())
+       gold_fatal(_("incremental linking is not compatible with -z relro"));
       if (this->gc_sections())
        {
          gold_warning(_("ignoring --gc-sections for an incremental link"));
This page took 0.023397 seconds and 4 git commands to generate.