source: chapter06/aboutdebug.xml@ dff7de7

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

Tags corrections.

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

  • Property mode set to 100644
File size: 2.0 KB
RevLine 
[673b0d8]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<sect1 id="ch-system-aboutdebug">
[69993f4]7<title>About Debugging Symbols</title>
[673b0d8]8<?dbhtml filename="aboutdebug.html"?>
9
[ef13657]10<para>Most programs and libraries are, by default, compiled with
11debugging symbols included (with <command>gcc</command>'s
12<parameter>-g</parameter> option). This means that when debugging a
13program or library that was compiled with debugging information
14included, the debugger can provide not only memory addresses, but also
15the names of the routines and variables.</para>
16
17<para>However, the inclusion of these debugging symbols enlarges a
18program or library significantly. The following is an example of the
19amount of space these symbols occupy:</para>
[673b0d8]20
21<itemizedlist>
22
23<listitem><para>a bash binary
24with debugging symbols: 1200 KB</para></listitem>
25
26<listitem><para>a bash binary
27without debugging symbols: 480 KB</para></listitem>
28
[3c928f1]29<listitem><para>Glibc and GCC files (<filename class="directory">/lib</filename>
30and <filename class="directory">/usr/lib</filename>)
[673b0d8]31with debugging symbols: 87 MB</para></listitem>
32
33<listitem><para>Glibc and GCC files
34without debugging symbols: 16 MB</para></listitem>
35
36</itemizedlist>
37
[69993f4]38<para>Sizes may vary depending on which compiler and C
39library were used, but when comparing programs with and without debugging
[ef13657]40symbols, the difference will usually be a factor between two and
41five.</para>
[673b0d8]42
[ef13657]43<para>Because most users will never use a debugger on their system
44software, a lot of disk space can be regained by removing these
45symbols. The next section shows how to strip all debugging symbols
[38bb44a]46from the programs and libraries. Additional information on system
[c5143c9]47optimization can be found at <ulink url="&hints-root;optimization.txt"><phrase
[dff7de7]48condition="pdf">&hints-root; optimization.txt</phrase></ulink>.</para>
[673b0d8]49
50</sect1>
[ef13657]51
Note: See TracBrowser for help on using the repository browser.