diff options
Diffstat (limited to 'chapter08/stripping.xml')
-rw-r--r-- | chapter08/stripping.xml | 57 |
1 files changed, 53 insertions, 4 deletions
diff --git a/chapter08/stripping.xml b/chapter08/stripping.xml index 9e71f4382..d07514225 100644 --- a/chapter08/stripping.xml +++ b/chapter08/stripping.xml @@ -76,7 +76,6 @@ libatomic.so.&libatomic-version;" cd /usr/lib - for LIB in $save_usrlib; do objcopy --only-keep-debug $LIB $LIB.dbg cp $LIB /tmp/$LIB @@ -84,7 +83,27 @@ for LIB in $save_usrlib; do objcopy --add-gnu-debuglink=$LIB.dbg /tmp/$LIB install -vm755 /tmp/$LIB /usr/lib rm /tmp/$LIB -done +done</userinput> +<userinput arch="ml_32,ml_all"> +cd /usr/lib32 +for LIB in $save_usrlib; do + objcopy --only-keep-debug $LIB $LIB.dbg + cp $LIB /tmp/$LIB + strip --strip-unneeded /tmp/$LIB + objcopy --add-gnu-debuglink=$LIB.dbg /tmp/$LIB + install -vm755 /tmp/$LIB /usr/lib32 + rm /tmp/$LIB +done</userinput> +<userinput arch="ml_x32,ml_all"> +cd /usr/libx32 +for LIB in $save_usrlib; do + objcopy --only-keep-debug $LIB $LIB.dbg + cp $LIB /tmp/$LIB + strip --strip-unneeded /tmp/$LIB + objcopy --add-gnu-debuglink=$LIB.dbg /tmp/$LIB + install -vm755 /tmp/$LIB /usr/libx32 + rm /tmp/$LIB +done</userinput><userinput> online_usrbin="bash find strip" online_usrlib="libbfd-&binutils-version;.so @@ -108,7 +127,19 @@ for LIB in $online_usrlib; do strip --strip-unneeded /tmp/$LIB install -vm755 /tmp/$LIB /usr/lib rm /tmp/$LIB -done +done</userinput><userinput arch="ml_32,ml_all"> +for LIB in $online_usrlib; do + cp /usr/lib32/$LIB /tmp/$LIB + strip --strip-unneeded /tmp/$LIB + install -vm755 /tmp/$LIB /usr/lib32 + rm /tmp/$LIB +done</userinput><userinput arch="ml_x32,ml_all"> +for LIB in $online_usrlib; do + cp /usr/libx32/$LIB /tmp/$LIB + strip --strip-unneeded /tmp/$LIB + install -vm755 /tmp/$LIB /usr/libx32 + rm /tmp/$LIB +done</userinput><userinput> for i in $(find /usr/lib -type f -name \*.so* ! -name \*dbg) \ $(find /usr/lib -type f -name \*.a) \ @@ -119,7 +150,25 @@ for i in $(find /usr/lib -type f -name \*.so* ! -name \*dbg) \ * ) strip --strip-unneeded $i ;; esac -done +done</userinput><userinput arch="ml_32,ml_all"> +for i in $(find /usr/lib32 -type f -name \*.so* ! -name \*dbg) \ + $(find /usr/lib32 -type f -name \*.a); do + case "$online_usrbin $online_usrlib $save_usrlib" in + *$(basename $i)* ) + ;; + * ) strip --strip-unneeded $i + ;; + esac +done</userinput><userinput arch="ml_x32,ml_all"> +for i in $(find /usr/libx32 -type f -name \*.so* ! -name \*dbg) \ + $(find /usr/libx32 -type f -name \*.a); do + case "$online_usrbin $online_usrlib $save_usrlib" in + *$(basename $i)* ) + ;; + * ) strip --strip-unneeded $i + ;; + esac +done</userinput><userinput> unset BIN LIB save_usrlib online_usrbin online_usrlib </userinput></screen> |