[PATCH]: Allow relative calculations for non-R_*_RELATIVE relocs.

Ian Lance Taylor iant@google.com
Fri Feb 12 23:21:00 GMT 2010


David Miller <davem@davemloft.net> writes:

> However, I just want to make you aware the R_SPARC_OLO10 relocations
> on 64-bit sparc use the upper 24-bits of the r_type field to store
> part of the relocation.
>
> And I'm just concerned that shrinking the amount of bits in type_ will
> cause problems in this area.
>
> In fact I wonder if it being 30 bits can potentially cause problems
> already.  The BFD backend extracts this sub-relocation using the
> macro:
>
> #define ELF64_R_TYPE_DATA(info) \
>   (((bfd_signed_vma)(ELF64_R_TYPE(info) >> 8) ^ 0x800000) - 0x800000)
>
> from include/elf/sparc.h
>
> So it looks like, as-is, negative values in these sub-relocations
> would not work in GOLD.


Argh, I did not know that.  Please make it 29 bits for the moment and
then lets deal with that separately.

Ian



More information about the Binutils mailing list