[PATCH v10 04/28] gas: move code for object attribute parsing into obj-elf-attr.c
Jan Beulich
jbeulich@suse.com
Fri Nov 21 07:32:44 GMT 2025
On 20.11.2025 18:58, Matthieu Longo wrote:
> Gas, contrarilly to others binutils tools, is compiled for a specific
> target. Some targets don't support Object Attributes (OAs). For those
> cases, today the OA directive ".gnu_attribute" is still enabled but the
> processing would probably fail in most of cases because the named tag
> would be unknown. Most of the parsing code on such a target can be
> considered as dead code.
>
> This patch aims at removing this dead code from Gas when the target does
> not support the OAs by:
> - moving the code of OA parsing into a separate file under gas/config
> which is only included for the relevant targets supporting OAs.
> - disabling the code related to OAs on non-OA target via a TC_OBJ_ATTR
> macro.
>
> Adding/removing the OA feature from Gas for a specific target can easilly
> be done from tc-<arch>.h by changing the values of TC_OBJ_ATTR: 1 enabled,
> 0 disabled. You might also want to guard the enablement of OAs only for
> ELF targets with OBJ_ELF (see example below).
>
> \#ifdef OBJ_ELF
> /* The target supports Object Attributes. */
> \#define TC_OBJ_ATTR 1
> \#endif
There's again no mention of changes here, and the one unmentioned change
was asked for when giving the okay. Hence again the request - please commit
what is ready to be committed before posting a new version.
Jan
More information about the Binutils
mailing list