]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
aarch64: Mark purecap object files with EF_AARCH64_CHERI_PURECAP
authorAlex Coplan <alex.coplan@arm.com>
Fri, 24 Sep 2021 12:56:59 +0000 (13:56 +0100)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 1 Sep 2022 22:59:24 +0000 (15:59 -0700)
This simple patch sets the ELF header flag EF_AARCH64_CHERI_PURECAP for
purecap Morello object files, as documented in aaelf64-morello:
https://github.com/ARM-software/abi-aa/blob/main/aaelf64-morello/aaelf64-morello.rst

gas/ChangeLog:

2021-09-24  Alex Coplan  <alex.coplan@arm.com>

* config/tc-aarch64.c (md_begin): Set the ELF header flag
EF_AARCH64_CHERI_PURECAP if we have the C64 extension.

gas/ChangeLog
gas/config/tc-aarch64.c

index 2e32439c824509816b5a08d4acbfcba4cf918b89..00c4e8a1ef281706a4b5be9ccb46ab4ef3f842c7 100644 (file)
@@ -1,3 +1,8 @@
+2021-09-24  Alex Coplan  <alex.coplan@arm.com>
+
+       * config/tc-aarch64.c (md_begin): Set the ELF header flag
+       EF_AARCH64_CHERI_PURECAP if we have the C64 extension.
+
 2021-09-24  Alex Coplan  <alex.coplan@arm.com>
 
        * testsuite/gas/aarch64/morello_ldst-c64.d: Update following
index bde631d92b74bdbdf1bbdccda295c93c10248309..95a050cac598ec7f0910fafb095b7d378301de63 100644 (file)
@@ -10325,6 +10325,11 @@ md_begin (void)
   mach = ilp32_p ? bfd_mach_aarch64_ilp32 : bfd_mach_aarch64;
 
   bfd_set_arch_mach (stdoutput, TARGET_ARCH, mach);
+
+#ifdef OBJ_ELF
+  if (IS_C64)
+    bfd_set_private_flags (stdoutput, EF_AARCH64_CHERI_PURECAP);
+#endif
 }
 
 /* Command line processing.  */