[PATCH] elf/riscv: Fix relaxation with aliases [PR28021]
Michael Matz
matz@suse.de
Mon Jun 28 16:36:18 GMT 2021
Hello,
On Mon, 28 Jun 2021, Michael Matz wrote:
> the fix for PR22756 only changed behaviour for hidden aliases,
> but the same situation exists for non-hidden aliases: sym_hashes[]
> can contain multiple entries pointing to the same symbol structure
> leading to relaxation adjustment to be applied twice.
>
> Fix this by testing for duplicates for everything that looks like it
> has a version.
>
> [tested by a testsuite run on a x86-64->riscv64 cross binutils]
Oh, and, I'm unhappy with how I test for the situation, but couldn't find
a different way. Ideally I want to test that both symbols have the same
value in the resulting shared lib. But that's outside the power of
regexps, and our test infrastructure doesn't seem to have an easy way for
such more complete matching. A runtime test would be easy, but I don't
want that either.
So, if there are ideas how to test for equality of two symbol addresses
within our test framework: I'm all ears.
Ciao,
Michael.
More information about the Binutils
mailing list