This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: portability of shared libraries
- From: Nix <nix at esperi dot org dot uk>
- To: "Zagorodnev, Grigory" <grigory dot zagorodnev at intel dot com>
- Cc: <otter at otter-rsch dot com>, <gcc-help at gcc dot gnu dot org>
- Date: Wed, 06 Apr 2005 11:29:17 +0100
- Subject: Re: portability of shared libraries
- References: <F92C2EFE7C3BA745855BF7036E1F3F9AADC383@NNSMSX401>
On 5 Apr 2005, Grigory Zagorodnev mused:
> 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:
>
> FOO {
> global:
> <your symbols>;
> local:
> *;
> };
>
> Use "-Wl,--version-script,script.name" to feed script to the linker.
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).
--
This is like system("/usr/funky/bin/perl -e 'exec sleep 1'");
--- Peter da Silva