diff options
-rw-r--r-- | lld/ELF/Relocations.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp index 32fe2f1275b..42f0a873909 100644 --- a/lld/ELF/Relocations.cpp +++ b/lld/ELF/Relocations.cpp @@ -697,7 +697,7 @@ static std::vector<UndefinedDiag> undefs; static const Symbol *getAlternativeSpelling(const Undefined &sym) { // Build a map of local defined symbols. DenseMap<StringRef, const Symbol *> map; - if (sym.file) { + if (sym.file && !isa<SharedFile>(sym.file)) { for (const Symbol *s : sym.file->getSymbols()) if (s->isLocal() && s->isDefined()) map.try_emplace(s->getName(), s); |