[PATCH] D138320: [lld-macho] Fix bug in CUE folding that resulted in wrong unwind table.
James Y Knight via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 18 15:54:23 PST 2022
jyknight added inline comments.
================
Comment at: lld/MachO/UnwindInfoSection.cpp:659
const CompactUnwindEntry &cuEnd = cuEntries[cuIndices.back()];
- iep->functionOffset =
- cuEnd.functionAddress - in.header->addr + cuEnd.functionLength;
+ iep->functionOffset = finalEndingAddress - in.header->addr;
iep->secondLevelPagesSectionOffset = 0;
----------------
int3 wrote:
> I'm not entirely sure why, but this is what ld64 does
Adding 1 does make sense. This value is the start of the "next function", so it's an exclusive bound, and you want the final byte of the function to actually be included in the range.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138320/new/
https://reviews.llvm.org/D138320
More information about the llvm-commits
mailing list