xref: /netbsd-src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.8 (revision 5983af161f70ea54011f47914564c291d554a498)
1*5983af16Sjoerg.\"	$NetBSD: dbsym.8,v 1.4 2014/08/17 19:12:59 joerg Exp $
231580a89Sskrll.\"
3*5983af16Sjoerg.Dd August 14, 2014
431580a89Sskrll.Dt DBSYM 8
531580a89Sskrll.Os
631580a89Sskrll.Sh NAME
731580a89Sskrll.Nm dbsym
831580a89Sskrll.Nd copy kernel symbol table into db_symtab space
931580a89Sskrll.Sh SYNOPSIS
1031580a89Sskrll.Nm
11*5983af16Sjoerg.Op Fl Ppv
1231580a89Sskrll.Op Fl b Ar bfdname
1331580a89Sskrll.Ar kernel
1431580a89Sskrll.Sh DESCRIPTION
1531580a89Sskrll.Nm
1631580a89Sskrllis used to copy the symbol table in a newly linked kernel into the
1731580a89Sskrll.Va db_symtab
1831580a89Sskrllarray (in the data section) so that the
1931580a89Sskrll.Xr ddb 4
2034e2e476Swizkernel debugger can find the symbols.
2134e2e476SwizThis program is only used
2231580a89Sskrllon systems for which the boot program does not load the symbol table
2334e2e476Swizinto memory with the kernel.
2434e2e476SwizThe space for these symbols is
2531580a89Sskrllreserved in the data segment using a config option like:
2634e2e476Swiz.Dl options		SYMTAB_SPACE=72000
2731580a89SskrllThe size of the db_symtab array (the value of SYMTAB_SPACE) must be
2834e2e476Swizat least as large as the kernel symbol table.
2934e2e476SwizIf insufficient space
3031580a89Sskrllis reserved, dbsym will refuse to copy the symbol table.
3131580a89Sskrll.Pp
3231580a89SskrllTo recognize kernel executable format, the
3331580a89Sskrll.Fl b
3431580a89Sskrllflag specifies BFD name of kernel.
3531580a89Sskrll.Pp
3631580a89SskrllIf the
37*5983af16Sjoerg.Fl P
38*5983af16Sjoergflag is given,
39*5983af16Sjoerg.Nm
40*5983af16Sjoergwill report the size of the kernel symbol table.
41*5983af16Sjoerg.Pp
42*5983af16SjoergIf the
43f4eb9f64Sbsh.Fl p
44f4eb9f64Sbshflag is given,
45f4eb9f64Sbsh.Nm
46f4eb9f64Sbshwill report the size of the kernel symbol table and the size of the
47f4eb9f64Sbshdb_symtab space.
48f4eb9f64SbshTwo values are printed out in a line separated by a space.
49f4eb9f64Sbsh.Pp
5034e2e476SwizIf the
5134e2e476Swiz.Fl v
5234e2e476Swizflag is given,
5334e2e476Swiz.Nm
5434e2e476Swizwill print out status information as
5534e2e476Swizit is copying the symbol table.
5634e2e476Swiz.Pp
5731580a89SskrllNote that debugging symbols are not useful to the
5831580a89Sskrll.Xr ddb 4
5931580a89Sskrllkernel debugger, so to minimize the size of the kernel, one should
6031580a89Sskrlleither compile the kernel without debugging symbols (no
6131580a89Sskrll.Fl g
6231580a89Sskrllflag) or use the
6331580a89Sskrll.Xr strip 1
6431580a89Sskrllcommand to strip debugging symbols from the kernel before
6531580a89Sskrll.Nm
6634e2e476Swizis used to copy the symbol table.
6734e2e476SwizThe command
6834e2e476Swiz.Dl strip -d netbsd
6931580a89Sskrllwill strip out debugging symbols.
7031580a89Sskrll.Sh SEE ALSO
7131580a89Sskrll.Xr strip 1 ,
7231580a89Sskrll.Xr ddb 4
73