[PATCH] D45536: Do not keep shared symbols to garbage-collected eliminated DSOs.

Rafael Avila de Espindola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 11 17:50:38 PDT 2018


espindola added inline comments.


================
Comment at: lld/ELF/Driver.cpp:1069
+    if (auto *S = dyn_cast<SharedSymbol>(Sym))
+      if (S->isWeak() && !S->getFile<ELFT>().IsNeeded)
+        replaceSymbol<Undefined>(S, nullptr, S->getName(), STB_WEAK, S->StOther,
----------------
Is this doing the right thing if the symbol in the shared library is weak? Is it necessary? Doesn't IsNeeded already include all the required information?


https://reviews.llvm.org/D45536





More information about the llvm-commits mailing list