Date: Fri, 08 Feb 2002 15:01:44 -0800 From: Peter Wemm <peter@wemm.org> To: John Polstra <jdp@polstra.com>, Andrew Gallatin <gallatin@cs.duke.edu>, freebsd-alpha@FreeBSD.ORG Subject: Re: more on recent current alpha rtld/binutils breakage. Message-ID: <20020208230144.AB2893BAC@overcee.wemm.org> In-Reply-To: <20020208224838.2037039F1@overcee.wemm.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Peter Wemm wrote: > John Polstra wrote: > > On 08-Feb-02 Andrew Gallatin wrote: > > > > > > So its like the _rtld function hasn't been relocated. > > > > It's called from rtld-elf/alpha/rtld_start.S, and there's some code > > just before that point which is supposed to relocate the global > > offset table in order to make that possible. I think that's the > > area where things are going wrong. > > The relocation records are different now: This is a red herring. I have found the real problem.. rtld_start.S: /* Step 2 -- Find bounds of global offset table */ lda t5, _GLOBAL_OFFSET_TABLE_ addq t8, t5, t9 /* add the displacement */ lda t4, _DYNAMIC addq t8, t4, t10 /* add the displacement */ Note that we assume that the got goes from _GLOBAL_OFFSET_TABLE_ through to _DYNAMIC. This *was* true on the old ld: 8 .plt 00000000 000000000002d4b8 000000000002d4b8 0001d4b8 2**3 CONTENTS, ALLOC, LOAD, CODE 9 .got 00000bf8 000000000002d4b8 000000000002d4b8 0001d4b8 2**3 CONTENTS, ALLOC, LOAD, DATA 10 .dynamic 000000b0 000000000002e0b0 000000000002e0b0 0001e0b0 2**3 CONTENTS, ALLOC, LOAD, DATA .. but on the new ld: 8 .dynamic 00000100 000000000002d390 000000000002d390 0001d390 2**3 CONTENTS, ALLOC, LOAD, DATA 9 .plt 00000000 000000000002d490 000000000002d490 0001d490 2**3 CONTENTS, ALLOC, LOAD, CODE 10 .got 00000c00 000000000002d490 000000000002d490 0001d490 2**3 CONTENTS, ALLOC, LOAD, DATA 11 .sbss 00000108 000000000002e090 000000000002e090 0001e090 2**3 ALLOC, SMALL_DATA ie: our end point calculation of the end of the GOT is hosed since _DYNAMIC is *before* _GLOBAL_OFFSET_TABLE_ now, not at the end point. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020208230144.AB2893BAC>