[PATCH] D89257: [lld-macho] Emit STABS symbols for debugging, and drop debug sections

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 1 14:38:25 PST 2020


clayborg accepted this revision.
clayborg added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lld/MachO/SyntheticSections.cpp:627
+    // lieu is only correct if .subsections_via_symbols is set.
+    stab.value = defined->isec->getSize();
+    stabs.emplace_back(std::move(stab));
----------------
int3 wrote:
> clayborg wrote:
> > This can't be wrong and must be correct. If it is wrong, dsymutil will link the wrong address ranges for each function and really bad DWARF will result.
> I'd like to punt on this for now. The goal for now is not to get the STABS implementation to 100% correctness, but to create sort-of-working binaries for local testing. As mentioned in the commit message, I'm on the fence about the best way to store symbol size in LLD's current architecture, and I think it will be clearer once more of the linker has been implemented.
understood, just wanted you to be aware that debugging these binaries or using a dSYM file generated from these binaries will have issues until this is fixed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89257



More information about the llvm-commits mailing list