From owner-freebsd-alpha Thu Feb 21 14:57:30 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 34BAF37B416; Thu, 21 Feb 2002 14:57:24 -0800 (PST) Received: (from uucp@localhost) by srv1.cosmo-project.de (8.11.6/8.11.6) with UUCP id g1LMvMr33048; Thu, 21 Feb 2002 23:57:22 +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 g1LMv0Yd004928; Thu, 21 Feb 2002 23:57:01 +0100 (CET)?g (envelope-from ticso@cicely8.cicely.de) Received: (from ticso@localhost) by cicely8.cicely.de (8.11.6/8.11.6) id g1LMuxQ57713; Thu, 21 Feb 2002 23:56:59 +0100 (CET) (envelope-from ticso) Date: Thu, 21 Feb 2002 23:56:58 +0100 From: Bernd Walter To: Andrew Gallatin Cc: Doug Rabson , peter@FreeBSD.ORG, jdp@FreeBSD.ORG, freebsd-alpha@FreeBSD.ORG Subject: Re: alpha klds and the new linker Message-ID: <20020221225658.GE56929@cicely8.cicely.de> References: <15477.3715.6908.110667@grasshopper.cs.duke.edu> <15477.29709.908299.287618@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15477.29709.908299.287618@grasshopper.cs.duke.edu> 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 05:26:21PM -0500, Andrew Gallatin wrote: > > Doug Rabson writes: > > On Thu, 21 Feb 2002, Andrew Gallatin wrote: > > > > > > > > Doug Rabson writes: > > > > On Wed, 20 Feb 2002, Andrew Gallatin wrote: > > > > > > > > > > > > > > Doug, > > > > > > > > > > There's something about the new linker (from the latest binutils > > > > > import) which breaks klds on alpha. If I attempt to load a module > > > > > built with the new binutils, things go kaboom like this: > > > > > > > > >From looking at this, I can't say much other than that it looks like the > > > > symbol lookup for "modmetadata_set" returned something bogus. Either that > > > > or maybe the linker sets didn't get relocated properly. What does > > > > 'objdump -p' and 'objdump -R' look like for the two files? > > > > > > > > > Due to their size, I've left the objdump -R output on freefall: > > > > > > http://people.freebsd.org/~gallatin/objdump-R_new > > > http://people.freebsd.org/~gallatin/objdump-R_old > > > > I guess it might be something to do with all those RELATIVE relocs which > > have addends. I can't see anything obviously wrong with the code but it > > has never been called with non-zero addends so there could easily be a > > problem there. Wasn't there something similar with rtld recently? > > > 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" ? It does not work for me: [59]cicely10# kldload vinum [60]cicely10# vinum list vinum: Kernel module not available: File exists Exit 1 [63]cicely10# kldstat -v -i 2 Id Refs Address Size Name 2 1 0xfffffe0000942000 122000 vinum.ko Contains modules: Id Name No modules registered from vinum.ko. It should look like this: [144]cicely9# kldstat -v -i 2 Id Refs Address Size Name 2 1 0xfffffe0000ab8000 124000 vinum.ko Contains modules: Id Name 90 vinum > > 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; The if line looks prety useless unless someone wants to avoid writing to *where. -- 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