This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: typeinfo problems due to different versions of gcc embeded intoC API shared libraries
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Milan Cvetkovic <mcvetkovic at mpathix dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Thu, 4 Dec 2003 12:19:32 -0600
- Subject: Re: typeinfo problems due to different versions of gcc embeded intoC API shared libraries
- Organization: Red Hat / Chicago
- References: <3FCCFE81.3010607@mpathix.com>
>I have found that the problem is in A.so. It is internally using one of
>the previous releases of g++ (I believe g++-2.95.3), and it is exporting
>some C functions used by RTTI - I found one "__dynamic_cast".
>
>Obviusly, __dynamic_cast-2.95.3 cannot work with my_code-3.3.2, since
>the ABI changed. But the names of __dynamic_cast remained the same, even
>though the signature changed. So my code links with obsolete
>__dynamic_cast, and it core dumps when used :((
>
>Is there a way to overcome this problem?
Not that I can see.
>Maybe in future releases of g++, the names of "C" functions related to
>ABI should "mangle" the ABI version, this would let others link with C
>libraries even though C++ ABI would have changed in the mean time.
For gcc releases after gcc-3.2.x, symbol versioning is used on platforms
that can support this feature. This can help with the versioning issue
(provided both shared libraries have versioned symbols), but not with
the incompatible ABI issue.
best,
-benjamin