// options.c -- handle command line options for gold
-// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013
-// 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*)
{
if (!read_dynamic_list(arg, cmdline, &this->dynamic_list_))
gold::gold_fatal(_("unable to parse dynamic-list script file %s"), arg);
+ this->have_dynamic_list_ = true;
}
void
do_demangle_(false),
plugins_(NULL),
dynamic_list_(),
+ have_dynamic_list_(false),
incremental_mode_(INCREMENTAL_OFF),
incremental_disposition_(INCREMENTAL_STARTUP),
incremental_startup_disposition_(INCREMENTAL_CHECK),
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;
"--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"));