Subject: Re: elf2bb is not sparc64 host compatible (yet)
To: None <port-amiga@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: port-amiga
Date: 09/27/2004 13:50:30
In article <20040927090146.GA79645@lorien.int.gecko.de>,
Gunther Nikl <gni@gecko.de> wrote:
>On Sat, Sep 25, 2004 at 02:44:06PM +0200, S.P.Zeidler wrote:
>> sparc64 is picky about the locations it accepts write to, so three places
>> in elf2bb main give bus errors. The attached patch takes care of that.
>
>  I don't think testing for __sparc64__ is a good fix.

No it is not... Since the original code was:

	*((u_int32_t *)(base + htobe32(ra->r_offset))) = htobe32(value);

The code should just read:

	uint32_t tmp = htobe32(value);
	(void)memcpy(base + htobe32(ra->r_offset), &tmp, sizeof(tmp));

christos