[PATCH 22/27] bfd/ELF: _bfd_elf_obj_attrs_arg_type() is exposed to gas

Jan Beulich jbeulich@suse.com
Mon Oct 27 14:22:59 GMT 2025
As a non-private function, it shouldn't have a "_bfd_" prefix, but merely
a "bfd_" one.

--- a/bfd/elf-attrs.c
+++ b/bfd/elf-attrs.c
@@ -309,7 +309,7 @@ bfd_elf_add_obj_attr_int (bfd *abfd, 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
   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,
   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
 		  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:
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -3117,7 +3117,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;
--- 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;



More information about the Binutils mailing list