Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jan 2018 17:54:39 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328286 - head/contrib/llvm/tools/lld/ELF
Message-ID:  <201801231754.w0NHsdpK080237@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
     }
   }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801231754.w0NHsdpK080237>