Subject: Re: ksyms patches.
To: None <>
From: Jason Thorpe <>
List: tech-kern
Date: 04/21/2003 08:22:26
On Monday, April 21, 2003, at 07:01  AM, <> wrote:

> I have just fixed the in-kernel symbol table stuff so that it is
> ready for use. The ksyms files + diffs to other files are available at


> SYMTAB_SPACE is retained as-is; this will change to another way
> of loading the initial symbol table in the future.

Well... Normally, a boot loader would load the initial symbol table for 
the kernel.  SYMTAB_SPACE is used on systems where that is not possible 
(e.g. kernel booting directly out of flash, or dumb firmware on some 
eval boards which can't support boot loaders).

> The kvm and libc nlist routines are not fixed here. There are a bunch 
> of
> more changes that must be done for them to work; they use mmap() to 
> read
> the symbols of a file, which cannot be used.  The same is true for 
> kvm_mkdb,
> but it is questionable if it should be around; creating a static db for
> kernel symbols that may move around is not necessary a good idea.

Hm... Not possible to play a trick with mmap in the /dev/ksyms driver 
to make it work?

Regarding kvm_mkdb(8), I still think it's useful to have that; it makes 
nlist(3) a lot faster (or, at least, it's supposed to).  Maybe you can 
add support for poll(2)/kqueue(2) on /dev/ksyms, and some persistent 
daemon can keep the db up to date?

         -- Jason R. Thorpe <>