summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LTO.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/LTO.cpp')
-rw-r--r--lld/ELF/LTO.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index a9196567c4c..2fdf94a6c5f 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -116,7 +116,8 @@ void BitcodeCompiler::add(BitcodeFile &F) {
// Shared libraries need to be handled slightly differently.
// For now, let's be conservative and just never internalize
// symbols when creating a shared library.
- if (!Config->Shared && !Config->ExportDynamic && !B->isUsedInRegularObj())
+ if (!Config->Shared && !Config->ExportDynamic && !B->isUsedInRegularObj() &&
+ !B->MustBeInDynSym)
if (!Used.count(GV))
InternalizedSyms.insert(GV->getName());
OpenPOWER on IntegriCloud