[PATCH v6 02/19] gas: move code for object attribute parsing into obj-elf-attr.c
Jan Beulich
jbeulich@suse.com
Tue Jul 15 06:42:02 GMT 2025
On 14.07.2025 18:41, Matthieu Longo wrote:
> On 2025-07-14 09:25, Jan Beulich wrote:
>> On 11.07.2025 13:28, Matthieu Longo wrote:
>>> --- a/gas/config/tc-mips.h
>>> +++ b/gas/config/tc-mips.h
>>> @@ -217,4 +217,9 @@ extern bfd_reloc_code_real_type mips_cfi_reloc_for_encoding (int encoding);
>>> #define CONVERT_SYMBOLIC_ATTRIBUTE(name) mips_convert_symbolic_attribute (name)
>>> extern int mips_convert_symbolic_attribute (const char *);
>>>
>>> +#ifdef OBJ_ELF
>>> +/* The target supports Object Attributes. */
>>> +#define TC_OBJ_ATTR 1
>>> +#endif
>>
>> What about OBJ_MAYBE_ELF? The header uses it elsewhere. Did you firmly
>> determine that's unnecessary? (If so, please mention such in the description.
>> Also please be sure to Cc arch maintainers of arch files you touch.)
>
> In my understanding, OBJ_MAYBE_ELF is not necessary because only ELF
> files support object attributes on MIPS (the only merge I could find is
> inside mips_elf_merge_obj_attributes).
>
> I will Cc the MIPS maintainer to make sure that this is correct.
Judging from the respective configure.tgt section, only (a mix of) ELF
is supported. So it indeed looks like the use of OBJ_MAYBE_ELF in the
header is stale.
>>> --- a/gas/configure.ac
>>> +++ b/gas/configure.ac
>>> @@ -454,6 +454,19 @@ changequote([,])dnl
>>> ;;
>>> esac
>>>
>>> + # Does the target support Object Attributes ?
>>> + case ${cpu_type} in
>>> + aarch64* | arc* | arm* | csky | m68k | mips* | msp430 | powerpc* \
>>> + | riscv* | s390* | sparc* | tic6x)
>>
>> Why is aarch64 included here? You don't edit tc-aarch64.h. Aren't you
>> transiently breaking that target anyway, by removing v1 support from it
>> before adding v2 support?
>
> Sorry, that's a miss when I moved the patch down into history. I missed
> aarch64. Fixed in the next revision.
I've peeked at the v3 patch, and while I see you removed the aarch64* from
here, my other question remained unanswered. Putting it differently: Was I
under the wrong impression that Arm64 supported the v1 variant of object
attributes?
Jan
More information about the Binutils
mailing list