Skip to content

Commit d45bcc0

Browse files
dnadlingervchuravy
authored andcommitted
[JITLink] Also include EHFrame* passes on MachO_arm64
Without the non-compact unwind info there is no way to register the EH frames with libunwind (e.g. for backtrace generation).
1 parent 593820d commit d45bcc0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,10 @@ void link_MachO_arm64(std::unique_ptr<LinkGraph> G,
683683
else
684684
Config.PrePrunePasses.push_back(markAllSymbolsLive);
685685

686+
Config.PrePrunePasses.push_back(EHFrameSplitter("__TEXT,__eh_frame"));
687+
Config.PrePrunePasses.push_back(EHFrameEdgeFixer("__TEXT,__eh_frame",
688+
8, Delta64, Delta32, NegDelta32));
689+
686690
// Add an in-place GOT/Stubs pass.
687691
Config.PostPrunePasses.push_back(
688692
PerGraphGOTAndPLTStubsBuilder_MachO_arm64::asPass);

0 commit comments

Comments
 (0)