[PATCH] D98545: [lld-macho][nfc] Give every SyntheticSection a fake InputSection

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 12 13:15:05 PST 2021


oontvoo accepted this revision.
oontvoo added a comment.
This revision is now accepted and ready to land.

LGTM - thanks!



================
Comment at: lld/MachO/SyntheticSections.cpp:770-771
     if (auto *defined = dyn_cast<Defined>(sym)) {
+      if (defined->linkerInternal)
+        continue;
       assert(defined->isExternal());
----------------
int3 wrote:
> oontvoo wrote:
> > This is true for dso_handle, but probably not for the mh_* symbols?
> Indeed. That's why `addSynthetic` takes `linkerInternal` as a parameter -- so that `mh_*` symbols can set it to false :)
Ah! Sorry I've missed that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98545



More information about the llvm-commits mailing list