Changeset be628b7


Ignore:
Timestamp:
05/08/2021 01:17:27 PM (6 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
xry111/usr-move
Children:
7c1fce4e
Parents:
dc5635a
Message:

usr-move: clean up stripping command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/strippingagain.xml

    rdc5635a rbe628b7  
    3434
    3535<!--<screen><userinput>save_lib="ld-2.25.so libc-2.25.so libpthread-2.25.so libthread_db-1.0.so"-->
    36 <screen><userinput>save_lib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so"
    37 
    38 cd /lib
    39 
    40 for LIB in $save_lib; do
    41     objcopy --only-keep-debug $LIB $LIB.dbg
    42     strip --strip-unneeded $LIB
    43     objcopy --add-gnu-debuglink=$LIB.dbg $LIB
    44 done   
    45 
    46 save_usrlib="libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version;
     36<screen><userinput>save_usrlib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so
     37             libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version;
    4738             libitm.so.&libitm-version; libatomic.so.&libatomic-version;" <!-- libcilkrts.so.&libcilkrts-version;-->
    4839
     
    5546done
    5647
    57 unset LIB save_lib save_usrlib</userinput></screen>
     48unset LIB save_usrlib</userinput></screen>
    5849
    5950<!--  <para>Before performing the stripping, take special care to ensure that
     
    6859   -exec strip --strip-debug {} ';'
    6960
    70 find /lib /usr/lib -type f -name \*.so* ! -name \*dbg \
     61find /usr/lib -type f -name \*.so* ! -name \*dbg \
    7162   -exec strip --strip-unneeded {} ';'
    7263
    73 find /{bin,sbin} /usr/{bin,sbin,libexec} -type f \
     64find /usr/{bin,sbin,libexec} -type f \
    7465    -exec strip --strip-all {} ';'</userinput></screen>
    7566
Note: See TracChangeset for help on using the changeset viewer.