[binutils-gdb] bfd: move elf_new_obj_attr to the BFD public API
Matthieu Longo
mlongo@sourceware.org
Mon Jan 19 14:28:38 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7889178e7cb112334b8e9f45ce55aaf062728223
commit 7889178e7cb112334b8e9f45ce55aaf062728223
Author: Matthieu Longo <matthieu.longo@arm.com>
Date: Fri Nov 28 17:26:34 2025 +0000
bfd: move elf_new_obj_attr to the BFD public API
Diff:
---
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);
More information about the Binutils-cvs
mailing list