This is the mail archive of the
mailing list for the GCC project.
solaris g++ 2.95.2 problem with shared objects.
- To: gcc at gcc dot gnu dot org
- Subject: solaris g++ 2.95.2 problem with shared objects.
- From: Roger Fujii <rmf at lookhere dot com>
- Date: Mon, 29 Nov 1999 16:18:46 -0500
There seems to be something odd in the way shared objects are generated
If you produce a shared module the "old-fashioned" way under solaris 2.7
/usr/ccs/bin/ld -G -o libtest.so lib.o
some static startup code never seems to get run. The *SAME*
lib.o, when munged by:
gcc -fPIC -shared -o libtest.so lib.o
works fine. Note that lib.o is output of g++ (it is not a normal C program).
Now I realize that the semi-documented way of generating shared libraries
is the second example, but if the first isn't going to work, you might
put an BOLD FAQ entry that states this explicitly, and bother the libtool
guys to use the system linker directly.. unless of course, this is a bug
(I do have a small test case if it is).
Roger Fujii <firstname.lastname@example.org> Phone: (703)280-1243
Underemployed, and trying to keep it that way....