Linker warning on Solaris symbol has differing sizes
Milan Cvetkovic
mcvetkovic@mpathix.com
Thu Jul 20 14:59:00 GMT 2000
I know this was posted here before,
I just could not find any answers to this question.
I have a third party shared object library libXYZ.so (binaries only)
that appears to be compiled with GCC.
When I write a minimal C++ program that uses libxyz.so
and C++ exceptions I have the following linker warnings:
==========linker output
g++ -g demo.cpp -DUNIX_SVR4 -DUNIX -DSOLARIS -DMULTITHREAD
-DSOLARIS_SPARC
-I/opt/xyz/include -lthread -L/opt/xyz/lib -lxyz
ld: warning: symbol `bad_exception virtual table' has differing sizes:
(file /opt/xyu/lib/libxyz.so value=0x18; file
/opt/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/libgcc.a(exception.o)
value=0x20);
/opt/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/libgcc.a(exception.o)
definition taken
ld: warning: symbol `exception virtual table' has differing sizes:
(file /opt/xyz/lib/libxyz.so value=0x18; file
/opt/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/libgcc.a(exception.o)
value=0x20);
/opt/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/libgcc.a(exception.o)
definition taken
=============end linker output
More warnings of the same type appear if more classes are used related
to exceptions
and more RTTI is used.
Only classes from exception hierarchy and __xx_type_info class
hierarchy.
The questions are:
1. How to avoid these warnings - link nicely, if there is NO option of
recompiling libxyz.so ?
2. If not, is it safe to ignore these warnings if symbols linked "are
taken" from libgcc.a ?
Any help will be greatly appreciated.
mcvetkovic@mpathix.com
More information about the Gcc
mailing list