[lld] [llvm] [lld][AArch64][ELF][PAC] Support AUTH relocations and AUTH ELF marking (PR #72714)
Daniil Kovalev via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 08:03:23 PDT 2024
================
@@ -2611,14 +2634,33 @@ static uint32_t getAndFeatures() {
"GNU_PROPERTY_AARCH64_FEATURE_1_PAC property");
features |= GNU_PROPERTY_AARCH64_FEATURE_1_PAC;
}
- ret &= features;
+ config->andFeatures &= features;
+
+ if (ctx.aarch64PauthAbiTag.empty())
+ continue;
+
+ if (f->aarch64PauthAbiTag.empty()) {
+ reportMissingFeature(config->zPauthReport,
+ toString(f) +
+ ": -z pauth-report: file does not have AArch64 "
+ "PAuth compatibility info while " +
+ referenceFileName + " has one");
+ continue;
+ }
+
+ if (ctx.aarch64PauthAbiTag != f->aarch64PauthAbiTag)
+ errorOrWarn(
+ "incompatible values of AArch64 PAuth compatibility info found"
+ "\n>>> " +
+ referenceFileName + ": 0x" +
+ toHex(ctx.aarch64PauthAbiTag, /*LowerCase=*/true) + "\n>>> " +
----------------
kovdan01 wrote:
As answered in [discussion_r1517557943](https://github.com/llvm/llvm-project/pull/72714#discussion_r1517557943), I use `toHex` since I want to print an `ArrayRef` of 16 bytes, not a single `uint64_t`. We can probably print it as two bytes, but I'm not sure if it would be nice and if it would not cause issues with different endianness. Do I miss something?
https://github.com/llvm/llvm-project/pull/72714
More information about the llvm-commits
mailing list