Author: emaste Date: Tue Jan 23 17:54:39 2018 New Revision: 328286 URL: https://svnweb.freebsd.org/changeset/base/328286
Log: lld: Don't mark a shared library as needed because of a lazy symbol. Obtained from: LLVM r323221 by Rafael EspĂndola Modified: head/contrib/llvm/tools/lld/ELF/SymbolTable.cpp Modified: head/contrib/llvm/tools/lld/ELF/SymbolTable.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/SymbolTable.cpp Tue Jan 23 16:52:39 2018 (r328285) +++ head/contrib/llvm/tools/lld/ELF/SymbolTable.cpp Tue Jan 23 17:54:39 2018 (r328286) @@ -491,12 +491,13 @@ void SymbolTable::addShared(StringRef Name, SharedFile if (WasInserted || ((S->isUndefined() || S->isLazy()) && S->getVisibility() == STV_DEFAULT)) { uint8_t Binding = S->Binding; + bool WasUndefined = S->isUndefined(); replaceSymbol<SharedSymbol>(S, File, Name, Sym.getBinding(), Sym.st_other, Sym.getType(), Sym.st_value, Sym.st_size, Alignment, VerdefIndex); if (!WasInserted) { S->Binding = Binding; - if (!S->isWeak() && !Config->GcSections) + if (!S->isWeak() && !Config->GcSections && WasUndefined) File.IsNeeded = true; } } _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"