[PATCH] D77893: WIP [lld] Merge Mach-O input sections

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 15:04:34 PDT 2020


int3 added inline comments.


================
Comment at: lld/MachO/OutputSection.cpp:59
+  for (InputSection *i : inputs) {
+    if (i->isHidden()) {
+      continue;
----------------
hidden sections should still be written, only their headers get omitted.

Also I think we may be able to have the isHidden() property on (synthetic) OutputSections and not on InputSections


================
Comment at: lld/MachO/Writer.cpp:389
+      addr += section->getSize();
+      section->index = ++sectionIndex;
+    }
----------------
isHidden check should be retained here


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77893





More information about the llvm-commits mailing list