On Thu, Jan 08, 2004 at 11:37:55AM +0300, Dmitry wrote:
> it is possible.
> yet i cannot see any good reason to do this.
> Even more...
> I doubt it was good to tell how to use unique sections flag, cause this is a 
> source of some strange things.

Of course, but beside of that it is a big optimisation of flash and ram
requirements when you do not use all functions in your code (usually normal
in development). With -ffunction-sections it drops unused flash-code out of
the linker file (which makes at least firmware programming faster); but the
(global) variables used by this functions are still linked and use RAM. 
-fdata-sections would save RAM in this case (well a seldom case, but it
happend).

The alternative - working with #ifdef #endif clauses - is time consuming.
Why do this manually, when the compiler can do it automatically?

        Matthias

Reply via email to