This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: unaligned R_SPARC_RELATIVEs
- From: DJ Delorie <dj at delorie dot com>
- To: binutils at sources dot redhat dot com
- Cc: mrauch at netbsd dot org
- Date: Thu, 6 Dec 2001 19:55:09 -0500
- Subject: Re: unaligned R_SPARC_RELATIVEs
- References: <200112052131.fB5LVmD18181@greed.delorie.com>
> 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?