Ignore:
Timestamp:
07/28/2021 10:46:22 AM (3 years ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
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:
46e4486
Parents:
79902f4
git-author:
Xi Ruoyao <xry111@…> (07/28/2021 09:00:25 AM)
git-committer:
Xi Ruoyao <xry111@…> (07/28/2021 10:46:22 AM)
Message:

always use --strip-unneeded for stripping

The behavior of --strip-unneeded and --strip-all are same for
executables and shared libraries. For static libraries,
--strip-unneeded keeps the symbols needed for relocation processing so
it won't break static archives.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/stripping.xml

    r79902f4 r08f72423  
    8888
    8989    <para>Strip off debugging symbols from binaries:</para>
    90 <screen role="nodump"><userinput>strip --strip-debug $LFS/usr/lib/*
     90<screen role="nodump"><userinput>strip --strip-unneeded $LFS/usr/lib/*
    9191strip --strip-unneeded $LFS/usr/{,s}bin/*
    9292strip --strip-unneeded $LFS/tools/bin/*</userinput></screen>
     
    9797    <quote>Binutils pass 2</quote>, since it is the one that knows how to strip
    9898    our cross-compiled programs.--></para>
    99 
    100     <para>Take care <emphasis>NOT</emphasis> to use
    101     <parameter>--strip-unneeded</parameter> on the libraries. The static
    102     ones would be destroyed and the toolchain packages would need to be
    103     built all over again.</para>
    10499
    105100    <para>At this point, you should have at least 5 GB of free space on the
Note: See TracChangeset for help on using the changeset viewer.