source: chapter06/aboutdebug.xml@ 1a017db

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 1a017db was 845846e0, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Removed PDF specifics tags.

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

  • Property mode set to 100644
File size: 1.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<sect1 id="ch-system-aboutdebug">
7<title>About Debugging Symbols</title>
8<?dbhtml filename="aboutdebug.html"?>
9
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>
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
29<listitem><para>Glibc and GCC files (<filename class="directory">/lib</filename>
30and <filename class="directory">/usr/lib</filename>)
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
38<para>Sizes may vary depending on which compiler and C
39library were used, but when comparing programs with and without debugging
40symbols, the difference will usually be a factor between two and
41five.</para>
42
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
46from the programs and libraries. Additional information on system
47optimization can be found at <ulink url="&hints-root;optimization.txt"/>.</para>
48
49</sect1>
50
Note: See TracBrowser for help on using the repository browser.