On Sat, Oct 29, 2005 at 03:12:24AM +0100, [EMAIL PROTECTED] wrote:
>         Hi,
> 
> > Then when the dynamic linker looks for a symbol, it looks at it
> > by name.  It will go over all objects to see if it exists in it.
> > It will use the symbol from the first library it finds it in.
> >
> > This means, that a symbol that libA requires, and _should_ get
> > from libssl.so.0.9.7, can also exist in libssl.so.0.9.8, and will
> > most likely be using that.  If libssl.so.0.9.8 has a different
> > ABI, this breaks.
> >
> > The way to make sure that libA gets the symbol with the right
> > ABI, is to have all symbols have a unique name.  This can be done
> > with symbol versioning.  It then gets named "symbol@@version".
> > The runtime linker adds references to the versioned symbol, and
> > dynamic linker then looks for the versioned symbols.
> 
> If you "simply" use the "-Bsymbolic" flag when building libA, doesn't
> that solve the problem as well?  And in a more portable way, since
> vrsioned symbols don't exist on "many" platforms?
> AFAIK, the idea of the flag is that the library doesn't automatically
> doesn't resolve its symbols against the "global" symbols from the
> main program or other libs loaded, but only against those libs that
> it was linked against.

No it doesn't. In fact, -Bsymbolic really should be avoided since
it opens alot more problems that it solves.


Kurt

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to