[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI core info (PR #85235)

Daniil Kovalev via cfe-commits cfe-commits at lists.llvm.org
Thu May 9 00:54:50 PDT 2024


================
@@ -1190,6 +1191,36 @@ void CodeGenModule::Release() {
     if (!LangOpts.isSignReturnAddressWithAKey())
       getModule().addModuleFlag(llvm::Module::Min,
                                 "sign-return-address-with-bkey", 1);
+
+    if (getTriple().isOSLinux() && getTriple().isOSBinFormatELF()) {
----------------
kovdan01 wrote:

OK, but I'll leave an assertion against ELF here. Theoretically, we might have non-ELF binary format on Linux, while the Linux itself seems to have deprecated COFF and a.out support and llvm does not seem to support them as well. This assertion makes sense to me since (a) it makes things clear that we want to check both Linux and ELF (b) this will notify us if in future we have binary formats other than ELF supported on Linux.


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


More information about the cfe-commits mailing list