[binutils-gdb] bfd: rename old references to build attributes

Matthieu Longo mlongo@sourceware.org
Mon Nov 24 10:18:28 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d15d8e417dd4322d432bf864275c87b2633a31b3

commit d15d8e417dd4322d432bf864275c87b2633a31b3
Author: Matthieu Longo <matthieu.longo@arm.com>
Date:   Tue Nov 11 10:50:23 2025 +0000

    bfd: rename old references to build attributes
    
    A previous refactoring patch [1] introduced "build_attributes" in the
    functions naming. However this naming is specific to the AArch64 Build
    Attributes specification, and should be replaced by "object_attributes"
    going forward.
    
    [1]: 011e50143f0ec1be271f93facb56def9394947d2

Diff:
---
 bfd/elf-attrs.c | 6 +++---
 bfd/elf-bfd.h   | 8 ++++----
 bfd/elflink.c   | 4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c
index 56cff60d5b7..c9d2d5dbae5 100644
--- a/bfd/elf-attrs.c
+++ b/bfd/elf-attrs.c
@@ -818,10 +818,10 @@ _bfd_elf_merge_unknown_attribute_list (bfd *ibfd, bfd *obfd)
   return result;
 }
 
-bool _bfd_elf_write_section_build_attributes (bfd *abfd,
-					      struct bfd_link_info *info ATTRIBUTE_UNUSED)
+bool _bfd_elf_write_section_object_attributes
+  (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
 {
-  asection *sec = elf_obj_build_attributes (abfd);
+  asection *sec = elf_obj_object_attributes (abfd);
 
   if (sec == NULL)
     return true;
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 73c5a5a0ec6..b8daceaff7f 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -2039,8 +2039,8 @@ struct output_elf_obj_tdata
      created.  */
   asection *sframe;
 
-  /* Holds the build attributes section if it exists.  */
-  asection *obj_build_attributes;
+  /* Holds the object attributes section if it exists.  */
+  asection *obj_object_attributes;
 
   /* Used to determine if the e_flags field has been initialized */
   bool flags_init;
@@ -2229,8 +2229,8 @@ struct elf_obj_tdata
 #define elf_next_file_pos(bfd)	(elf_tdata(bfd) -> o->next_file_pos)
 #define elf_stack_flags(bfd)	(elf_tdata(bfd) -> o->stack_flags)
 #define elf_sframe(bfd)		(elf_tdata(bfd) -> o->sframe)
-#define elf_obj_build_attributes(bfd) \
-				(elf_tdata(bfd) -> o->obj_build_attributes)
+#define elf_obj_object_attributes(bfd) \
+				(elf_tdata(bfd) -> o->obj_object_attributes)
 #define elf_shstrtab(bfd)	(elf_tdata(bfd) -> o->strtab_ptr)
 #define elf_onesymtab(bfd)	(elf_tdata(bfd) -> symtab_section)
 #define elf_symtab_shndx_list(bfd)	(elf_tdata(bfd) -> symtab_shndx_list)
diff --git a/bfd/elflink.c b/bfd/elflink.c
index ec3ad9735fe..b72faff7fd8 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -12715,7 +12715,7 @@ _bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
 	     _bfd_elf_compute_section_file_positions.  */
 	  bfd_set_section_size (o, attr_size);
 	  if (attr_size > 0)
-	    elf_obj_build_attributes (abfd) = o;
+	    elf_obj_object_attributes (abfd) = o;
 	  else
 	    remove_section = true;
 	}
@@ -13830,7 +13830,7 @@ _bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
   if (! _bfd_elf_write_section_sframe (abfd, info))
     goto error_return;
 
-  if (! _bfd_elf_write_section_build_attributes (abfd, info))
+  if (! _bfd_elf_write_section_object_attributes (abfd, info))
     goto error_ret2;
 
   if (info->callbacks->emit_ctf)


More information about the Binutils-cvs mailing list