[PATCH] D95809: [lld-macho] Emit personalities in compact unwind
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 1 11:53:29 PST 2021
int3 created this revision.
int3 added reviewers: lld-macho, clayborg.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Note that there is a triple indirection involved with
personalities and compact unwind:
1. Two bits of each CU encoding are used as an offset into the personality array.
2. Each entry of the personality array is an offset from the image base. The resulting address (after adding the image base) should point within the GOT.
3. The corresponding GOT entry contains the actual pointer to the personality function.
To further complicate things, when the personality function is in the
object file (as opposed to a dylib), its references in
`__compact_unwind` may refer to it via a section + offset relocation
instead of a symbol relocation. Since our GOT implementation can only
create entries for symbols, we have to create a synthetic symbol at the
given section offset.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95809
Files:
lld/MachO/SyntheticSections.cpp
lld/MachO/UnwindInfoSection.cpp
lld/MachO/UnwindInfoSection.h
lld/test/MachO/compact-unwind-generated.test
lld/test/MachO/compact-unwind-pie.s
lld/test/MachO/compact-unwind.s
lld/test/MachO/compact-unwind.test
lld/test/MachO/invalid/compact-unwind-personalities.s
lld/test/MachO/tools/validate-unwind-info.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95809.320550.patch
Type: text/x-patch
Size: 13306 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210201/0ae69b5d/attachment.bin>
More information about the llvm-commits
mailing list