All, I've been told this is the alias for questions regarding linking. I'm using Studio 12 on Solaris 10. Trying to use -z lazyload and -z nodefs for linking... The library is linked as:
ld -G -z lazyload -o ../../../3b2/lib/myso.so [list of .o files] -h myso.so The executable was linked with the following command: /opt/SUNWspro/bin/cc -z lazyload -z nodefs -L../../../3b2/lib -L/usr/lib -L/3b2/lib -o ../../../3b2/bin/another.o /inc/yetanother.o -lutillib -lnelib The library has a symbol that the application uses - but the library also references other symbols that are not defined at the time (they are other places). As soon as the application goes after the symbol that is in the library, it then complains about the undefined symbol that is never in the execution path undefined in the shared object. Is there a way to have the library load, but since the undefined symbols in that library are never used because of the code execution - have it only worry about the symbols that it is using -- and not care about the undefined symbols in the shared object library? I assumed that using lazyload for building the library itself would avoid having it load symbols that are never used in the execution path. Does this make sense?