Changeset ddd5542 for chapter06/strippingagain.xml
- Timestamp:
- 02/10/2006 07:05:30 PM (18 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.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:
- 3bf7cb6
- Parents:
- 3f3931b0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/strippingagain.xml
r3f3931b0 rddd5542 1 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" [ 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 3 4 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 5 %general-entities; 5 6 ]> 7 6 8 <sect1 id="ch-system-strippingagain"> 7 <title>Stripping Again</title> 8 <?dbhtml filename="strippingagain.html"?> 9 <?dbhtml filename="strippingagain.html"?> 9 10 10 <para>If the intended user is not a programmer and does not plan to do 11 any debugging on the system software, the system size can be decreased 12 by about 200 MB by removing the debugging symbols from binaries and 13 libraries. This causes no inconvenience other than not being able to 14 debug the software fully anymore.</para> 11 <title>Stripping Again</title> 15 12 16 <para>Most people who use the command mentioned below do not 17 experience any difficulties. However, it is easy to make a typo and18 render the new system unusable, so before running the 19 <command>strip</command> command, it is a good idea to make a 20 backup of the LFS system in its current state.</para>13 <para>If the intended user is not a programmer and does not plan to do 14 any debugging on the system software, the system size can be decreased 15 by about 200 MB by removing the debugging symbols from binaries and 16 libraries. This causes no inconvenience other than not being able to 17 debug the software fully anymore.</para> 21 18 22 <para>Before performing the stripping, take special care to ensure that 23 none of the binaries that are about to be stripped are running. If 24 unsure whether the user entered chroot with the command given in 25 <xref linkend="ch-system-chroot" role=","/> first exit from 26 chroot:</para> 19 <para>Most people who use the command mentioned below do not 20 experience any difficulties. However, it is easy to make a typo and 21 render the new system unusable, so before running the 22 <command>strip</command> command, it is a good idea to make a 23 backup of the LFS system in its current state.</para> 24 25 <para>Before performing the stripping, take special care to ensure that 26 none of the binaries that are about to be stripped are running. If 27 unsure whether the user entered chroot with the command given in 28 <xref linkend="ch-system-chroot" role=","/> first exit from 29 chroot:</para> 27 30 28 31 <screen role="nodump"><userinput>logout</userinput></screen> 29 32 30 <para>Then reenter it with:</para>33 <para>Then reenter it with:</para> 31 34 32 35 <screen role="nodump"><userinput>chroot $LFS /tools/bin/env -i \ … … 35 38 /tools/bin/bash --login</userinput></screen> 36 39 37 <para>Now the binaries and libraries can be safely stripped:</para>40 <para>Now the binaries and libraries can be safely stripped:</para> 38 41 39 42 <screen><userinput>/tools/bin/find /{,usr/}{bin,lib,sbin} -type f \ 40 43 -exec /tools/bin/strip --strip-debug '{}' ';'</userinput></screen> 41 44 42 <para>A large number of files will be reported as having their file43 format not recognized. These warnings can be safely ignored. These44 warnings indicate that those files are scripts instead of45 binaries.</para>45 <para>A large number of files will be reported as having their file 46 format not recognized. These warnings can be safely ignored. These 47 warnings indicate that those files are scripts instead of 48 binaries.</para> 46 49 47 <para>If disk space is very tight, the48 <parameter>--strip-all</parameter> option can be used on the binaries49 in <filename class="directory">/{,usr/}{bin,sbin}</filename> to gain50 several more megabytes. Do not use this option on libraries—they will51 be destroyed.</para>50 <para>If disk space is very tight, the 51 <parameter>--strip-all</parameter> option can be used on the binaries 52 in <filename class="directory">/{,usr/}{bin,sbin}</filename> to gain 53 several more megabytes. Do not use this option on libraries—they will 54 be destroyed.</para> 52 55 53 56 </sect1> 54
Note:
See TracChangeset
for help on using the changeset viewer.