Changeset 44c2fd8 for chapter06/aboutdebug.xml
- Timestamp:
- 09/08/2002 09:54:14 PM (22 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/aboutdebug.xml
rcb33ea8 r44c2fd8 3 3 <?dbhtml filename="aboutdebug.html" dir="chapter06"?> 4 4 5 <para>Most programs and libraries by default arecompiled with debugging6 symbols (gcc option -g).</para>5 <para>Most programs and libraries are by default compiled with debugging 6 symbols included (with gcc option -g).</para> 7 7 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 9 information included, the debugger can give you not only memory addresses 10 but also the names of the routines and variables.</para> 11 12 <para>But the inclusion of these debugging symbols enlarges a program or 13 library significantly. To get an idea of the amount of space these symbols 14 occupy, have a look at the following:</para> 16 15 17 16 <itemizedlist> 18 17 19 <listitem><para> A dynamic Bash binary20 with debugging symbols: 1 .2 MB</para></listitem>18 <listitem><para>a bash binary 19 with debugging symbols: 1200 KB</para></listitem> 21 20 22 <listitem><para> A dynamic Bash binary23 without debugging symbols: 4 78KB</para></listitem>21 <listitem><para>a bash binary 22 without debugging symbols: 480 KB</para></listitem> 24 23 25 <listitem><para> /lib and /usr/lib (glibc26 and gcc files)with debugging symbols: 87 MB</para></listitem>24 <listitem><para>glibc and gcc files (/lib and /usr/lib) 25 with debugging symbols: 87 MB</para></listitem> 27 26 28 <listitem><para> /lib and /usr/lib (glibc29 and gcc files)without debugging symbols: 16 MB</para></listitem>27 <listitem><para>glibc and gcc files 28 without debugging symbols: 16 MB</para></listitem> 30 29 31 30 </itemizedlist> 32 31 33 <para>Sizes vary depending on which compiler was used and which C library34 version was used to link dynamic programs against, but results will be 35 s imilar if you compare programs with and without debugging symbols.</para>32 <para>Sizes may vary a little, depending on which compiler was used and 33 which C library. But when comparing programs with and without debugging 34 symbols, the difference will generally be a factor between 2 and 5.</para> 36 35 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 37 software, 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 40 or ELF binary), run <userinput>strip --strip-debug filename</userinput>. 41 Wildcards can be used to treat multiple files (use something like 42 <userinput>strip --strip-debug $LFS/static/bin/*</userinput>).</para> 43 43 44 44 <para>For your convenience, chapter 9 includes one simple command to strip 45 all debugging symbols from the programs and libraries on your system. You46 might find additional information in the optimization hint which can be 47 found at<ulink url="&hints-root;optimization.txt"/>.</para>45 all debugging symbols from all programs and libraries on your system. 46 Additional information on optimization you can find in the hint at 47 <ulink url="&hints-root;optimization.txt"/>.</para> 48 48 49 49 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.