This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: portability of shared libraries
- From: "Zagorodnev, Grigory" <grigory dot zagorodnev at intel dot com>
- To: "Nix" <nix at esperi dot org dot uk>
- Cc: <otter at otter-rsch dot com>, <gcc-help at gcc dot gnu dot org>
- Date: Wed, 6 Apr 2005 14:53:53 +0400
- Subject: RE: portability of shared libraries
>> So the possible solution for you is to hide libstdc++ symbols from
>> run-time dynamic linking by means of a version script. Script like
this
>> will hide all symbols except those you define as global-visible:
>The danger is that if you then pass instances of libstdc++ classes
>between routines that rely on different libstdc++ instances, things
will
>go *very* wrong, even if the ABIs and class layouts are compatible (the
>allocators will get rightly confused).
Definitely. Passing pointers to malloc'ed regions between libraries is
dangerous as well. Library implementation must avoid passing objects and
pointers. The approach of hiding non-user stuff may suit in this case.
- Grigory