Garrett Wollman wrote:
> <<On Mon, 7 Feb 2000 00:25:51 +0200, Ruslan Ermilov <[EMAIL PROTECTED]> said:
> 
> > If I boot with loader(8), everything is ok.
> > Ideas?
> 
> loader loads the kernel symbol table; boot2 does not.
> 
> -GAWollman

More to the point, a non-stripped kernel has *two* symbol tables.  One that
has the global symbols and is used for dynamic linking, and the other that
has the debugging info in it including static symbols.  loader(8) goes to a
great deal of trouble to get the second table - it's very hard to get it
when reading from a zlib decompression stream that can't be seek'ed.  The ELF
format defines a convenient 'load segment' table which defines (usually)
two chunks of the file to be loaded into memory and at what addresses.  The
verbose symbol table is not part of this, but the global table is and we get
it for free.

Anyway, the correct fix is to make numvnodes global or to change it to a
sysctl.  Nothing that is referred to by the common libkvm applications
should be static - this warning has been given before.  running a strip on /
kernel has the same effect as using boot2 - only global symbols are
accessible.

Cheers,
-Peter




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to