From owner-freebsd-current Thu Oct 23 09:56:25 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA10265 for current-outgoing; Thu, 23 Oct 1997 09:56:25 -0700 (PDT) (envelope-from owner-freebsd-current) Received: from word.smith.net.au (word.smith.net.au [202.0.75.3]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA10250 for ; Thu, 23 Oct 1997 09:56:14 -0700 (PDT) (envelope-from mike@word.smith.net.au) Received: from word.smith.net.au (localhost.smith.net.au [127.0.0.1]) by word.smith.net.au (8.8.7/8.8.5) with ESMTP id CAA01365; Fri, 24 Oct 1997 02:22:30 +0930 (CST) Message-Id: <199710231652.CAA01365@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: John-Mark Gurney cc: Mike Smith , FreeBSD Current Subject: Re: Doug Rabson's kernel linker code.. In-reply-to: Your message of "Thu, 23 Oct 1997 09:41:20 MST." <19971023094120.57364@hydrogen.nike.efn.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 24 Oct 1997 02:22:27 +0930 From: Mike Smith Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > > well.. I was reading through the code to get a better understand of > > > it.. and I think that we need to export the make variable LOAD_ADDRESS > > > from the Makefile to kernel, as the file kern/link_aout.c has this same > > > value hard coded in it... ... > > Do you want to do this, or set it at runtime based on the real load > > address? I realise that at the moment the load address is fixed by the > > link phase... > > actually... I need the information about the kernel's address and the > size of it... right now it just uses a constant of 0xf0100000 and the > size is the negative of that... I'm not sure if this information is > actually used, or is just kept for consistancy... and I don't need the > information till SI_SUB_KMEM... You really... leave me hanging on... your every phrase... as though it might be your last... 8) It should be possible at that stage to reference the various symbols set when the kernel is loaded and started; looking at create_pagetables in i386/i386/locore.S I see that KERNend is set to the end of the kernel plus any symbol table. Note that other space is allocated after this. As far as I can tell, btext is going to be the lowest symbol in the kernel, so you can prettymuch be sure that: extern void *btext; extern long KERNend; will give you some numbers that you can work with. The types are bogus; I'm not sure this is worth worrying about. Bruce may have more to say on the topic; this is from inspection only. mike