Subject: Re: unaligned R_SPARC_RELATIVEs (forwarded)
To: None <tech-toolchain@netbsd.org>
From: matthew green <mrg@cygnus.com>
List: tech-toolchain
Date: 12/07/2001 13:05:21
------- Forwarded Message

Delivery-Date: Fri Dec  7 12:01:18 2001
	by localhost with IMAP (fetchmail-5.8.3)
	for mrg@localhost (single-drop); Fri, 07 Dec 2001 12:01:18 +1100 (EST)
	by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with SMTP id RAA10860
	for <mrg@cygnus.com>; Thu, 6 Dec 2001 17:00:37 -0800 (PST)
  by sources.redhat.com with SMTP; 7 Dec 2001 01:00:14 -0000
	by delorie.com (8.11.6/8.9.1) with ESMTP id fB7109F22885;
	Thu, 6 Dec 2001 20:00:09 -0500
	by envy.delorie.com (8.11.6/8.11.2) id fB70t9u10807;
	Thu, 6 Dec 2001 19:55:09 -0500
Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm
List-Unsubscribe: <mailto:binutils-unsubscribe-mrg=cygnus.com@sources.redhat.com>
List-Subscribe: <mailto:binutils-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/binutils/>
List-Post: <mailto:binutils@sources.redhat.com>
List-Help: <mailto:binutils-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: binutils-owner@sources.redhat.com
Date: Thu, 6 Dec 2001 19:55:09 -0500
Message-Id: <200112070055.fB70t9u10807@envy.delorie.com>
From: DJ Delorie <dj@delorie.com>
To: binutils@sources.redhat.com
CC: mrauch@netbsd.org
In-reply-to: <200112052131.fB5LVmD18181@greed.delorie.com> (message from DJ
	Delorie on Wed, 5 Dec 2001 16:31:48 -0500)
Subject: Re: unaligned R_SPARC_RELATIVEs
References:  <200112052131.fB5LVmD18181@greed.delorie.com>
Content-Type: text
Content-Length: 810


> 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?

------- End of Forwarded Message