Hi all,

This evening, I was struggling with the size of my application.  It
became almost 7.6 MB, so way to much for the old "red FoxBoard"
(Classic MCM version) with only 8MB of RAM.

I'm programming in C++, so there's already anyhow a size penalty
compared to C.

After some investigation, I found out that both the libstdc++ library
as well as the libc library were also still containing debug
information.  Information that is completely unnecessary.

So, what I did was stripping the two libraries.  And the "gain" was
really astonishing...

The libstdc++ library went down from 8623060 bytes to 1448150 bytes,
while the libc library went down from 24234314 bytes to 1901804 bytes!!!

That's a huge saver, which I was not expecting at all!

How to do this?

Bot libs are located in /target/cris-axis-linux-gnu/lib

Go into that directory and issue the following commands (on a
(K)ubuntu distro):

sudo /usr/local/cris/cris-strip --strip-debug libstdc++.a

and

sudo /usr/local/cris/cris-strip --strip-debug libc.a

When building statically (the way I do it), the results are really
very positive.

Finally, my app dropped from 7645244 bytes to 1964781 bytes.

Thought this info was worth sharing with you, guys.

Best rgds,

--Geert


Reply via email to