[PATCH v12 02/25] Object Attributes v2: new abstractions for subsections and attributes
Matthieu Longo
matthieu.longo@arm.com
Fri Jan 23 12:17:12 GMT 2026
On 23/01/2026 11:24, Maciej W. Rozycki wrote:
> On Mon, 19 Jan 2026, Matthieu Longo wrote:
>
>>> As before - okay with the small issues fully addressed (and assuming you've
>>> got an Arm64-side okay already).
>>>> Jan
>>
>> Richard Earnshaw gave an ok in revision 5 for all AArch64 changes.
>> https://inbox.sourceware.org/binutils/8ced4c59-bf9b-4f36-b8fc-64240294f223@arm.com/
>> There was some changes since he had a look, but I think they fall in the minor
>> category given his previous approval.
>
> This patch caused hundreds of regressions for `csky-elf' and `csky-linux'
> making the targets unusable:
>
> .../gas/as-new: BFD (GNU Binutils) 2.45.50.20260123 assertion fail .../bfd/elf-attrs.c:2515
>
> Please have a look into it.
>
> Maciej
Hi Maciej,
Here is a first patch to "solve" the issue:
diff --git a/gas/config/tc-csky.c b/gas/config/tc-csky.c
index c56914c8c57..81b79c2b6c7 100644
--- a/gas/config/tc-csky.c
+++ b/gas/config/tc-csky.c
@@ -1712,6 +1712,9 @@ md_begin (void)
mach_flag |= CSKY_ARCH_610;
}
+ elf_obj_attr_version (stdoutput)
+ = get_elf_backend_data (stdoutput)->default_obj_attr_version;
+
/* Find bfd_mach_flag, it will set to bfd backend data. */
for (p_arch = csky_archs; p_arch->arch_flag != 0; p_arch++)
if ((mach_flag & CSKY_ARCH_MASK) == (p_arch->arch_flag & CSKY_ARCH_MASK))
However, I am wondering if this is the right place to do such an initialization.
The initialization of the default attribute version occurs inside elf_begin() in obj-elf.c
I need to have a deeper look at where the csky arch and cpu are available to see if this wild initialization can be removed, or whether the itialization in elf_begin() should be moved somewhere else.
Please let me know if you would like to apply this fix in the meantime to unblock you.
Adding also Alan Modra in copy, as he raised to me the issue in a separate thread.
Matthieu
More information about the Binutils
mailing list