Subject: Re: In-kernel symbol table + /dev/ksyms
To: None <>
From: Jason Thorpe <>
List: tech-kern
Date: 04/07/2003 12:46:35
On Monday, April 7, 2003, at 04:31  AM, <> wrote:

> This adds two files to the kernel:
> sys/kern/kern_ksyms.c
> sys/sys/ksyms.h

Sweet.  Can you post the code somewhere?

> This will mostly affect DDB, in that DDB's own symtab handling is 
> removed
> and replaced with this. Also, the a.out support in DDB goes away fully,
> but I do not consider that as a problem.

Hm, okay.  It still might be nice to have a.out, since we still don't 
have ELF for pc532, and DDB support for pc532 would be nice to keep 
around until its ELF transition is made.

> The /dev/ksyms interface presents an ELF file with only symtab and
> strtab segments in it.  It works well to do things like "gdb 
> /dev/ksyms"
> + "target kcore /dev/mem" to play with a live system.

That's great.  Mmm, exactly the way it ought to be :-)

> There are trivial changes needed to modload + the kvm routines to
> make use of /dev/ksyms.
> Comments on this?

Only "thank you very much" :-)  Oh, and it would be nice to have a peek 
at the code :-)

> The next step would be to fix the basic in-kernel linker. I have an
> ELF linker written (for the PDP10 port) and I don't think it would
> be difficult to make it run in-kernel.


> The last step would be to make the linker interact correctly with the
> autoconf system.  This has some hairy problems to solve, but that is a
> future task.

Yah, and also with e.g. mount(2) ... "oops, file system isn't there, 
let's try loading the module from the specified trusted path, and try 
mounting it again..."

         -- Jason R. Thorpe <>