Advertisement
Maluvia

Stripping Binaries

Nov 28th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. Stripping Binaries:
  2.  
  3. Not having luck with make install-strip, which doesn't work for all programs anyway:
  4.  
  5. This works. Run this as root user from your build directory:
  6.  
  7. # find . | xargs file | grep "executable" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip -g 2> /dev/null
  8.  
  9. If you want to keep your unstripped binaries, copy build directory to a sandbox first (cp -a builddir sandboxdir/builddir where sandbox/builddir does not already exist)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement