1.\" $NetBSD: dbsym.8,v 1.4 2014/08/17 19:12:59 joerg Exp $ 2.\" 3.Dd August 14, 2014 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 Ppv 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. 41.Pp 42If the 43.Fl p 44flag is given, 45.Nm 46will report the size of the kernel symbol table and the size of the 47db_symtab space. 48Two values are printed out in a line separated by a space. 49.Pp 50If the 51.Fl v 52flag is given, 53.Nm 54will print out status information as 55it is copying the symbol table. 56.Pp 57Note that debugging symbols are not useful to the 58.Xr ddb 4 59kernel debugger, so to minimize the size of the kernel, one should 60either compile the kernel without debugging symbols (no 61.Fl g 62flag) or use the 63.Xr strip 1 64command to strip debugging symbols from the kernel before 65.Nm 66is used to copy the symbol table. 67The command 68.Dl strip -d netbsd 69will strip out debugging symbols. 70.Sh SEE ALSO 71.Xr strip 1 , 72.Xr ddb 4 73