Commit 5d6dbc9a authored by Vivek Das Mohapatra's avatar Vivek Das Mohapatra
Browse files

Implement and document DT_GNU_UNIQUE/--unique-dso handling in gold

parent 4a38352d
......@@ -5131,6 +5131,9 @@ Layout::add_target_dynamic_tags(bool use_rel, const Output_data* plt_got,
// linker at run time, and used by the debugger.
odyn->add_constant(elfcpp::DT_DEBUG, 0);
}
if (parameters->options().unique_dso())
odyn->add_constant(elfcpp::DT_GNU_UNIQUE, 1);
}
void
......
......@@ -1337,6 +1337,10 @@ class General_options
DEFINE_set(undefined, options::TWO_DASHES, 'u',
N_("Create undefined reference to SYMBOL"), N_("SYMBOL"));
DEFINE_bool(unique_dso, options::TWO_DASHES, '\0', false,
N_("Mark DSO to be loaded at most once, and only in the main namespace"),
NULL);
DEFINE_enum(unresolved_symbols, options::TWO_DASHES, '\0', NULL,
N_("How to handle unresolved symbols"),
("ignore-all,report-all,ignore-in-object-files,"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment