[llvm] [BOLT][AArch64] Allow binary-analysis and heatmap tool to run with pac-ret binaries (PR #136664)
Anatoly Trosinenko via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 29 04:02:36 PDT 2025
================
@@ -2760,13 +2762,19 @@ struct CFISnapshot {
}
case MCCFIInstruction::OpAdjustCfaOffset:
case MCCFIInstruction::OpWindowSave:
- case MCCFIInstruction::OpNegateRAState:
case MCCFIInstruction::OpNegateRAStateWithPC:
case MCCFIInstruction::OpLLVMDefAspaceCfa:
case MCCFIInstruction::OpLabel:
case MCCFIInstruction::OpValOffset:
llvm_unreachable("unsupported CFI opcode");
break;
+ case MCCFIInstruction::OpNegateRAState:
+ if (!(opts::BinaryAnalysisMode || opts::HeatmapMode)) {
+ llvm_unreachable("BOLT-ERROR: binaries using pac-ret hardening (e.g. "
+ "as produced by '-mbranch-protection=pac-ret') are "
+ "currently not supported by BOLT\n");
----------------
atrosinenko wrote:
[nit] `llvm_unreachable` doesn't need `\n` at the end of the message, I guess. The same applies to the below calls to `llvm_unreachable`.
https://github.com/llvm/llvm-project/pull/136664
More information about the llvm-commits
mailing list