From owner-freebsd-alpha Thu Feb 21 15:13:47 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 8781937B416; Thu, 21 Feb 2002 15:13:22 -0800 (PST) Received: (from uucp@localhost) by srv1.cosmo-project.de (8.11.6/8.11.6) with UUCP id g1LNDLn33275; Fri, 22 Feb 2002 00:13:21 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (cicely8.cicely.de [10.1.2.10]) by cicely5.cicely.de (8.12.1/8.12.1) with ESMTP id g1LNCxYd005130; Fri, 22 Feb 2002 00:12:59 +0100 (CET)?g (envelope-from ticso@cicely8.cicely.de) Received: (from ticso@localhost) by cicely8.cicely.de (8.11.6/8.11.6) id g1LNCwj57775; Fri, 22 Feb 2002 00:12:58 +0100 (CET) (envelope-from ticso) Date: Fri, 22 Feb 2002 00:12:58 +0100 From: Bernd Walter To: Terry Lambert Cc: Andrew Gallatin , Doug Rabson , peter@FreeBSD.ORG, jdp@FreeBSD.ORG, freebsd-alpha@FreeBSD.ORG Subject: Re: alpha klds and the new linker Message-ID: <20020221231258.GG56929@cicely8.cicely.de> References: <15477.3715.6908.110667@grasshopper.cs.duke.edu> <15477.29709.908299.287618@grasshopper.cs.duke.edu> <3C757D63.73B903C9@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C757D63.73B903C9@mindspring.com> User-Agent: Mutt/1.3.26i X-Operating-System: FreeBSD cicely8.cicely.de 5.0-CURRENT i386 Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, Feb 21, 2002 at 03:06:11PM -0800, Terry Lambert wrote: > Andrew Gallatin wrote: > > I think I've fixed it. If I remove the '*where' from the addr > > calculation, all seems to be fine. I don't really know enough about > > how elf is supposed to work to want to commit this without a review. > > > > Anybody care to say this is "OK" ? > > > > Index: elf_machdep.c > > =================================================================== > > RCS file: /home/ncvs/src/sys/alpha/alpha/elf_machdep.c,v > > retrieving revision 1.7 > > diff -u -r1.7 elf_machdep.c > > --- elf_machdep.c 28 Aug 1999 00:38:25 -0000 1.7 > > +++ elf_machdep.c 21 Feb 2002 22:22:14 -0000 > > @@ -101,7 +101,7 @@ > > break; > > > > case R_ALPHA_RELATIVE: > > - addr = relocbase + addend + *where; > > + addr = relocbase + addend; > > if (*where != addr) > > *where = addr; > > break; > > I think this is backwards; I think the "*where" is missing > in the reference location. Don't ask me how to figure it > out without keeping a linked list of ELF things lying around > and traversing it twice, though. 8-(. At least it's identic to the i386 variant: case R_386_RELATIVE: /* B + A */ addr = relocbase + addend; if (*where != addr) *where = addr; break; -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message