View Full Version : Stripping Binaries...
spankers
02-17-2005, 10:08 AM
Have any of you guys that build software from source noticed the huge size difference between stripped/unstripped binaries?
I just compiled a light editor for Xfce called mousepad. The file size was 2M and after stripping it went to 70K. Wow.
root@chernobyl:/usr/local/bin# ls -lh mousepad
-rwxr-xr-x 1 root root 2.0M 2005-02-17 12:00 mousepad
root@chernobyl:/usr/local/bin# strip mousepad
root@chernobyl:/usr/local/bin# ls -lh mousepad
-rwxr-xr-x 1 root root 70K 2005-02-17 12:10 mousepad
openbsd-flipp
02-17-2005, 12:48 PM
That is pretty common unfortunently. I have noticed that this is the one reason I compile from source to begin withc since most *nix releases do not strip their binaries and I would rather through in only the flacgs that I need instead of dealing with a bloated standerd package that x distribution thought I would want.
znaps
02-17-2005, 12:53 PM
What is a stripped binary exactly? Is it simply one which doesn't include libraries which already reside of a user's system?
openbsd-flipp
02-17-2005, 01:15 PM
From the man page.
The strip command removes the symbol table (the section named ".symtab",
Elf section kind SHT_SYMTAB) and relocation bits ordinarily attached to
the output of the assembler and loader. This is useful to save space
after a program has been debugged.
This basically removes the excess crap out of a binarie (debugging codes, ect.)
spankers
02-17-2005, 01:37 PM
this is the one reason I compile from source to begin with...
An then there's always quite a few "bleeding edge" packages you can only get as a tarball (or perhaps ebuild... Gentoo is cool that way). Xorg is a big one for me. Debian doesn't package it yet and I wanted to play with the new COMPOSITE extension.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.