This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Support EH frame pointer encodings that use sdata4
ClosedPublic

Authored by int3 on Jul 29 2022, 4:02 PM.

Details

Summary

Previously we only supporting using the system pointer size (aka the
absptr encoding) because llvm-mc's CFI directives always generate EH
frames with that encoding. But libffi uses 4-byte-encoded, hand-rolled
EH frames, so this patch adds support for it.

Fixes #56576.

Diff Detail

Event Timeline

int3 created this revision.Jul 29 2022, 4:02 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 29 2022, 4:02 PM
int3 requested review of this revision.Jul 29 2022, 4:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2022, 4:02 PM
int3 added inline comments.Jul 29 2022, 4:05 PM
lld/test/MachO/eh-frame-sdata4.s
51

I ideally the test case would exercise the "LSDA with sdata4" code path too, but this hand-assembled EH frame was a pain in the ass to get right and I don't really want to touch it any more

oontvoo accepted this revision.Jul 31 2022, 4:56 PM
oontvoo added a subscriber: oontvoo.

Thanks for the fix!!!

This revision is now accepted and ready to land.Jul 31 2022, 4:56 PM