source: chapter06/aboutdebug.xml@ dc6acb5

Last change on this file since dc6acb5 was dc6acb5, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

In DocBook-NG the replacement for <ulink> is a new definition of <link>.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/LFS-RNG/BOOK@4544 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 2.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE section [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<section xmlns="http://docbook.org/docbook-ng"
7 xmlns:xlink="http://www.w3.org/1999/xlink"
8 xml:id="ch-system-aboutdebug">
9<title>About debugging symbols</title>
10<?dbhtml filename="aboutdebug.html"?>
11
12<para>Most programs and libraries are, by default, compiled with debugging
13symbols included (with <command>gcc</command>'s <parameter>-g</parameter>
14option). This means that, when debugging a program or library that was compiled
15with debugging information included, the debugger can give you not only memory
16addresses but also the names of the routines and variables.</para>
17
18<para>The inclusion of these debugging symbols, however, enlarges a program or
19library significantly. To get an idea of the amount of space these symbols
20occupy, have a look at the following:</para>
21
22<itemizedlist>
23
24<listitem><para>a bash binary
25with debugging symbols: 1200 KB</para></listitem>
26
27<listitem><para>a bash binary
28without debugging symbols: 480 KB</para></listitem>
29
30<listitem><para>Glibc and GCC files (<filename class="directory">/lib</filename>
31and <filename class="directory">/usr/lib</filename>)
32with debugging symbols: 87 MB</para></listitem>
33
34<listitem><para>Glibc and GCC files
35without debugging symbols: 16 MB</para></listitem>
36
37</itemizedlist>
38
39<para>Sizes may vary somewhat, depending on which compiler was used and which C
40library, but when comparing programs with and without debugging symbols the
41difference will generally be a factor between 2 and 5.</para>
42
43<para>As most people will probably never use a debugger on their system
44software, a lot of disk space can be regained by removing these symbols. For
45your convenience, the next section shows how to strip all debugging symbols
46from all programs and libraries. Information on other ways of optimizing your
47system can be found in the hint at <link xlink:href="&hints-root;optimization.txt"/>.</para>
48
49</section>
Note: See TracBrowser for help on using the repository browser.