[GOLD] Edit PowerPC64 ELFv2 function entry code
[binutils-gdb.git] / gold / options.cc
index 7f1f69e0cecd43a93f53c9a6dd9a4ad142bf551a..c42623f0196943c664906d45f4e0dab65f4704a6 100644 (file)
@@ -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;
@@ -1256,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"));