summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Driver.cpp')
-rw-r--r--lld/ELF/Driver.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 0d78830bf43..79ffd3039e4 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -100,6 +100,12 @@ void LinkerDriver::main(ArrayRef<const char *> ArgsArr) {
opt::InputArgList Args = parseArgs(&Alloc, ArgsArr);
createFiles(Args);
+ // Traditional linkers can generate re-linkable object files instead
+ // of executables or DSOs. We don't support that since the feature
+ // does not seem to provide more value than the static archiver.
+ if (Args.hasArg(OPT_relocatable))
+ error("-r option is not supported. Use 'ar' command instead.");
+
switch (Config->EKind) {
case ELF32LEKind:
link<ELF32LE>(Args);
OpenPOWER on IntegriCloud