This is the mail archive of the binutils@sources.redhat.com 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: unaligned R_SPARC_RELATIVEs


On Thu, Dec 06, 2001 at 07:55:09PM -0500, DJ Delorie wrote:
> 
> > I'm seeing R_SPARC_RELATIVEs with the LSB still set.  If someone knows
> > a fix off the top of your head (Jakub?), please shout, else I'll debug
> > it myself when it bubbles back to the top of my todo list.
> 
> Tracked it down to this:
> 
> 2001-09-14  Michael Rauch <mrauch@netbsd.org>
> 
> 	* elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
> 	just like R_SPARC_32.
> 
> I couldn't find any discussion about this in the binutils mail
> archives (just a few emails on the netbsd archives), but it seems
> wrong to me.  You can't have an unaligned R_SPARC_RELATIVE, so putting
> one on R_SPARC_UA32 just breaks in ld.so.1 - it aborts with an
> unaligned access error.
> 
> Note that elf32-sparc.c now converts UA32 relocs to aligned relocs if
> the address happens to be aligned; maybe the above patch is no longer
> needed?

FYI, the conversion is sufficient to catch the original problem.

Michael


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