[SunHELP] Generating shared libraries

David Eisner cradle at umd.edu
Wed Feb 8 09:27:58 CST 2006

Miguel Cardenas wrote:
> Currently the code has been ported with a few modifications, but the problem 
> is linking, the 'ld' is a bit different than in linux or freebsd and the man 
> page did not help me too much to understand how to use it...
> The question is... where can I find a tutorial or note or samples to build 
> shared libraries?? just need a few samples and notes.

Linker and Libraries Guide

Appendix A Link-Editor Quick Reference

$ cc -c -o foo.o -K pic -xregs=no%appl foo.c
$ cc -M mapfile -G -o libfoo.so.1 -z text -z defs -B direct -z lazyload 
\ -z combreloc -z ignore -R /home/lib foo.o -L. -lbar -lc


More information about the SunHELP mailing list