[PATCH] D71819: [ELF] Support input section description .gnu.version* in /DISCARD/

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 26 00:06:13 PST 2019


grimar added inline comments.


================
Comment at: lld/ELF/SyntheticSections.cpp:1447
   }
-  if (hasVerNeed) {
+  if (hasVerNeed && part.verNeed->isLive()) {
     addInSec(DT_VERNEED, part.verNeed);
----------------
grimar wrote:
> Can't you remove `hasVerNeed` variable and use `verNeed->isNeeded()` here too?
You perhaps need to add `isLive()` condition to `bool VersionNeedSection<ELFT>::isNeeded()` for that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71819/new/

https://reviews.llvm.org/D71819





More information about the llvm-commits mailing list