// 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.
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*)
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;
// 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"));
"--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"));