[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Strip *.o files manually (dh_strip does not do it)



On Mon, Nov 09, 2009 at 04:04:36PM +0000, sobtwmxt wrote:
>   2.9.27 changelog.Debian contains
> 
>     Strip *.o files manually (dh_strip does not do it) to prevent
>     leakage of the build directory.
> 
>   Can you send me the code that does that? ?I will probably only open 
> a bug at dh_strip (debhelper) to include it within dh_strip.
> 

This is done the same way as for other objects, that is using:

          find . -name \*crt\*.o -exec objcopy                         
            --only-keep-debug '{}' ../$(libc)-dbg/usr/lib/debug/'{}'   
            ';' || true;                                               
          find . -name \*crt\*.o -exec objcopy                         
            --add-gnu-debuglink=../$(libc)-dbg/usr/lib/debug/'{}'      
            '{}' ';' || true);                                         
         find debian/$(curpass) -name \*crt\*.o -exec                  
           strip --strip-debug --remove-section=.comment               
           --remove-section=.note --strip-unneeded '{}' ';' || true;   

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net


Reply to: