[llvm] [PAC][ELF] Place AUTH constants in .data.rel.ro for position dependent code (PR #150418)
Anatoly Trosinenko via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 6 07:39:42 PDT 2025
================
@@ -226,6 +227,20 @@ void TargetLoweringObjectFile::emitPseudoProbeDescMetadata(
}
}
+static bool containsConstantPtrAuth(const Constant *C) {
+ if (isa<ConstantPtrAuth>(C))
+ return true;
+
+ if (isa<BlockAddress>(C) || isa<GlobalValue>(C))
+ return false;
----------------
atrosinenko wrote:
IIUC this would make `containsConstantPtrAuth` return false for global variable like this
```
@global_var = global ptr ptrauth (ptr @f, i32 0)
```
which is still "constant" (as a constant pointer to `global_var`). This doesn't seem to hurt in case of this PR, but possibly a bit unexpected w.r.t. function name vs. its behavior.
https://github.com/llvm/llvm-project/pull/150418
More information about the llvm-commits
mailing list