typeinfo problems due to different versions of gcc embeded into C API shared libraries

Benjamin Kosnik bkoz@redhat.com
Thu Dec 4 18:20:00 GMT 2003


>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



More information about the Libstdc++ mailing list