From 886288f10bd9d10fb446191e5266154c38f0cbad Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 3 Jul 2011 04:46:56 +0000 Subject: PR gold/12957 * options.h (class General_options): Add -f and -F. * options.cc (General_options::finalize): Fatal error if -f/-F are used without -shared. * layout.cc (Layout::finish_dynamic_section): Implement -f/-F. --- gold/options.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gold/options.cc') diff --git a/gold/options.cc b/gold/options.cc index 50fc557..f1dc1cb 100644 --- a/gold/options.cc +++ b/gold/options.cc @@ -1166,6 +1166,14 @@ General_options::finalize() if (this->pie() && this->relocatable()) gold_fatal(_("-pie and -r are incompatible")); + if (!this->shared()) + { + if (this->filter() != NULL) + gold_fatal(_("-F/--filter may not used without -shared")); + if (this->any_auxiliary()) + gold_fatal(_("-f/--auxiliary may not be used without -shared")); + } + // TODO: implement support for -retain-symbols-file with -r, if needed. if (this->relocatable() && this->retain_symbols_file()) gold_fatal(_("-retain-symbols-file does not yet work with -r")); -- cgit v1.1