Date: Fri, 22 Feb 2002 00:12:58 +0100 From: Bernd Walter <ticso@cicely8.cicely.de> To: Terry Lambert <tlambert2@mindspring.com> Cc: Andrew Gallatin <gallatin@cs.duke.edu>, Doug Rabson <dfr@nlsystems.com>, 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> In-Reply-To: <3C757D63.73B903C9@mindspring.com> References: <15477.3715.6908.110667@grasshopper.cs.duke.edu> <Pine.BSF.4.33.0202211623290.89657-100000@herring.nlsystems.com> <15477.29709.908299.287618@grasshopper.cs.duke.edu> <3C757D63.73B903C9@mindspring.com>
index | next in thread | previous in thread | raw e-mail
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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020221231258.GG56929>
