aboutsummaryrefslogtreecommitdiff
path: root/gold/options.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/options.cc')
-rw-r--r--gold/options.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gold/options.cc b/gold/options.cc
index b1b428f..a4b4c2f 100644
--- a/gold/options.cc
+++ b/gold/options.cc
@@ -977,6 +977,9 @@ Command_line::get_special_argument(const char* longname, int argc, char** argv,
void
Command_line::normalize_options()
{
+ if (this->options_.is_shared() && this->options_.is_relocatable())
+ gold_fatal(_("-shared and -r are incompatible"));
+
// If the user specifies both -s and -r, convert the -s as -S.
// -r requires us to keep externally visible symbols!
if (this->options_.strip_all() && this->options_.is_relocatable())