From owner-freebsd-current Wed Apr 22 14:31:21 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA04320 for freebsd-current-outgoing; Wed, 22 Apr 1998 14:31:21 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA04203 for ; Wed, 22 Apr 1998 21:31:04 GMT (envelope-from dfr@nlsystems.com) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by nlsystems.com (8.8.8/8.8.5) with SMTP id WAA19610; Wed, 22 Apr 1998 22:30:33 +0100 (BST) Date: Wed, 22 Apr 1998 22:30:33 +0100 (BST) From: Doug Rabson To: Chris Csanady cc: Peter Wemm , John-Mark Gurney , Terry Lambert , current@FreeBSD.ORG Subject: Re: ELF kernels: When? In-Reply-To: <199804221354.IAA02372@friley585.res.iastate.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 22 Apr 1998, Chris Csanady wrote: > > >The real problems are: > >- The bootblocks do not load the ELF symbol table, so DDB can't see it. > >- DDB doesn't understand the ELF symbol tables yet anyway. > >- the bootblocks have *zero* bytes free at present. There is ELF load code > >available, but you have to disable BAD144 to get it to fit. Restructuring > >the code so that the #ifdefs are not too messy tips the bootblocks over > >the limit by a few bytes. > >- The loader is quite simple, it pulls in the text and data LOAD sections, > >without any of the section headers etc. Those section headers and string > >tables are needed to do proper runtime linking via link_elf.c. All thats really needed is the pathname to /kernel (or whatever happened to boot). The startup code in link_elf.c (link_elf_init() if its anything like link_aout.c) can grovel around in /kernel to get its symbol table. Alternatively use the same technique as link_aout and link the kernel as a shared elf object (which just happened not to be linked against any other shared objects). The linker will place the runtime symbol table in a LOAD section and will fix _DYNAMIC to point at the start of the ".dynamic" section. link_elf_init() can then walk the list of DT_XXX entries in the dynamic section to find the symbol table and everything else. This code for parsing ".dynamic" will be the same code as that used to dynamically load an elf module. Then to top things off nicely, fix DDB to use the kernel linker to manage its symbol table (you would need to add some code to the kernel linker for this). > > So, does anyone know enough about bootblocks to look at integrating NetBSD's? > They have done a significant amount of work in this area it seems, and they > already have a two-stage design. Trying to squeeze every last bit out of > the current blocks seems futile.. I looked at them once about a year ago. They ought to work without too much trouble. > > Are there any arguments against doing this? Whats the license on the NetBSD boot code? -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891 Fax: +44 181 381 1039 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message