[llvm] [AArch64][PAC][MC][ELF] Support PAuth ABI compatibility tag (PR #85236)
Daniil Kovalev via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 20 01:20:37 PDT 2024
================
@@ -268,13 +268,24 @@ void AArch64AsmPrinter::emitStartOfAsmFile(Module &M) {
if (Sign->getZExtValue())
Flags |= ELF::GNU_PROPERTY_AARCH64_FEATURE_1_PAC;
- if (Flags == 0)
- return;
+ uint64_t PAuthABIPlatform = -1;
+ if (const auto *PAP = mdconst::extract_or_null<ConstantInt>(
+ M.getModuleFlag("aarch64-elf-pauthabi-platform")))
+ PAuthABIPlatform = PAP->getZExtValue();
+ uint64_t PAuthABIVersion = -1;
+ if (const auto *PAV = mdconst::extract_or_null<ConstantInt>(
+ M.getModuleFlag("aarch64-elf-pauthabi-version")))
+ PAuthABIVersion = PAV->getZExtValue();
+
+ if ((PAuthABIPlatform == uint64_t(-1)) != (PAuthABIVersion == uint64_t(-1)))
----------------
kovdan01 wrote:
Thanks for suggestion, see ab89fdcb49f9ae6dd2d20cac81cca5204eda51a6
https://github.com/llvm/llvm-project/pull/85236
More information about the llvm-commits
mailing list