Boost logo

Boost :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2001-12-17 20:49:20


On 2001-12-18 at 01:29 AM, dylan_at_[hidden] (mfdylan) wrote:

>
>No, we had two regular (non-shared) libraries, both containing
>classes with the same names but different, incompatible versions.
>If you linked them against separate executables and had one call the
>other, there would be never any chance of mismatched calls.
>But under Unix, if you link one version of the library against your
>executable and another version of the library with a shared object
>that you load explicitly at runtime (which we do), then it's possible
>for the one module to "accidentally" make calls into the other,
>presumably because there is a global symbol table that gets patched
>when you do a dlopen.
>
>All of which is getting very off-topic, but oh well... :o)

If your are lucky to be using ELF link objects and on Unix and using GCC, lots
of ifs :-), you can pass -Bsymbolic to the linker when compiling the *.so
which prevents the exe from clobering the symbols in the *.so. And presumably
in the other direction also because you already have the program loaded and
the symbols are already resolved.

-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq - Grafik666_at_AIM - Grafik_at_[hidden]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk