1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
8 <sect1 id="ch-system-aboutdebug">
9 <?dbhtml filename="aboutdebug.html"?>
11 <title>About Debugging Symbols</title>
13 <para>Most programs and libraries are, by default, compiled with
14 debugging symbols included (with <command>gcc</command>'s
15 <parameter>-g</parameter> option). This means that when debugging a
16 program or library that was compiled with debugging information,
17 the debugger can provide not only memory addresses, but also
18 the names of the routines and variables.</para>
20 <para>The inclusion of these debugging symbols enlarges a
21 program or library significantly. Here are two examples of the
22 amount of space these symbols occupy:</para>
26 <para>A <command>bash</command> binary with debugging symbols:
30 <para>A <command>bash</command> binary without debugging symbols:
31 480 KB (60% smaller)</para>
34 <para>Glibc and GCC files (<filename class="directory">/lib</filename>
35 and <filename class="directory">/usr/lib</filename>) with debugging
39 <para>Glibc and GCC files without debugging symbols: 16 MB (82% smaller)</para>
43 <para>Sizes will vary depending on which compiler and C library were used,
44 but a program that has been stripped of debugging symbols is usually some
45 50% to 80% smaller than its unstripped counterpart.
46 Because most users will never use a debugger on their system software,
47 a lot of disk space can be regained by removing these symbols. The next
48 section shows how to strip all debugging symbols from the programs and