From 7889178e7cb112334b8e9f45ce55aaf062728223 Mon Sep 17 00:00:00 2001 From: Matthieu Longo Date: Fri, 28 Nov 2025 17:26:34 +0000 Subject: [PATCH] bfd: move elf_new_obj_attr to the BFD public API --- bfd/elf-attrs.c | 10 +++++----- bfd/elf-bfd.h | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c index 3085bc53e4c..751c9e5d473 100644 --- a/bfd/elf-attrs.c +++ b/bfd/elf-attrs.c @@ -235,8 +235,8 @@ bfd_elf_set_obj_attr_contents (bfd *abfd, bfd_byte *buffer, bfd_vma size) } /* Allocate/find an object attribute. */ -static obj_attribute * -elf_new_obj_attr (bfd *abfd, obj_attr_vendor_t vendor, obj_attr_tag_t tag) +obj_attribute * +bfd_elf_new_obj_attr (bfd *abfd, obj_attr_vendor_t vendor, obj_attr_tag_t tag) { obj_attribute *attr; obj_attribute_list *list; @@ -311,7 +311,7 @@ bfd_elf_add_obj_attr_int (bfd *abfd, { obj_attribute *attr; - attr = elf_new_obj_attr (abfd, vendor, tag); + attr = bfd_elf_new_obj_attr (abfd, vendor, tag); if (attr != NULL) { attr->type = bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); @@ -354,7 +354,7 @@ elf_add_obj_attr_string (bfd *abfd, obj_attr_vendor_t vendor, obj_attr_tag_t tag { obj_attribute *attr; - attr = elf_new_obj_attr (abfd, vendor, tag); + attr = bfd_elf_new_obj_attr (abfd, vendor, tag); if (attr != NULL) { attr->type = bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); @@ -385,7 +385,7 @@ elf_add_obj_attr_int_string (bfd *abfd, { obj_attribute *attr; - attr = elf_new_obj_attr (abfd, vendor, tag); + attr = bfd_elf_new_obj_attr (abfd, vendor, tag); if (attr != NULL) { attr->type = bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index b2aeb2ba0ca..4fa4461cba3 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -3122,6 +3122,8 @@ extern bfd *_bfd_elf64_bfd_from_remote_memory extern bfd_vma bfd_elf_obj_attr_size (bfd *); extern void bfd_elf_set_obj_attr_contents (bfd *, bfd_byte *, bfd_vma); +extern obj_attribute * +bfd_elf_new_obj_attr (bfd *, obj_attr_vendor_t, obj_attr_tag_t); extern int bfd_elf_get_obj_attr_int (bfd *, obj_attr_vendor_t, obj_attr_tag_t); extern obj_attribute *bfd_elf_add_obj_attr_int (bfd *, obj_attr_vendor_t, obj_attr_tag_t, unsigned int);