aboutsummaryrefslogtreecommitdiffstats
path: root/chapter08/strippingagain.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter08/strippingagain.xml')
-rw-r--r--chapter08/strippingagain.xml19
1 files changed, 5 insertions, 14 deletions
diff --git a/chapter08/strippingagain.xml b/chapter08/strippingagain.xml
index 891d2e000..8f5743b51 100644
--- a/chapter08/strippingagain.xml
+++ b/chapter08/strippingagain.xml
@@ -33,17 +33,8 @@
<!-- also of interest are libgfortan, libgo, libgomp, and libobjc from GCC -->
<!--<screen><userinput>save_lib="ld-2.25.so libc-2.25.so libpthread-2.25.so libthread_db-1.0.so"-->
-<screen><userinput>save_lib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so"
-
-cd /lib
-
-for LIB in $save_lib; do
- objcopy --only-keep-debug $LIB $LIB.dbg
- strip --strip-unneeded $LIB
- objcopy --add-gnu-debuglink=$LIB.dbg $LIB
-done
-
-save_usrlib="libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version;
+<screen><userinput>save_usrlib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so
+ libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version;
libitm.so.&libitm-version; libatomic.so.&libatomic-version;" <!-- libcilkrts.so.&libcilkrts-version;-->
cd /usr/lib
@@ -54,7 +45,7 @@ for LIB in $save_usrlib; do
objcopy --add-gnu-debuglink=$LIB.dbg $LIB
done
-unset LIB save_lib save_usrlib</userinput></screen>
+unset LIB save_usrlib</userinput></screen>
<!-- <para>Before performing the stripping, take special care to ensure that
none of the binaries that are about to be stripped are running:</para>
@@ -67,10 +58,10 @@ unset LIB save_lib save_usrlib</userinput></screen>
<screen><userinput>find /usr/lib -type f -name \*.a \
-exec strip --strip-debug {} ';'
-find /lib /usr/lib -type f -name \*.so* ! -name \*dbg \
+find /usr/lib -type f -name \*.so* ! -name \*dbg \
-exec strip --strip-unneeded {} ';'
-find /{bin,sbin} /usr/{bin,sbin,libexec} -type f \
+find /usr/{bin,sbin,libexec} -type f \
-exec strip --strip-all {} ';'</userinput></screen>
<para>A large number of files will be reported as having their file