Subject: Re: /kern/kernel
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Bill Studenmund <skippy@macro.stanford.edu>
List: current-users
Date: 09/12/1998 07:46:54
On Sat, 12 Sep 1998, der Mouse wrote:

> Depends on your point of view.  It's *more* trouble for userland, since
> userland has to be prepared to handle nlist() anyway, so the easiest
> thing there is just to sic nlist() on a different file.  I'm not
> convinced the code to fake a symbol table in an executable file isn't
> going to be smaller and/or less complicated than the code to implement
> your /kern/kernelsymbols.

You're right that the code's probably about the same.  The problem with
the kernel exporting a faked up symbol table is that we have to transfer a
lot of it for each search. That's like a client-server database system
transfering the whole database to the client for a lookup. Since the list
can change from time to time, the best we could do would be to have
periodic exportations. But that seems like a waste of transfer when we
could just stick the search in the kernel. :-)

> > This lookup could also be done through a sysctl.
> 
> How?  AFAIK there's no way to represent the (string) symbol name in a
> sysctl MIB (short of something really ugly like overlaying the string
> onto some of the MIB values).

Doh! I ment ioctl. You're right we can't do it as a sysctl.

Take care,

Bill