[llvm] [BOLT][AArch64] Handle OpNegateRAState to enable optimizing binaries with pac-ret hardening (PR #120064)

Gergely Bálint via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 10 02:29:20 PDT 2025


bgergely0 wrote:

> For the flag, we went with a negative disallow-pacret, which is off by default.

> Q1) Do we anticipate additional modes, eg refuse to emit a binary on CFI inconsistencies? If so, we could rename to something like:
-update-branch-protection={yes|strict|no}

Yes, I think that's ideal. One think to keep in mind here: the BTI fixup is missing, so we cannot guarantee that an input binary compiled with `-mbranch-protection=standard` will still be correct after BOLT optimizations.

I'm not sure how much of an issue is changing user-facing flags, while the code is just merged into the tree, but not released? Ideally, the `-update-branch-protection={yes|strict|no}` option would be used once BTI fixups are in place.

https://github.com/llvm/llvm-project/pull/120064


More information about the llvm-commits mailing list