Subject: Re: unaligned R_SPARC_RELATIVEs (forwarded)
To: matthew green <mrg@cygnus.com>
From: James Chacon <jchacon@genuity.net>
List: tech-toolchain
Date: 12/07/2001 01:04:11
The real question is "where do you want to catch these?"

In the sparc64 case all the aligned UA64 reloc's get turned back into aligned
ones if they're already 8 byte aligned.

Anything whichs falls out after that is a bug really but getting the unknown
reloc error out of ld.so isn't very intuitive necessarily over an unaligned
access error.

James

>
>
>------- Forwarded Message
>
>Return-Path: binutils-owner@sources.redhat.com
>Delivery-Date: Fri Dec  7 12:01:18 2001
>Received: from runyon.cygnus.com [205.180.230.5]
>	by localhost with IMAP (fetchmail-5.8.3)
>	for mrg@localhost (single-drop); Fri, 07 Dec 2001 12:01:18 +1100 (EST)
>Received: from sources.redhat.com (sourceware.cygnus.com [209.249.29.67])
>	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)
>Received: (qmail 18185 invoked by alias); 7 Dec 2001 01:00:24 -0000
>Received: (qmail 18142 invoked from network); 7 Dec 2001 01:00:14 -0000
>Received: from unknown (HELO delorie.com) (207.22.48.162)
>  by sources.redhat.com with SMTP; 7 Dec 2001 01:00:14 -0000
>Received: from envy.delorie.com (envy.delorie.com [207.22.48.171])
>	by delorie.com (8.11.6/8.9.1) with ESMTP id fB7109F22885;
>	Thu, 6 Dec 2001 20:00:09 -0500
>Received: (from dj@localhost)
>	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
>Precedence: bulk
>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
>Delivered-To: mailing list binutils@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
>
>
>
>
>