[PATCH] D114275: [lld-macho] Include Objective-C functions in LC_FUNCTION_STARTS

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 19 13:51:27 PST 2021


int3 added a comment.

If I'm understanding correctly, it's not just that Obj-C symbols need to be in LC_FUNCTION_STARTS, but all local symbols in code sections as well. If that's the case, can the test not be objc-specific?



================
Comment at: lld/MachO/SyntheticSections.cpp:803-805
+        if (!sym)
           continue;
+        if (const auto *defined = dyn_cast<Defined>(sym)) {
----------------



================
Comment at: lld/MachO/SyntheticSections.cpp:809-812
+          if (const auto *concatIsec =
+                  dyn_cast<ConcatInputSection>(defined->isec))
+            if (concatIsec->shouldOmitFromOutput())
+              continue;
----------------
this is existing code, but I think it is redundant... the symbol `isLive` check above should cover it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114275



More information about the llvm-commits mailing list