Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Oct 1997 02:22:27 +0930
From:      Mike Smith <mike@smith.net.au>
To:        John-Mark Gurney <gurney_j@resnet.uoregon.edu>
Cc:        Mike Smith <mike@smith.net.au>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: Doug Rabson's kernel linker code.. 
Message-ID:  <199710231652.CAA01365@word.smith.net.au>
In-Reply-To: Your message of "Thu, 23 Oct 1997 09:41:20 MST." <19971023094120.57364@hydrogen.nike.efn.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > > 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









Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710231652.CAA01365>