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]

solaris g++ 2.95.2 problem with shared objects.


There seems to be something odd in the way shared objects are generated
with g++.

If you produce a shared module the "old-fashioned" way under solaris 2.7
like:
    /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).

Thanks.

-- 
Roger Fujii <rmf@lookhere.com>     Phone: (703)280-1243
Underemployed, and trying to keep it that way....


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