From 4a890d55ada04cb8054bdbbd6677ecebadb20455 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 7 Nov 2025 14:59:16 +0100 Subject: [PATCH] bfd/ELF: _bfd_elf_obj_attrs_arg_type() is exposed to gas As a non-private function, it shouldn't have a "_bfd_" prefix, but merely a "bfd_" one. --- bfd/elf-attrs.c | 10 +++++----- bfd/elf-bfd.h | 2 +- gas/config/obj-elf.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c index bc653d780de..56cff60d5b7 100644 --- a/bfd/elf-attrs.c +++ b/bfd/elf-attrs.c @@ -309,7 +309,7 @@ bfd_elf_add_obj_attr_int (bfd *abfd, int vendor, unsigned int tag, unsigned int attr = elf_new_obj_attr (abfd, vendor, tag); if (attr != NULL) { - attr->type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); + attr->type = bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); attr->i = i; } return attr; @@ -352,7 +352,7 @@ elf_add_obj_attr_string (bfd *abfd, int vendor, unsigned int tag, attr = elf_new_obj_attr (abfd, vendor, tag); if (attr != NULL) { - attr->type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); + attr->type = bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); attr->s = elf_attr_strdup (abfd, s, end); if (attr->s == NULL) return NULL; @@ -377,7 +377,7 @@ elf_add_obj_attr_int_string (bfd *abfd, int vendor, unsigned int tag, attr = elf_new_obj_attr (abfd, vendor, tag); if (attr != NULL) { - attr->type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); + attr->type = bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); attr->i = i; attr->s = elf_attr_strdup (abfd, s, end); if (attr->s == NULL) @@ -474,7 +474,7 @@ gnu_obj_attrs_arg_type (unsigned int tag) /* Determine what arguments an attribute tag takes. */ int -_bfd_elf_obj_attrs_arg_type (bfd *abfd, int vendor, unsigned int tag) +bfd_elf_obj_attrs_arg_type (bfd *abfd, int vendor, unsigned int tag) { switch (vendor) { @@ -565,7 +565,7 @@ bfd_elf_parse_attr_section_v1 (bfd *abfd, bfd_byte *p, bfd_byte *p_end) bool ok = false; tag = _bfd_safe_read_leb128 (abfd, &p, false, end); - type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); + type = bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); switch (type & (ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_STR_VAL)) { case ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_STR_VAL: diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 8f5fb764324..daad2031902 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -3122,7 +3122,7 @@ extern char *_bfd_elf_attr_strdup (bfd *, const char *) ATTRIBUTE_HIDDEN; extern void _bfd_elf_copy_obj_attributes (bfd *, bfd *) ATTRIBUTE_HIDDEN; -extern int _bfd_elf_obj_attrs_arg_type +extern int bfd_elf_obj_attrs_arg_type (bfd *, int, unsigned int); extern void _bfd_elf_parse_attributes (bfd *, Elf_Internal_Shdr *) ATTRIBUTE_HIDDEN; diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index ccf020f5a84..cc1f485ae54 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -2193,7 +2193,7 @@ obj_elf_vendor_attribute (int vendor) free (name); } - type = _bfd_elf_obj_attrs_arg_type (stdoutput, vendor, tag); + type = bfd_elf_obj_attrs_arg_type (stdoutput, vendor, tag); if (skip_past_comma (&input_line_pointer) == -1) goto bad; -- 2.47.3