static linking to c library
I'm a bit of a newcomer to linking. Does anybody know how to statically link to the c library and other user-defined libraries on linux? I use Mandrake, and I can't find the libc.a file on my system (nor am I sure what I would do with it). To dynamically link I run:
ld -shared <library object files> -o libtest.so
ld -L . -dynamic-linker /lib/ld-linux.so.2 \
-o testrun -lc -ltest <object files>
and this works just fine. But I'd like to do some benchmarking with staticly linked executables as well. Any help would be great ...
Thanks
|