diff options
author | Ian Lance Taylor <iant@google.com> | 2008-03-20 05:22:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2008-03-20 05:22:37 +0000 |
commit | eb42429a935fcf4d18085b7ba01137083cee8857 (patch) | |
tree | 2dfbc0544375227c543f7ca3e9b2ed2254adfcb9 /gold | |
parent | 4a72605d84b850ead196df52a542c630b49e953d (diff) | |
download | binutils-eb42429a935fcf4d18085b7ba01137083cee8857.zip binutils-eb42429a935fcf4d18085b7ba01137083cee8857.tar.gz binutils-eb42429a935fcf4d18085b7ba01137083cee8857.tar.bz2 |
From Craig Silverstein: implement -z defs.
Diffstat (limited to 'gold')
-rw-r--r-- | gold/options.h | 3 | ||||
-rw-r--r-- | gold/target-reloc.h | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gold/options.h b/gold/options.h index efe92e2..2286649 100644 --- a/gold/options.h +++ b/gold/options.h @@ -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, diff --git a/gold/target-reloc.h b/gold/target-reloc.h index c5bb4f1..eab3c37 100644 --- a/gold/target-reloc.h +++ b/gold/target-reloc.h @@ -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()) |