[PATCH] D135728: [lld-macho] Canonicalize personality pointers in EH frames

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 11 16:30:18 PDT 2022


int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added projects: lld-macho, All.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We already do this for personality pointers referenced from compact
unwind entries; this patch extends that behavior to personalities
referenced via EH frames as well.

This reduces the number of distinct personalities we need in the final
binary, and helps us avoid hitting the "too many personalities" error.

I renamed `UnwindInfoSection::prepareRelocations()` to simply `prepare`
since we now do some non-reloc-specific stuff within.

Fixes #58277.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135728

Files:
  lld/MachO/UnwindInfoSection.cpp
  lld/MachO/UnwindInfoSection.h
  lld/MachO/Writer.cpp
  lld/test/MachO/eh-frame-personality-dedup.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135728.466973.patch
Type: text/x-patch
Size: 5388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221011/6dafbc16/attachment.bin>


More information about the llvm-commits mailing list