From Craig Silverstein: implement -z defs.
This commit is contained in:
parent
4a72605d84
commit
eb42429a93
2 changed files with 5 additions and 1 deletions
|
@ -601,6 +601,9 @@ class General_options
|
|||
// value, so we need to use different variables for them.
|
||||
DEFINE_uint64(common_page_size, options::DASH_Z, '\0', 0,
|
||||
N_("Set common page size to SIZE"), N_("SIZE"));
|
||||
DEFINE_bool(defs, options::DASH_Z, '\0', false,
|
||||
N_("Report undefined symbols (even with --shared)"),
|
||||
NULL);
|
||||
DEFINE_bool(execstack, options::DASH_Z, '\0', false,
|
||||
N_("Mark output as requiring executable stack"), NULL);
|
||||
DEFINE_uint64(max_page_size, options::DASH_Z, '\0', 0,
|
||||
|
|
|
@ -217,7 +217,8 @@ relocate_section(
|
|||
if (sym != NULL
|
||||
&& sym->is_undefined()
|
||||
&& sym->binding() != elfcpp::STB_WEAK
|
||||
&& !parameters->options().shared())
|
||||
&& (!parameters->options().shared() // -shared
|
||||
|| parameters->options().defs())) // -z defs
|
||||
gold_undefined_symbol(sym, relinfo, i, offset);
|
||||
|
||||
if (sym != NULL && sym->has_warning())
|
||||
|
|
Loading…
Reference in a new issue