This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Fix symbol relocs handling for LSDAs
ClosedPublic

Authored by int3 on Nov 11 2021, 3:53 PM.

Details

Reviewers
gkm
oontvoo
Group Reviewers
Restricted Project
Commits
rG9d0b237c516f: [lld-macho] Fix symbol relocs handling for LSDAs
Summary

Similar to D113702, but for the LSDAs. Clang seems to emit all LSDA
relocs as section relocs, but ld -r can turn those relocs into symbol
ones.

Diff Detail

Event Timeline

int3 created this revision.Nov 11 2021, 3:53 PM
Herald added a project: Restricted Project. · View Herald Transcript
int3 requested review of this revision.Nov 11 2021, 3:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 11 2021, 3:53 PM
int3 planned changes to this revision.Nov 11 2021, 3:57 PM
oontvoo accepted this revision.Nov 11 2021, 4:56 PM
oontvoo added a subscriber: oontvoo.

LG Thanks!!!

lld/MachO/UnwindInfoSection.cpp
442–443

Thank you!!! was wondering why our build was crashing at this line today.

assert.h assertion failed at llvm/include/llvm/ADT/PointerUnion.h:159 in T llvm::PointerUnion<lld::macho::Symbol *, lld::macho::InputSection *>::get() const [PTs = <lld::macho::Symbol *, lld::macho::InputSection *>, T = lld::macho::InputSection *]: is<T>() && "Invalid accessor called"
lld/test/MachO/compact-unwind-sym-relocs.s
246–250 ↗(On Diff #386684)

dont need these?

This revision is now accepted and ready to land.Nov 11 2021, 4:56 PM

P.S: build failures look real - PTAL

int3 updated this revision to Diff 386708.Nov 11 2021, 6:27 PM
int3 marked an inline comment as done.

fix

This revision was landed with ongoing or failed builds.Nov 12 2021, 1:03 PM
This revision was automatically updated to reflect the committed changes.