1.\" $NetBSD: dbsym.8,v 1.3 2012/03/19 09:13:33 wiz Exp $ 2.\" 3.Dd March 19, 2012 4.Dt DBSYM 8 5.Os 6.Sh NAME 7.Nm dbsym 8.Nd copy kernel symbol table into db_symtab space 9.Sh SYNOPSIS 10.Nm 11.Op Fl pv 12.Op Fl b Ar bfdname 13.Ar kernel 14.Sh DESCRIPTION 15.Nm 16is used to copy the symbol table in a newly linked kernel into the 17.Va db_symtab 18array (in the data section) so that the 19.Xr ddb 4 20kernel debugger can find the symbols. 21This program is only used 22on systems for which the boot program does not load the symbol table 23into memory with the kernel. 24The space for these symbols is 25reserved in the data segment using a config option like: 26.Dl options SYMTAB_SPACE=72000 27The size of the db_symtab array (the value of SYMTAB_SPACE) must be 28at least as large as the kernel symbol table. 29If insufficient space 30is reserved, dbsym will refuse to copy the symbol table. 31.Pp 32To recognize kernel executable format, the 33.Fl b 34flag specifies BFD name of kernel. 35.Pp 36If the 37.Fl p 38flag is given, 39.Nm 40will report the size of the kernel symbol table and the size of the 41db_symtab space. 42Two values are printed out in a line separated by a space. 43.Pp 44If the 45.Fl v 46flag is given, 47.Nm 48will print out status information as 49it is copying the symbol table. 50.Pp 51Note that debugging symbols are not useful to the 52.Xr ddb 4 53kernel debugger, so to minimize the size of the kernel, one should 54either compile the kernel without debugging symbols (no 55.Fl g 56flag) or use the 57.Xr strip 1 58command to strip debugging symbols from the kernel before 59.Nm 60is used to copy the symbol table. 61The command 62.Dl strip -d netbsd 63will strip out debugging symbols. 64.Sh SEE ALSO 65.Xr strip 1 , 66.Xr ddb 4 67