Ignore:
Timestamp:
09/08/2002 09:54:14 PM (22 years ago)
Author:
Timothy Bauscher <timothy@…>
Branches:
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.0, 6.1, 6.1.1, 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, v4_0, v4_1, v5_0, v5_1, v5_1_1, 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
Children:
e9d69fa6
Parents:
cb33ea8
Message:

Applied Alex\'s grammar patch

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter06/aboutdebug.xml

    rcb33ea8 r44c2fd8  
    33<?dbhtml filename="aboutdebug.html" dir="chapter06"?>
    44
    5 <para>Most programs and libraries by default are compiled with debugging
    6 symbols (gcc option -g).</para>
     5<para>Most programs and libraries are by default compiled with debugging
     6symbols included (with gcc option -g).</para>
    77
    8 <para>A program compiled with debugging symbols means a user can run a program
    9 or library through a debugger and the debugger's output will be user
    10 friendly. These debugging symbols also enlarge the program or library
    11 significantly.</para>
    12 
    13 <para>Before you start wondering whether these debugging symbols really make a
    14 big difference, here are some statistics. Use them to draw your own
    15 conclusion.</para>
     8<para>When debugging a program or library that was compiled with debugging
     9information included, the debugger can give you not only memory addresses
     10but also the names of the routines and variables.</para>
     11 
     12<para>But the inclusion of these debugging symbols enlarges a program or
     13library significantly. To get an idea of the amount of space these symbols
     14occupy, have a look at the following:</para>
    1615
    1716<itemizedlist>
    1817
    19 <listitem><para>A dynamic Bash binary
    20 with debugging symbols: 1.2 MB</para></listitem>
     18<listitem><para>a bash binary
     19with debugging symbols: 1200 KB</para></listitem>
    2120
    22 <listitem><para>A dynamic Bash binary
    23 without debugging symbols: 478 KB</para></listitem>
     21<listitem><para>a bash binary
     22without debugging symbols: 480 KB</para></listitem>
    2423
    25 <listitem><para>/lib and /usr/lib (glibc
    26 and gcc files) with debugging symbols: 87 MB</para></listitem>
     24<listitem><para>glibc and gcc files (/lib and /usr/lib)
     25with debugging symbols: 87 MB</para></listitem>
    2726
    28 <listitem><para>/lib and /usr/lib (glibc
    29 and gcc files) without debugging symbols: 16 MB</para></listitem>
     27<listitem><para>glibc and gcc files
     28without debugging symbols: 16 MB</para></listitem>
    3029
    3130</itemizedlist>
    3231
    33 <para>Sizes vary depending on which compiler was used and which C library
    34 version was used to link dynamic programs against, but results will be
    35 similar if you compare programs with and without debugging symbols.</para>
     32<para>Sizes may vary a little, depending on which compiler was used and
     33which C library. But when comparing programs with and without debugging
     34symbols, the difference will generally be a factor between 2 and 5.</para>
    3635
    37 <para>To remove debugging symbols from a binary (must be an a.out or ELF
    38 binary) run <userinput>strip --strip-debug filename</userinput>. Wildcards
    39 can be used to strip debugging symbols from multiple files (use something
    40 like <userinput>strip --strip-debug $LFS/usr/bin/*</userinput>). Most
    41 people will probably never use a debugger on software, so by removing
    42 those symbols a lot of disk space can be regained.</para>
     36<para>As most people will probably never use a debugger on their system
     37software, a lot of disk space can be regained by removing these symbols .</para>
     38
     39<para>To remove debugging symbols from a binary (which must be an a.out
     40or ELF binary), run <userinput>strip --strip-debug filename</userinput>.
     41Wildcards can be used to treat multiple files (use something like
     42<userinput>strip --strip-debug $LFS/static/bin/*</userinput>).</para>
    4343
    4444<para>For your convenience, chapter 9 includes one simple command to strip
    45 all debugging symbols from the programs and libraries on your system. You
    46 might find additional information in the optimization hint which can be
    47 found at <ulink url="&hints-root;optimization.txt"/>.</para>
     45all debugging symbols from all programs and libraries on your system.
     46Additional information on optimization you can find in the hint at
     47<ulink url="&hints-root;optimization.txt"/>.</para>
    4848
    4949</sect1>
Note: See TracChangeset for help on using the changeset viewer.