[PATCH] D50742: [ELF] mergeSections: remove non-alive MergeInputSection

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 14 16:43:20 PDT 2018


MaskRay updated this revision to Diff 160720.
MaskRay added a comment.

Update description with `arc diff --edit --verbatim` (see if this updates the Phabricator summary)


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D50742

Files:
  ELF/SyntheticSections.cpp


Index: ELF/SyntheticSections.cpp
===================================================================
--- ELF/SyntheticSections.cpp
+++ ELF/SyntheticSections.cpp
@@ -2929,8 +2929,10 @@
 
     // We do not want to handle sections that are not alive, so just remove
     // them instead of trying to merge.
-    if (!MS->Live)
+    if (!MS->Live) {
+      S = nullptr;
       continue;
+    }
 
     StringRef OutsecName = getOutputSectionName(MS);
     uint32_t Alignment = std::max<uint32_t>(MS->Alignment, MS->Entsize);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50742.160720.patch
Type: text/x-patch
Size: 520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180814/a42ad160/attachment.bin>


More information about the llvm-commits mailing list