
Shared library loading shared library.
[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]
Well, teh reason for not using ld directly is precisely that it's difficult
and error prone.
You might be inclined to call ld like this:
ld -G -o hello.so hello.o
rather than the correct form:
/usr/ccs/bin/ld -dy -G -z text -R/opt/SUNWspro/lib -o hello.so \
/opt/SUNWspro/SC4.2/lib/crti.o hello.o -Y P,/opt/SUNWspro/lib:\
/opt/SUNWspro/SC4.2/lib:/opt/SUNWspro/lib/rw7:/opt/SUNWspro/SC4.2/lib/rw7:\
/usr/ccs/lib:/usr/lib /opt/SUNWspro/SC4.2/lib/crtn.o
Also note that the order of the object files is important.
(crti.o must be linked before all other objects, crtn.o must be linked
after all others)
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.