[libcxx-commits] [PATCH] D86805: [lld-macho] create __TEXT, __unwind_info from __LD, __compact_unwind

Greg McGary via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 18 20:07:21 PDT 2020


gkm marked 10 inline comments as done.
gkm added inline comments.


================
Comment at: lld/MachO/OutputSegment.cpp:73-74
 
-  outputSegments.push_back(segRef);
+  if (name != segment_names::ld) // TODO(gkm): only when no -r
+    outputSegments.push_back(segRef);
   return segRef;
----------------
int3 wrote:
> Instead of filtering it out here, how about checking for `__LD,__compact_unwind` inside `createOutputSections()` while looping over `mergedOutputSections`, and then doing something like `unwindInfoSection->setCompactUnwind(...)`? Benefits: no need for the loop in `UnwindInfoSection::isNeeded()`, no need for `getOutputSection`, and no need to create an outputSegment to be discarded later.
> 
> That said, the current setup is definitely much cleaner than what we had before, and I'm happy to have this refinement in a follow-up diff
No followup necessary. I did it all here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86805



More information about the libcxx-commits mailing list