[v1,08/14] clean-up aarch64: move the name of the build attributes section into include/elf/aarch64.h

Message ID 20250227104811.178094-9-matthieu.longo@arm.com
State New
Headers
Series Several clean-ups and refactorings before a long patch series on AArch64 build attributes |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply

Commit Message

Matthieu Longo Feb. 27, 2025, 10:47 a.m. UTC
  ---
 bfd/elfnn-aarch64.c   | 2 +-
 include/elf/aarch64.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 968e3ee047c..548da1f8b30 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -10761,7 +10761,7 @@  const struct elf_size_info elfNN_aarch64_size_info =
 #define elf_backend_hash_symbol elf_aarch64_hash_symbol
 
 #undef	elf_backend_obj_attrs_section
-#define elf_backend_obj_attrs_section		".ARM.attributes"
+#define elf_backend_obj_attrs_section		SEC_AARCH64_ATTRIBUTES
 
 #include "elfNN-target.h"
 
diff --git a/include/elf/aarch64.h b/include/elf/aarch64.h
index d7904bb0357..e218e07fa73 100644
--- a/include/elf/aarch64.h
+++ b/include/elf/aarch64.h
@@ -30,6 +30,8 @@ 
 /* MTE memory tag segment type.  */
 #define PT_AARCH64_MEMTAG_MTE     (PT_LOPROC + 0x2)
 
+/* Name of the ELF section holding the attributes.  */
+#define SEC_AARCH64_ATTRIBUTES	".ARM.attributes"
 /* Additional section types.  */
 /* Section holds attributes.  */
 #define SHT_AARCH64_ATTRIBUTES	(SHT_LOPROC + 3)