From owner-freebsd-alpha Thu Feb 21 15: 6:28 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from avocet.prod.itd.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by hub.freebsd.org (Postfix) with ESMTP id E755737B400; Thu, 21 Feb 2002 15:06:25 -0800 (PST) Received: from pool0385.cvx22-bradley.dialup.earthlink.net ([209.179.199.130] helo=mindspring.com) by avocet.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16e2I9-0007FT-00; Thu, 21 Feb 2002 15:06:22 -0800 Message-ID: <3C757D63.73B903C9@mindspring.com> Date: Thu, 21 Feb 2002 15:06:11 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Andrew Gallatin Cc: Doug Rabson , peter@freebsd.org, jdp@freebsd.org, freebsd-alpha@freebsd.org Subject: Re: alpha klds and the new linker References: <15477.3715.6908.110667@grasshopper.cs.duke.edu> <15477.29709.908299.287618@grasshopper.cs.duke.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 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-(. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message