NetBSD/gnu/usr.sbin/dbsym/dbsym.8
2001-11-09 09:30:59 +00:00

46 lines
1.2 KiB
Groff

.\" $NetBSD: dbsym.8,v 1.3 2001/11/09 09:30:59 wiz Exp $
.\"
.Dd May 12, 1994
.Dt DBSYM 8
.Os
.Sh NAME
.Nm dbsym
.Nd copy kernel symbol table into db_symtab space
.Sh SYNOPSIS
.Nm
.Ar kernel
.Sh DESCRIPTION
.Nm
is used to copy the symbol table in a newly linked kernel into the
.Va db_symtab
array (in the data section) so that the
.Xr ddb 4
kernel debugger can find the symbols. This is program is only used
on systems for which the boot program does not load the symbol table
into memory with the kernel. The space for these symbols is
reserved in the data segment using a config option like:
.Pp
.Li options SYMTAB_SPACE=72000
.Pp
The size of the db_symtab array (the value of SYMTAB_SPACE) must be
at least as large as the kernel symbol table. If insufficient space
is reserved, dbsym will refuse to copy the symbol table.
.Pp
Note that debugging symbols are not useful to the
.Xr ddb 4
kernel debugger, so to minimize the size of the kernel, one should
either compile the kernel without debugging symbols (no
.Fl g
flag) or use the
.Xr strip 1
command to strip debugging symbols from the kernel before
.Nm
is used to copy the symbol table. The command
.Pp
.Li strip -d netbsd
.Pp
will strip out debugging symbols.
.Sh SEE ALSO
.Xr strip 1 ,
.Xr ddb 4