[PATCH v10 26/28] gnu directives: gas/readelf tests for gnu attributes v2
Matthieu Longo
matthieu.longo@arm.com
Mon Dec 22 11:21:05 GMT 2025
On 22/12/2025 08:26, Jan Beulich wrote:
> On 19.12.2025 17:42, Matthieu Longo wrote:
>> On 19/12/2025 09:29, Jan Beulich wrote:
>>> On 20.11.2025 18:59, Matthieu Longo wrote:
>>>> These tests are a copy-paste of the generic parsing tests for AArch64.
>>>
>>> Since something similar is said in patch 28 as well: Why is this duplication
>>> needed? Can parts be de-duplicated (shared) here and/or there?
>>
>> AArch64 tests cover the aeabi_* directives, whereas those tests cover the gnu_subsection and gnu_attribute directives.
>> Indeed they were copy-pasted from AArch64 tests and adapted to the gnu directives, but they are not a substitute.
>
> I also didn't suspect they would be. I understand both want testing, yet still
> I wonder if the redundancy can be shrunk. E.g. by sharing expectations and/or
> source code (by using some suitable abstraction, e.g. macro-ization).
>
> Jan
Sharing expectations and source code between a generic folder and AArch64 one does not seem a good idea in the long term. How do you decide what goes into generic, and what goes into AArch64 ?
In term of organization, it also makes things more cryptic and difficult to track for developers.
Finally, sharing the source code is not easy given that the directives have different names. Did you have in mind using a kind of macro (I am not sure if that exists in Gas, I only know about -defsym allowing to do similar things) ?
Matthieu
More information about the Binutils
mailing list