aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/aboutdebug.xml
diff options
context:
space:
mode:
authorGerard Beekmans <gerard@linuxfromscratch.org>2005-02-19 22:16:42 +0000
committerGerard Beekmans <gerard@linuxfromscratch.org>2005-02-19 22:16:42 +0000
commit81fd230419b0cfd052b08fc1ed352bb7d49975df (patch)
tree24c98d2876e5b457dcb88d39e7cca4905f58691a /chapter06/aboutdebug.xml
parent2f9131f8390243dbc350fe2eeb9e1d58f0264888 (diff)
Trunk is now identical to Testing
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4648 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06/aboutdebug.xml')
-rw-r--r--chapter06/aboutdebug.xml41
1 files changed, 40 insertions, 1 deletions
diff --git a/chapter06/aboutdebug.xml b/chapter06/aboutdebug.xml
index f0ac8956f..7ef47d71c 100644
--- a/chapter06/aboutdebug.xml
+++ b/chapter06/aboutdebug.xml
@@ -7,6 +7,45 @@
<title>About Debugging Symbols</title>
<?dbhtml filename="aboutdebug.html"?>
-<para>See testing</para>
+<para>Most programs and libraries are, by default, compiled with
+debugging symbols included (with <command>gcc</command>'s
+<parameter>-g</parameter> option). This means that when debugging a
+program or library that was compiled with debugging information
+included, the debugger can provide not only memory addresses, but also
+the names of the routines and variables.</para>
+
+<para>However, the inclusion of these debugging symbols enlarges a
+program or library significantly. The following is an example of the
+amount of space these symbols occupy:</para>
+
+<itemizedlist>
+
+<listitem><para>a bash binary
+with debugging symbols: 1200 KB</para></listitem>
+
+<listitem><para>a bash binary
+without debugging symbols: 480 KB</para></listitem>
+
+<listitem><para>Glibc and GCC files (<filename class="directory">/lib</filename>
+and <filename class="directory">/usr/lib</filename>)
+with debugging symbols: 87 MB</para></listitem>
+
+<listitem><para>Glibc and GCC files
+without debugging symbols: 16 MB</para></listitem>
+
+</itemizedlist>
+
+<para>Sizes may vary depending on which compiler and C
+library were used, but when comparing programs with and without debugging
+symbols, the difference will usually be a factor between two and
+five.</para>
+
+<para>Because most users will never use a debugger on their system
+software, a lot of disk space can be regained by removing these
+symbols. The next section shows how to strip all debugging symbols
+from the programs and libraries. Additional information on system
+optimization can be found at <ulink url="&hints-root;optimization.txt"><phrase
+condition="pdf">&hints-root; optimization.txt</phrase></ulink>.</para>
</sect1>
+