This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.
Hello all, I was trying to create a shared library on Solaris using ld -G foo.so bar.so -o libfeh.so but quickly found that the global objects constructor's weren't being called by ld.so when the library was loaded, the solution seemed to be: gcc -shared -mimpure-text foo.so bar.so -o libfeh.so Should I need -mimpure-text here? If I leave it out I get lots of undefined symbols in libstdc++ and other places, should I be -l'ing against some libraries which I am not or is it simply necessary to use -mimpure-text when building shared objects on Solaris? I'm using egcs 1.1.1 on Solaris 2.6/SPARC. Many thanks for any responses, Niall Smart