[BOLT] Emit empty FDE for injected functions
This fixes an issue where `PatchEntries` overwrites function body but keeps CFI untouched. Existing FDEs thus become invalid. This doesn't affect unwinding because patched functions are transparent from EH/unwinding perspective, but it breaks BOLT during disassembling those functions. Emit empty FDE for injected functions (emitted to the same address as .org functions) that take precedence over the original FDE. This adds eh_frame overhead, but restores the ability to disassemble .org functions. Note that the overhead is avoided in `-use-old-text` mode. Test Plan: updated bolt/test/X86/patch-entries.test Reviewers: rafaelauler, maksfb, dcci, ayermolo Reviewed By: maksfb, dcci Pull Request: https://github.com/llvm/llvm-project/pull/87967
parent
cd14e713
Please register or sign in to comment