[PATCH v11 02/25] Object Attributes v2: new abstractions for subsections and attributes
Matthieu Longo
matthieu.longo@arm.com
Wed Jan 14 18:02:12 GMT 2026
On 08/01/2026 11:28, Jan Beulich wrote:
> On 31.12.2025 00:05, Matthieu Longo wrote:
>> @@ -3157,6 +3182,39 @@ extern Elf_Internal_Shdr *_bfd_elf_single_rel_hdr
>> extern bool _bfd_elf_read_notes
>> (bfd *, file_ptr, bfd_size_type, size_t) ATTRIBUTE_HIDDEN;
>>
>> +extern obj_attr_v2_t *bfd_elf_obj_attr_v2_init (obj_attr_tag_t,
>> + union obj_attr_value_v2) ATTRIBUTE_HIDDEN;
>> +extern void _bfd_elf_obj_attr_v2_free (obj_attr_v2_t *, obj_attr_encoding_v2_t)
>> + ATTRIBUTE_HIDDEN;
>> +extern obj_attr_v2_t *_bfd_elf_obj_attr_v2_copy (const obj_attr_v2_t *,
>> + obj_attr_encoding_v2_t) ATTRIBUTE_HIDDEN;
>> +extern int _bfd_elf_obj_attr_v2_cmp (const obj_attr_v2_t *,
>> + const obj_attr_v2_t *) ATTRIBUTE_HIDDEN;
>> +extern obj_attr_v2_t *
>> +obj_attr_v2_find_by_tag (const obj_attr_subsection_v2_t *, obj_attr_tag_t,
>> + bool) ATTRIBUTE_HIDDEN;
>> +LINKED_LIST_MUTATIVE_OPS_PROTOTYPE(obj_attr_subsection_v2_t,
>> + obj_attr_v2_t, extern);
>> +LINKED_LIST_MERGE_SORT_PROTOTYPE_(obj_attr_v2_t, extern);
>> +LINKED_LIST_MERGE_SORT_PROTOTYPE(obj_attr_subsection_v2_t,
>> + obj_attr_v2_t, extern);
>
> Actually aren't the functions resulting from these and ...
>
>> +extern obj_attr_subsection_v2_t *bfd_elf_obj_attr_subsection_v2_init
>> + (const char*, obj_attr_subsection_scope_v2_t, bool, obj_attr_encoding_v2_t);
>> +extern void _bfd_elf_obj_attr_subsection_v2_free (obj_attr_subsection_v2_t *)
>> + ATTRIBUTE_HIDDEN;
>> +extern obj_attr_subsection_v2_t *_bfd_elf_obj_attr_subsection_v2_copy
>> + (const obj_attr_subsection_v2_t *) ATTRIBUTE_HIDDEN;
>> +extern int _bfd_elf_obj_attr_subsection_v2_cmp
>> + (const obj_attr_subsection_v2_t *, const obj_attr_subsection_v2_t *)
>> + ATTRIBUTE_HIDDEN;
>> +extern obj_attr_subsection_v2_t * obj_attr_subsection_v2_find_by_name
>> + (obj_attr_subsection_v2_t *, const char *, bool);
>> +LINKED_LIST_MUTATIVE_OPS_PROTOTYPE(obj_attr_subsection_list_t,
>> + obj_attr_subsection_v2_t, extern);
>> +LINKED_LIST_MERGE_SORT_PROTOTYPE_(obj_attr_subsection_v2_t, extern);
>> +LINKED_LIST_MERGE_SORT_PROTOTYPE(obj_attr_subsection_list_t,
>> + obj_attr_subsection_v2_t, extern);
>
> ... these also libbfd-internal? They'd want to be hidden as well then, to
> avoid counteracting my effort to remove internal functions from the dynamic
> symbol table. As it looks, simply amending the "extern" by ATTRIBUTE_HIDDEN
> will do.
>
I submitted a fix to add this attribute.
Please have a look it to check if it corresponds to what you want.
https://inbox.sourceware.org/gcc-patches/20260114174908.3440753-1-matthieu.longo@arm.com/T/#u
> Also note that there's a style issue here and for the corresponding _DECL():
> There's a blank missing ahead of the opening parentheses. (This actually
> extends to doubly-linked-list.h itself as well.)
Fixed.
>
> Okay with all respective issues sorted.
>
> Jan
Matthieu
More information about the Binutils
mailing list