Changeset efcb393 for chapter06/strippingagain.xml
- Timestamp:
- 05/03/2020 09:02:51 PM (4 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, 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:
- a715dec
- Parents:
- 9d719e2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/strippingagain.xml
r9d719e2 refcb393 57 57 unset LIB save_lib save_usrlib</userinput></screen> 58 58 59 <para>Before performing the stripping, take special care to ensure that59 <!-- <para>Before performing the stripping, take special care to ensure that 60 60 none of the binaries that are about to be stripped are running:</para> 61 61 62 62 <screen role="nodump"><userinput>exec /tools/bin/bash</userinput></screen> 63 63 64 <!-- 65 If 66 unsure whether the user entered chroot with the command given in 67 <xref linkend="ch-system-chroot" role=","/> first use the version 68 of bash we created in 69 chroot:</para> 64 <para>Now the binaries and libraries can be safely stripped:</para> 65 --> 66 <para>Now the binaries and libraries can be stripped:</para> 67 <screen><userinput>find /usr/lib -type f -name \*.a \ 68 -exec strip --strip-debug {} ';' 70 69 71 <screen role="nodump"><userinput>logout</userinput></screen> 70 find /lib /usr/lib -type f -name \*.so* ! -name \*dbg \ 71 -exec strip --strip-unneeded {} ';' 72 72 73 <para>Then reenter it with:</para> 74 75 <screen role="nodump"><userinput>chroot $LFS /tools/bin/env -i \ 76 HOME=/root TERM=$TERM \ 77 PS1='(lfs chroot) \u:\w\$ ' \ 78 PATH=/bin:/usr/bin:/sbin:/usr/sbin \ 79 /tools/bin/bash - -login</userinput></screen>--> 80 81 <para>Now the binaries and libraries can be safely stripped:</para> 82 83 <screen><userinput>/tools/bin/find /usr/lib -type f -name \*.a \ 84 -exec /tools/bin/strip --strip-debug {} ';' 85 86 /tools/bin/find /lib /usr/lib -type f \( -name \*.so* -a ! -name \*dbg \) \ 87 -exec /tools/bin/strip --strip-unneeded {} ';' 88 89 /tools/bin/find /{bin,sbin} /usr/{bin,sbin,libexec} -type f \ 90 -exec /tools/bin/strip --strip-all {} ';'</userinput></screen> 73 find /{bin,sbin} /usr/{bin,sbin,libexec} -type f \ 74 -exec strip --strip-all {} ';'</userinput></screen> 91 75 92 76 <para>A large number of files will be reported as having their file
Note:
See TracChangeset
for help on using the changeset viewer.