httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk-Willem van Gulik <dirk.vangu...@jrc.it>
Subject Re: Solaris 2.6 vs. Solaris 2.5.1 shared lib differences?
Date Mon, 25 May 1998 12:17:17 GMT

On Mon, 25 May 1998, Rasmus Lerdorf wrote:

> 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?  

Might well be. I've sene the same here. Hold on; I need to talk to a ldd
guru later today. 
 
> 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?

Yes, that sounds like the correct summary.

DW


Mime
View raw message