This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Created shared libraries on Solaris 2.6/SPARC and -mimpure-text
- To: egcs at cygnus dot com
- Subject: Created shared libraries on Solaris 2.6/SPARC and -mimpure-text
- From: Niall Smart <nsmart at kira dot team400 dot ie>
- Date: Sun, 28 Feb 1999 22:05:52 +0000
- Organization: Trinity Commerce
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