[llvm] [BOLT][binary-analysis] Fix pac-ret scanner's "major limitation" (PR #136664)
Anatoly Trosinenko via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 23 04:03:26 PDT 2025
Gergely =?utf-8?q?Bálint?=,Gergely Balint <gergely.balint at arm.com>,Gergely
Balint <gergely.balint at arm.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/136664 at github.com>
================
@@ -632,8 +635,15 @@ bool CFIReaderWriter::fillCFIInfoFor(BinaryFunction &Function) const {
// DW_CFA_GNU_window_save and DW_CFA_GNU_NegateRAState just use the same
// id but mean different things. The latter is used in AArch64.
if (Function.getBinaryContext().isAArch64()) {
- Function.addCFIInstruction(
- Offset, MCCFIInstruction::createNegateRAState(nullptr));
+ // llvm-bolt-binary-analysis and llvm-heatmap do not need this CFI, as
+ // they are not producing a binary. For other tools, we should refuse
+ // processing the binary, until PAC support is added.
+ if (!(opts::BinaryAnalysisMode || opts::HeatmapMode)) {
+ BC.errs() << "BOLT-ERROR: pointer authentication is not supported "
+ "yet. Please compile "
+ "your target binary using '-mbranch-protection=none'.\n";
----------------
atrosinenko wrote:
[nit] The layout is a bit surprising :)
```suggestion
BC.errs() << "BOLT-ERROR: pointer authentication is not supported "
"yet. Please compile your target binary using "
"'-mbranch-protection=none'.\n";
```
https://github.com/llvm/llvm-project/pull/136664
More information about the llvm-commits
mailing list