gas, sparc, dwarf2, and R_SPARC_(UA)64
Nick Clifton
nickc@redhat.com
Tue Jul 13 08:55:00 GMT 2004
Hi Jakub, Hi DJ,
> Jakub wrote:
> Just verified that Sun ld at least in Solaris 8 is dumb enough
> not to convert UA* relocs on aligned locations into their aligned
> counterparts.
> Wouldn't it be easier to simply convert aligned relocs to unaligned ones
> when writing them by gas if it detects misaligned location
> (or, use unaligned ones internally as you had in the patch, but when
> writing them into .o file convert the aligned ones from UA* to non-UA*
> relocs)?
So this means that in order to be compatible with the Solaris native
linker GAS has to generate aligned relocs for aligned locations and
unaligned relocs for unaligned locations. Is that right ? Plus it must
not generate unaligned relocs for aligned locations or aligned relocs
for unaligned locations ?
> Wouldn't it be easier to simply convert aligned relocs to unaligned
> ones when writing them by gas if it detects misaligned location
: DJ wrote:
: My initial patch did just that (that's why there's a suspiciously
: lonely looking conditional and recursion there ;)
It did ? I must have missed that. It looked to me like it just
reinvoked cons_fix_new_sparc() with sparc_no_align_cons set if
sparc_no_align_cons was clear.
: but it didn't catch all the cases.
Do you remember what those cases were ?
: I suppose I could re-debug those cases if needed, but it looked like
: gas just didn't know enough to ensure that kind of alignment after
: linking (don't know why).
I guess that we are going to have to find out.
Cheers
Nick
More information about the Binutils
mailing list