summaryrefslogtreecommitdiffstats
path: root/lld/ELF/MarkLive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/MarkLive.cpp')
-rw-r--r--lld/ELF/MarkLive.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lld/ELF/MarkLive.cpp b/lld/ELF/MarkLive.cpp
index a64d3f77af5..b76c8b09c08 100644
--- a/lld/ELF/MarkLive.cpp
+++ b/lld/ELF/MarkLive.cpp
@@ -128,10 +128,9 @@ template <class ELFT> void elf::markLive(SymbolTable<ELFT> *Symtab) {
// Preserve externally-visible symbols if the symbols defined by this
// file can interrupt other ELF file's symbols at runtime.
- if (Config->Shared || Config->ExportDynamic)
- for (const Symbol *S : Symtab->getSymbols())
- if (S->includeInDynsym())
- MarkSymbol(S->Body);
+ for (const Symbol *S : Symtab->getSymbols())
+ if (S->includeInDynsym())
+ MarkSymbol(S->Body);
// Preserve special sections and those which are specified in linker
// script KEEP command.
OpenPOWER on IntegriCloud