Start adding support for internalizing shared libraries.
llvm-svn: 267045
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 135eb3e..65dde8d 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -1053,15 +1053,6 @@
return true;
}
-static bool includeInDynsym(const SymbolBody &B) {
- if (B.MustBeInDynSym)
- return true;
- uint8_t V = B.getVisibility();
- if (V != STV_DEFAULT && V != STV_PROTECTED)
- return false;
- return Config->ExportDynamic || Config->Shared;
-}
-
// This class knows how to create an output section for a given
// input section. Output section type is determined by various
// factors, including input section's sh_flags, sh_type and
@@ -1334,7 +1325,7 @@
if (Out<ELFT>::SymTab)
Out<ELFT>::SymTab->addSymbol(Body);
- if (isOutputDynamic() && includeInDynsym(*Body))
+ if (isOutputDynamic() && Body->includeInDynsym())
Out<ELFT>::DynSymTab->addSymbol(Body);
}