Start adding support for internalizing shared libraries.
llvm-svn: 267045
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index fe0e01e..747161e 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -354,6 +354,15 @@
#endif
}
+bool SymbolBody::includeInDynsym() const {
+ if (MustBeInDynSym)
+ return true;
+ uint8_t V = getVisibility();
+ if (V != STV_DEFAULT && V != STV_PROTECTED)
+ return false;
+ return Config->ExportDynamic || Config->Shared;
+}
+
template uint32_t SymbolBody::template getVA<ELF32LE>(uint32_t) const;
template uint32_t SymbolBody::template getVA<ELF32BE>(uint32_t) const;
template uint64_t SymbolBody::template getVA<ELF64LE>(uint64_t) const;