[PATCH v10 06/28] gas: implement parsing of object attributes v2
Matthieu Longo
matthieu.longo@arm.com
Fri Nov 28 17:40:06 GMT 2025
On 28/11/2025 14:29, Jan Beulich wrote:
>> /* 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;
>> @@ -335,7 +497,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);
>> @@ -378,7 +540,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);
>> @@ -409,7 +571,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);
> Especially when a patch is already pretty big, such renaming could easily (and
> helpfully) be broken out.
This renaming was done to follow what your recommendation, i.e. if a function is part of the public API, it should have the "bfd_" prefix.
This patch is the one starting to use it outside of bfd, so shouldn't it also be the one changing its scope ?
Matthieu
More information about the Binutils
mailing list