summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/DynamicLibraryWriter.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/DynamicLibraryWriter.h')
-rw-r--r--lld/lib/ReaderWriter/ELF/DynamicLibraryWriter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/ELF/DynamicLibraryWriter.h b/lld/lib/ReaderWriter/ELF/DynamicLibraryWriter.h
index 3ca4aac129b..f97514b525c 100644
--- a/lld/lib/ReaderWriter/ELF/DynamicLibraryWriter.h
+++ b/lld/lib/ReaderWriter/ELF/DynamicLibraryWriter.h
@@ -51,7 +51,7 @@ void DynamicLibraryWriter<ELFT>::buildDynamicSymbolTable(const File &file) {
if (auto section = dyn_cast<AtomSection<ELFT>>(sec))
for (const auto &atom : section->atoms()) {
const DefinedAtom *da = dyn_cast<const DefinedAtom>(atom->_atom);
- if (da && (da->scope() != DefinedAtom::scopeTranslationUnit))
+ if (da && (da->scope() == DefinedAtom::scopeGlobal))
this->_dynamicSymbolTable->addSymbol(atom->_atom, section->ordinal(),
atom->_virtualAddr, atom);
}
OpenPOWER on IntegriCloud