[llvm] [BOLT][AArch64] Handle OpNegateRAState to enable optimizing binaries with pac-ret hardening (PR #120064)
Maksim Panchenko via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 22 22:56:56 PDT 2025
================
@@ -3491,6 +3491,17 @@ void RewriteInstance::disassembleFunctions() {
}
}
+ // Check if fillCFIInfoFor removed any OpNegateRAState CFIs from the
+ // function.
+ if (Function.containedNegateRAState()) {
+ if (!opts::UpdateBranchProtection) {
+ BC->errs()
+ << "BOLT-ERROR: --update-branch-protection is set to false, but "
+ << Function.getPrintName() << " contains .cfi-negate-ra-state.\n";
----------------
maksfb wrote:
```suggestion
<< Function.getPrintName() << " contains .cfi-negate-ra-state\n";
```
https://github.com/llvm/llvm-project/pull/120064
More information about the llvm-commits
mailing list