> I'm not a real Unix speciaist thus I have a question about linking
> libraries on Unix.
> If only part of a library is needed in the executable, will all the
> library be linked with it (static library)
No, the static library (.a) is a collection of object files. On most
systems, those object files containing symbols that you need will be
linked in in their entirety.
If you're using new versions of egcs and GNU ld on ELF systems, you can
use "-ffunction-sections" at build time to put the functions in a file
into different ELF sections, then you can link with "-gc-sections" to
garbage-collect those sections and include only the functions you want.
At least that's the rumor I've heard, but I haven't found a version of
ld that supports it yet. And it's not supported with shared libraries,
though such support is planned (eventually, if someone contributes it).