httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rasmus Lerdorf <ras...@lerdorf.on.ca>
Subject Solaris 2.6 vs. Solaris 2.5.1 shared lib differences?
Date Mon, 25 May 1998 12:00:33 GMT
Can someone here shed some light on what has changed from Solaris 2.5.1 to
Solaris 2.6.0 with respect to shared libraries?  I have gcc-2.8.1 on two
machines, one running Solaris 2.5.1 and the other 2.6.0.  I compile Apache
(or any binary for that matter) statically with "-O2 -g" on both systems. 
Then I compile a shared library with "gcc -fpic" and link it with "gcc -G"
and dlopen() it from the static binary.  This works fine on Solaris 2.5.1
but fails on Solaris 2.6.0.  On 2.6.0 I get a relocation error and it is
unable to find the symbol.  If I go back and compile my statically linked
binary with -fpic on Solaris 2.6.0 then it suddenly works. 

It can't be right that I have to use -fpic on the code that is loading the
shared library, can it?  

The symbol it is unable to find is a function that my shared library is
trying to call back in the static binary/library.  Is there something I
can do in this function to make it visible to my shared libraries without
having to compile everything with -fpic?

-Rasmus


Mime
View raw message