All of this propositions are actual for SDCC 3.2.0 #8008 (Jul 6 2012).

1. Smart linking. It's very useable feature for restricted RAM size.

Now SDCC adds to output file ALL functions from ALL included sources
(see function Best40Test_DoNotUsed in file Best40Test.c)

and from ALL specified libraries (all functions from Libs/z80/Best40.lib
are added to result file Best40Test.bin, though really used only 4.

Maybe there is a key of compiler or sdcclib to turn on smart linker?