[lld/mac] Don't crash when dead-stripping removes all unwind info
If the input has compact unwind info but all of it is removed after dead stripping, we would crash. Now we don't write any __unwind_info section at all, like ld64. This is a bit awkward to implement because we only know the final state of unwind info after UnwindInfoSectionImpl<Ptr>::finalize(), which is called after sections are added. So add a small amount of bookkeeping to relocateCompactUnwind() instead (which runs earlier) so that we can predict what finalize() will do before it runs. Fixes PR51010. Differential Revision: https://reviews.llvm.org/D105557
parent
d4cb286b
Please register or sign in to comment