This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


From: Ian Lance Taylor <iant@google.com>
Date: Fri, 12 Feb 2010 15:01:21 -0800

> Also this is going to make the struct one word larger.  Please change
> type_ to be a 29-bit bitfield.  That should be fine in practice, and
> the code already double-checks that the r_type value fits in the
> field.

I can do this.

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]