[PATCH v11 17/25] OAv2 merge: prune unsupported or invalid subsections and attributes

Jan Beulich jbeulich@suse.com
Thu Jan 8 14:13:50 GMT 2026


On 31.12.2025 00:05, Matthieu Longo wrote:
> During the merge, each subsection and attribute is assigned a status.
> If the status is OK, the item is retained and serialized into the
> output object. Otherwise, unsupported or invalid subsections and
> attributes are pruned before serialization.
> 
> When a subsection or attribute is pruned, ld emits information-level
> messages to inform the user, preventing confusion about the absence
> of elements that were present in the input objects.
> ---
>  bfd/elf-attrs.c | 77 +++++++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 72 insertions(+), 5 deletions(-)

Okay with, as before, ...

> --- a/bfd/elf-attrs.c
> +++ b/bfd/elf-attrs.c
> @@ -2023,14 +2023,81 @@ oav2_merge_all (const struct bfd_link_info *info,
>    return success;
>  }
>  
> +/* Prune the given attribute, and return the next one in the list.  */
> +static obj_attr_v2_t *
> +oav2_attr_delete (obj_attr_subsection_v2_t *subsec,
> +		  obj_attr_v2_t *attr)
> +{
> +  obj_attr_v2_t *next = attr->next;
> +  LINKED_LIST_REMOVE(obj_attr_v2_t) (subsec, attr);

... the style issue here and below addressed.

Jan


More information about the Binutils mailing list