From owner-freebsd-alpha Fri Feb 8 15: 1:51 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by hub.freebsd.org (Postfix) with ESMTP id 71E9C37B41C for ; Fri, 8 Feb 2002 15:01:45 -0800 (PST) Received: from peter3.wemm.org ([12.232.27.13]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020208230145.PQXO1147.rwcrmhc52.attbi.com@peter3.wemm.org> for ; Fri, 8 Feb 2002 23:01:45 +0000 Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id g18N1is91668 for ; Fri, 8 Feb 2002 15:01:44 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id AB2893BAC; Fri, 8 Feb 2002 15:01:44 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: John Polstra , Andrew Gallatin , freebsd-alpha@FreeBSD.ORG Subject: Re: more on recent current alpha rtld/binutils breakage. In-Reply-To: <20020208224838.2037039F1@overcee.wemm.org> Date: Fri, 08 Feb 2002 15:01:44 -0800 From: Peter Wemm Message-Id: <20020208230144.AB2893BAC@overcee.wemm.org> 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 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