This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Canonicalize personality pointers in EH frames
ClosedPublic

Authored by int3 on Oct 11 2022, 4:30 PM.

Details

Reviewers
oontvoo
Group Reviewers
Restricted Project
Commits
rG7b45dfc6811a: [lld-macho] Canonicalize personality pointers in EH frames
Summary

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.

Diff Detail

Event Timeline

int3 created this revision.Oct 11 2022, 4:30 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 11 2022, 4:30 PM
int3 requested review of this revision.Oct 11 2022, 4:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 4:30 PM
int3 added inline comments.Oct 11 2022, 4:35 PM
lld/test/MachO/eh-frame-personality-dedup.s
19

this used to print 2

oontvoo accepted this revision.Oct 11 2022, 6:02 PM
oontvoo added a subscriber: oontvoo.

LG - thanks!

This revision is now accepted and ready to land.Oct 11 2022, 6:02 PM
This revision was automatically updated to reflect the committed changes.