From 08f72423ce26a60982fb06fb4b34f800d2c8a3ad Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 28 Jul 2021 17:00:25 +0800 Subject: 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. --- chapter07/stripping.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'chapter07') diff --git a/chapter07/stripping.xml b/chapter07/stripping.xml index 99caf7e3c..22a5a0804 100644 --- a/chapter07/stripping.xml +++ b/chapter07/stripping.xml @@ -87,7 +87,7 @@ umount $LFS/{sys,proc,run} symbols. Strip off debugging symbols from binaries: -strip --strip-debug $LFS/usr/lib/* +strip --strip-unneeded $LFS/usr/lib/* strip --strip-unneeded $LFS/usr/{,s}bin/* strip --strip-unneeded $LFS/tools/bin/* @@ -97,11 +97,6 @@ strip --strip-unneeded $LFS/tools/bin/* Binutils pass 2, since it is the one that knows how to strip our cross-compiled programs.--> - Take care NOT to use - --strip-unneeded on the libraries. The static - ones would be destroyed and the toolchain packages would need to be - built all over again. - At this point, you should have at least 5 GB of free space on the chroot partition that can be used to build and install Glibc and GCC in the next phase. If you can build and install Glibc, you can build and install -- cgit v1.2.3-54-g00ecf