[PATCH] ia64: Fix .rela.got sizing for __ehdr_start during relaxation
Frank Scheiner
frank.scheiner@web.de
Sat Nov 28 14:08:30 GMT 2026
On 27.11.26 12:12, Jan Beulich wrote:
> On 21.11.2026 15:52, Frank Scheiner wrote:
>> [...]
>> Fix this by excluding __ehdr_start (identified via
>> elf_hash_table(info)->hehdr_start) from the resolved_zero optimization
>> in allocate_dynrel_entries(). This ensures its GOT relocation slot is
>> consistently allocated regardless of which sizing pass is evaluating it.
>
> I can see how this will help, yet I wonder whether doing this for one
> specific symbol is appropriate (such an approach doesn't scale). Isn't
> there a more egeneric property which can be checked instead?
Good point. I didn't consider that.
But there is indeed a more generic property (linker_def) that, when used
in the resolved_zero computation, solves the issue during testing for
dynamic musl builds for ia64, too, same as the current one. It's also
employed for riscv in d08515a68e5b ([1]).
[1]: https://forge.sourceware.org/binutils-gdb/binutils-gdb-mirror/commit/d08515a68e5b
As said, this makes the dynamic musl build succeed, but I haven't yet
tested this in combination with Matt's earlier patch set ([PATCH 0/4]
ia64: Fix undefined weak symbol handling, [2]) which touches the same
place. Testing it alone didn't help for my problem, though. So I'll
test the combination, too, before proceeding.
[2]: https://sourceware.org/pipermail/binutils/2026-October/152061.html
And I still want to run the testsuites against it on real hardware.
If there are no regressions I'll post a v2 here. Should this then be
already based on Matt's changes, although they are not yet upstream?
Cheers
Frank
More information about the Binutils
mailing list