Ignore:
Timestamp:
06/13/2004 12:58:23 PM (20 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
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, 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:
e63529b
Parents:
7db6ac5
Message:

Added a separate file for the strippingagain section.
Tags correcitions.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter06/chapter06.xml

    r7db6ac5 r3c928f1  
    6969<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/>
    7070<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="aboutdebug.xml"/>
    71 
    72 <sect1 id="ch-system-strippingagain">
    73 <title>Stripping again</title>
    74 <?dbhtml filename="strippingagain.html"?>
    75 
    76 <para>If you are not a programmer and don't plan to do any debugging on your
    77 system software, you can shrink your system by about 200 MB by removing the
    78 debugging symbols from binaries and libraries. This causes no inconvenience
    79 other than not being able to debug the software fully any more.</para>
    80 
    81 <para>Most people who use the command mentioned below don't experience any
    82 problems. But it is easy to make a typo and render your new system unusable, so
    83 before running the strip command it is probably a good idea to make a backup of
    84 the current situation.</para>
    85 
    86 <para>If you are going to perform the stripping, special care is needed to
    87 ensure you're not running any of the binaries that are about to be stripped.
    88 If you're not sure whether you entered chroot with the command given in
    89 <xref linkend="ch-system-chroot"/>, then first exit from chroot:</para>
    90 
    91 <screen><userinput>logout</userinput></screen>
    92 
    93 <para>Then reenter it with:</para>
    94 
    95 <screen><userinput>chroot $LFS /tools/bin/env -i \
    96     HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
    97     PATH=/bin:/usr/bin:/sbin:/usr/sbin \
    98     /tools/bin/bash --login</userinput></screen>
    99 
    100 <para>Now you can safely strip the binaries and libraries:</para>
    101 
    102 <screen><userinput>/tools/bin/find /{,usr/}{bin,lib,sbin} -type f \
    103    -exec /tools/bin/strip --strip-debug '{}' ';'</userinput></screen>
    104 
    105 <para>A large number of files will be reported as having their file format not
    106 recognized. These warnings can be safely ignored, they just mean that those
    107 files are scripts instead of binaries, no harm is done.</para>
    108 
    109 <para>If you are really tight on disk space, you may want to use
    110 <emphasis>--strip-all</emphasis> on the binaries in
    111 <filename>/{,usr/}{bin,sbin}</filename> to gain several more megabytes. But do
    112 <emphasis>not</emphasis> use this option on libraries: they would be
    113 destroyed.</para>
    114 
    115 </sect1>
    116 
     71<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="strippingagain.xml"/>
    11772<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="revisedchroot.xml"/>
    11873
Note: See TracChangeset for help on using the changeset viewer.