From: Alex Coplan Date: Fri, 24 Sep 2021 12:56:59 +0000 (+0100) Subject: aarch64: Mark purecap object files with EF_AARCH64_CHERI_PURECAP X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9450f09787cb78f72f67e199b706d84fd5011188;p=thirdparty%2Fbinutils-gdb.git aarch64: Mark purecap object files with EF_AARCH64_CHERI_PURECAP 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 * config/tc-aarch64.c (md_begin): Set the ELF header flag EF_AARCH64_CHERI_PURECAP if we have the C64 extension. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 2e32439c824..00c4e8a1ef2 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2021-09-24 Alex Coplan + + * 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 * testsuite/gas/aarch64/morello_ldst-c64.d: Update following diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index bde631d92b7..95a050cac59 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -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. */