Date: Thu, 23 Oct 1997 17:01:30 -0700 From: John-Mark Gurney <gurney_j@efn.org> To: Mike Smith <mike@smith.net.au> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: Doug Rabson's kernel linker code.. Message-ID: <19971023170130.55831@hydrogen.nike.efn.org> In-Reply-To: <199710231652.CAA01365@word.smith.net.au>; from Mike Smith on Fri, Oct 24, 1997 at 02:22:27AM %2B0930 References: <19971023094120.57364@hydrogen.nike.efn.org> <199710231652.CAA01365@word.smith.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Mike Smith scribbled this message on Oct 24: > > > > 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... > > 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. hmm.. any machine independant way to get this information? > 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. yeh.. well.. as I stated about.. the file that needs this is kern/link_aout.c... and I don't really want to reference machine specific symbols... unless we require all machines to contain these symbols.. the other option is to do something were we move the running of SYSINIT into kern_linker.c... and then at boot time we simply "link" in the kernel as we do with kld modules... this would require extensions to kern_linker.c to support linking of a memory address.. but this wouldn't be hard to do... -- John-Mark Gurney Modem/FAX: +1 541 683 6954 Cu Networking Live in Peace, destroy Micro$oft, support free software, run FreeBSD
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971023170130.55831>