Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: save 600Kb, by stripping debugging symbols< Next Oldest | Next Newest >
friedgold Offline





Group: Members
Posts: 122
Joined: Mar. 2005
Posted: June 24 2005,13:48 QUOTE

From http://www.tldp.org/LDP/lfs/html/chapter06/aboutdebug.html

Quote
Most programs and libraries are, by default, compiled with debugging symbols included.

<snip>

As most people will probably never use a debugger on their system software, a lot of disk space can be regained by removing these symbols. To remove debugging symbols from a binary (which must be an a.out or ELF binary), run strip --strip-debug filename


I thought I'd try this with DSL 1.2.1 to see if any space can be freed. Since DSL doesn't include strip I made the remaster on my Debian machine. I copied the contents of the KNOPPIX image to a source directory and then used:

Code Sample
cd /path/to/source/dir
find {,usr/,usr/local/}{bin,sbin,lib} -type f -exec strip --strip-debug '{}' ';'


I then recreated the KNOPPIX image using best compression. The difference in size is as follows:

Before - 49237759 bytes
After - 48615540 bytes

i.e. a saving of just over 600Kb. I made a remaster using this new image and so far haven't detected any problems.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: June 24 2005,14:10 QUOTE

Strip is also a very useful tool in creating myDSL packages.  For example, the Fluxbox 0.9.x binary is 6mb unstripped, and only 1mb stripped

--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
clivesay Offline





Group: Guests
Posts: 935
Joined: Dec. 2003
Posted: June 24 2005,15:17 QUOTE

Quote (mikshaw @ June 24 2005,09:10)
Strip is also a very useful tool in creating myDSL packages.  For example, the Fluxbox 0.9.x binary is 6mb unstripped, and only 1mb stripped

That big of a difference?!  :O

Guess I need to revisit some .dsl extensions and see what happens.

Chris

bookmark
Back to top
Profile PM MSN YIM 
clivesay Offline





Group: Guests
Posts: 935
Joined: Dec. 2003
Posted: June 24 2005,17:22 QUOTE

disregard this post. I don't think strip was in the net-tols package. Probably why I was having trouble!

Chris
Back to top
Profile PM MSN YIM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: June 25 2005,18:47 QUOTE

friedgold,

Thanks for sharing.  We usually strip the binaries but the libs were not stripped and that is where the bulk of the new savings occurs.
Back to top
Profile PM WEB 
5 replies since June 24 2005,13:48 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: save 600Kb

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code