[PATCH] D19953: ELF: Do not use -1 to mark pieces of merge sections as being tail merged.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 19:55:18 PDT 2016


pcc added inline comments.

================
Comment at: ELF/Writer.cpp:1127-1129
@@ -1123,2 +1126,5 @@
       return false;
+    if (auto *S = dyn_cast<MergeInputSection<ELFT>>(D->Section))
+      if (S->getRangeAndSize(D->Value).first->second == typename ELFT::uint(-1))
+        return false;
   }
----------------
ruiu wrote:
> I may be missing something, but I don't think we gc pieces of mergeable sections. Instead, we gc a mergeable sections as a whole -- all the pieces in a mergeable section are gc'ed or not. So do you need this test?
It looks like we're GCing pieces here: http://llvm-cs.pcc.me.uk/tools/lld/ELF/MarkLive.cpp#146


http://reviews.llvm.org/D19953





More information about the llvm-commits mailing list