etc/protocols - sync with NetBSD-8
[minix.git] / external / gpl3 / binutils / usr.sbin / dbsym / dbsym.8
blob707986b7685ad37faa096bccb65a124d2c9c5f8b
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
16 is used to copy the symbol table in a newly linked kernel into the
17 .Va db_symtab
18 array (in the data section) so that the
19 .Xr ddb 4
20 kernel debugger can find the symbols.
21 This program is only used
22 on systems for which the boot program does not load the symbol table
23 into memory with the kernel.
24 The space for these symbols is
25 reserved in the data segment using a config option like:
26 .Dl options             SYMTAB_SPACE=72000
27 The size of the db_symtab array (the value of SYMTAB_SPACE) must be
28 at least as large as the kernel symbol table.
29 If insufficient space
30 is reserved, dbsym will refuse to copy the symbol table.
31 .Pp
32 To recognize kernel executable format, the
33 .Fl b
34 flag specifies BFD name of kernel.
35 .Pp
36 If the
37 .Fl P
38 flag is given,
39 .Nm
40 will report the size of the kernel symbol table.
41 .Pp
42 If the
43 .Fl p
44 flag is given,
45 .Nm
46 will report the size of the kernel symbol table and the size of the
47 db_symtab space.
48 Two values are printed out in a line separated by a space.
49 .Pp
50 If the
51 .Fl v
52 flag is given,
53 .Nm
54 will print out status information as
55 it is copying the symbol table.
56 .Pp
57 Note that debugging symbols are not useful to the
58 .Xr ddb 4
59 kernel debugger, so to minimize the size of the kernel, one should
60 either compile the kernel without debugging symbols (no
61 .Fl g
62 flag) or use the
63 .Xr strip 1
64 command to strip debugging symbols from the kernel before
65 .Nm
66 is used to copy the symbol table.
67 The command
68 .Dl strip -d netbsd
69 will strip out debugging symbols.
70 .Sh SEE ALSO
71 .Xr strip 1 ,
72 .Xr ddb 4