Changeset 47c0603 for chapter08


Ignore:
Timestamp:
12/20/2022 11:30:12 PM (17 months ago)
Author:
Thomas Trepl <thomas@…>
Branches:
multilib
Children:
a8de3b44
Parents:
101d00d (diff), 9c753b58 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Automatic merge of trunk into multilib

Location:
chapter08
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • chapter08/aboutdebug.xml

    r101d00d r47c0603  
    1818  the names of the routines and variables.</para>
    1919
    20   <para>However, the inclusion of these debugging symbols enlarges a
    21   program or library significantly. The following is an example of the
     20  <para>The inclusion of these debugging symbols enlarges a
     21  program or library significantly. Here are two examples of the
    2222  amount of space these symbols occupy:</para>
    2323
     
    2929    <listitem>
    3030      <para>A <command>bash</command> binary without debugging symbols:
    31       480 KB</para>
     31      480 KB (60% smaller)</para>
    3232    </listitem>
    3333    <listitem>
     
    3737    </listitem>
    3838    <listitem>
    39       <para>Glibc and GCC files without debugging symbols: 16 MB</para>
     39      <para>Glibc and GCC files without debugging symbols: 16 MB (82% smaller)</para>
    4040    </listitem>
    4141  </itemizedlist>
    4242
    43   <para>Sizes may vary depending on which compiler and C library were used,
    44   but when comparing programs with and without debugging symbols, the
    45   difference will usually be a factor between two and five.</para>
    46 
    47   <para>Because most users will never use a debugger on their system software,
     43  <para>Sizes will vary depending on which compiler and C library were used,
     44  but a program that has been stripped of debugging symbols is usually some
     45  50% to 80% smaller than its unstripped counterpart.
     46  Because most users will never use a debugger on their system software,
    4847  a lot of disk space can be regained by removing these symbols. The next
    4948  section shows how to strip all debugging symbols from the programs and
  • chapter08/cleanup.xml

    r101d00d r47c0603  
    1111  <title>Cleaning Up</title>
    1212
    13   <para>Finally, clean up some extra files left around from running tests:</para>
     13  <para>Finally, clean up some extra files left over from running tests:</para>
    1414
    1515<screen><userinput>rm -rf /tmp/*</userinput></screen>
    1616
    17   <para>There are also several files installed in the /usr/lib and /usr/libexec
     17  <para>There are also several files in the /usr/lib and /usr/libexec
    1818  directories with a file name extension of .la. These are "libtool archive"
    19   files. As already said, on a modern Linux system the libtool .la files are
     19  files. On a modern Linux system the libtool .la files are
    2020  only useful for libltdl.  No libraries in LFS are expected to be loaded
    21   by libltdl, and it's known that some .la files can cause BLFS packages
    22   fail to build.  Remove those files now:</para>
     21  by libltdl, and it's known that some .la files can break BLFS package
     22  builds.  Remove those files now:</para>
    2323
    2424<screen><userinput>find /usr/lib /usr/libexec -name \*.la -delete</userinput><userinput arch="ml_32,ml_all">
  • chapter08/stripping.xml

    r101d00d r47c0603  
    1313  <para>This section is optional.  If the intended user is not a
    1414  programmer and does not plan to do
    15   any debugging on the system software, the system size can be decreased
    16   by about 2 GB by removing the debugging symbols and unneeded symbol table
    17   entries from binaries and libraries. This causes no inconvenience other
    18   than not being able to debug the software fully anymore.</para>
     15  any debugging of the system software, the system's size can be decreased
     16  by some 2 GB by removing the debugging symbols, and some unnecessary symbol table
     17  entries, from binaries and libraries. This causes no real inconvenience for
     18  a typical Linux user.</para>
    1919
    2020  <para>Most people who use the commands mentioned below do not
    21   experience any difficulties. However, it is easy to make a typo and
    22   render the new system unusable, so before running the
     21  experience any difficulties. However, it is easy to make a mistake and
     22  render the new system unusable. So before running the
    2323  <command>strip</command> commands, it is a good idea to make a
    2424  backup of the LFS system in its current state.</para>
    2525
    26   <para>A <command>strip</command> command with
     26  <para>A <command>strip</command> command with the
    2727  <parameter>--strip-unneeded</parameter> option removes all debug symbols
    28   from a binary or library.  And, it removes all symbol table entries not
     28  from a binary or library.  It also removes all symbol table entries not
    2929  needed by the linker (for static libraries) or dynamic linker (for
    30   dynamic-linked binaries and shared libraries).</para>
     30  dynamically linked binaries and shared libraries).</para>
    3131
    32   <para>The debugging symbols for selected libraries are placed
    33   in separate files.  This debugging information is needed if running
    34   regression tests that use <ulink
     32  <para>The debugging symbols from selected libraries are preserved
     33  in separate files.  That debugging information is needed to run
     34  regression tests with <ulink
    3535  url='&blfs-book;/general/valgrind.html'>valgrind</ulink> or <ulink
    36   url='&blfs-book;/general/gdb.html'>gdb</ulink> later in BLFS.
     36  url='&blfs-book;/general/gdb.html'>gdb</ulink> later, in BLFS.
    3737  </para>
    3838
    3939  <para>Note that <command>strip</command> will overwrite the binary or library
    4040  file it is processing.  This can crash the processes using code or data from
    41   the file.  If the process running <command>strip</command> itself is
    42   affected, the binary or library being stripped can be destroyed and can
    43   make the system completely unusable.  To avoid it, we'll copy some libraries
     41  the file.  If the process running <command>strip</command> is
     42  affected, the binary or library being stripped can be destroyed; this can
     43  make the system completely unusable.  To avoid this problem we copy some libraries
    4444  and binaries into <filename class="directory">/tmp</filename>, strip them
    45   there, and install them back with the <command>install</command> command.
    46   Read the related entry in <xref linkend="pkgmgmt-upgrade-issues"/> for the
    47   rationale to use the <command>install</command> command here.</para>
     45  there, then reinstall them with the <command>install</command> command.
     46  (The related entry in <xref linkend="pkgmgmt-upgrade-issues"/> gives the
     47  rationale for using the <command>install</command> command here.)</para>
    4848
    4949  <note><para>The ELF loader's name is ld-linux-x86-64.so.2 on 64-bit systems
     
    161161</userinput></screen>
    162162
    163   <para>A large number of files will be reported as having their file
    164   format not recognized. These warnings can be safely ignored. They
    165   indicate that those files are scripts instead of binaries.</para>
     163  <para>A large number of files will be flagged as errors because their file
     164  format is not recognized. These warnings can be safely ignored. They
     165  indicate that those files are scripts, not binaries.</para>
    166166
    167167</sect1>
Note: See TracChangeset for help on using the changeset viewer.