bfd: move elf_new_obj_attr to the BFD public API

This commit is contained in:
Matthieu Longo
2025-11-28 17:26:34 +00:00
parent 83f8e91b01
commit 7889178e7c
2 changed files with 7 additions and 5 deletions

View File

@@ -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);

View File

@@ -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);