At 16:50 30-06-07 +0200, you wrote:
>Hi,
>
>I'm trying to get mspgcc to optimize my binary's size by removing unused
functions during the linking process.
>gcc supports this feature starting from a version >=4.0 adding this
>
>CLFAGS = -ffunction-sections -fdata-sections
>LDFLAGS = --gc-sections
>
>but last thing I was told is, that I should use MSPGCC 3.4 (from cvs)
patching GCC 3.3.6 because this was stable and the 4.x was far from being
usable.
>I tried to get 4.x to compile to get an idea about the status but wasn't
successful.
>So, any suggestions on how I can get this done?
>At the moment I have a lot of (object) files with unused functions which
blow up my binary.
>I am seriously considering to move to another compiler since I've been
thinking about this a couple of weeks now and see no solution.
>

You could consider placing each function into a seperate file. But if your
software contains unused functions, why bother to keep the unused
functions? You can delete them or compile them conditionally with #ifdef.

Nico Coesel


Reply via email to