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

Kellie Medlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 11:42:25 PDT 2020


Ktwu marked 4 inline comments as done.
Ktwu added inline comments.


================
Comment at: lld/MachO/OutputSection.cpp:30
+    if (input->flags != this->flags)
+      error("Cannot add merge section with inconsistent flags");
+    this->align = std::max(this->align, input->align);
----------------
smeenai wrote:
> Can you add more details to this error message? It'd be ideal to have things like the section in question, the object file it's coming from, etc.
> 
> Also, is this what ld64 does?
Sure.

So far as I can tell, ld64 doesn't do section merging on a flag level like I first thought; now that I'm diving into it, OutputFile.cpp separates flags into individual boolean attributes. It's not the easiest codebase to navigate :/


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