This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Fix bugs around EH_Frame symbols
ClosedPublic

Authored by int3 on Nov 3 2022, 3:38 PM.

Details

Summary

While extending the map file to cover unwind info, I realized we had two
issues with our EH_Frame symbols:

  1. Their size was not set
  2. We would create two EH_Frame symbols per frame when we only needed one. This was because the Defined constructor would add the symbol itself to InputSection::symbols, but we were also manually appending the symbol to that same vector.

Note that ld64 prints "CIE" and "FDE for: <function>" instead of just
"EH_Frame", but I'm punting on that for now unless we discover that
users really depend upon it.

Diff Detail

Event Timeline

int3 created this revision.Nov 3 2022, 3:38 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptNov 3 2022, 3:38 PM
int3 requested review of this revision.Nov 3 2022, 3:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 3 2022, 3:38 PM
int3 updated this revision to Diff 473089.Nov 3 2022, 5:17 PM

update

Roger accepted this revision.Nov 4 2022, 4:40 PM
Roger added a subscriber: Roger.

Nice catch :)

This revision is now accepted and ready to land.Nov 4 2022, 4:40 PM
This revision was automatically updated to reflect the committed changes.