This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Created shared libraries on Solaris 2.6/SPARC and -mimpure-text


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]