summaryrefslogtreecommitdiff
path: root/ELF/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ELF/Driver.cpp')
-rw-r--r--ELF/Driver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ELF/Driver.cpp b/ELF/Driver.cpp
index cc76fea2ad5e5..b159fe63eb181 100644
--- a/ELF/Driver.cpp
+++ b/ELF/Driver.cpp
@@ -1043,7 +1043,8 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) {
return;
// Handle undefined symbols in DSOs.
- Symtab->scanShlibUndefined<ELFT>();
+ if (!Config->Shared)
+ Symtab->scanShlibUndefined<ELFT>();
// Handle the -exclude-libs option.
if (Args.hasArg(OPT_exclude_libs))