To generate a shared library, use the commands and options listed in the following table.
ld -G or cc -G
link -LD
cc +Z -b -Wl,+s -Wl,-B,symbolic
cc -p 0 -berok -blibpath:$(LD_RPATH)
cc -shared
gcc -shared