public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Linker warning on Solaris symbol has differing sizes
@ 2000-07-20 14:59 Milan Cvetkovic
  2000-07-21 12:09 ` Alexandre Oliva
  0 siblings, 1 reply; 3+ messages in thread
From: Milan Cvetkovic @ 2000-07-20 14:59 UTC (permalink / raw)
  To: gcc

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Linker warning on Solaris symbol has differing sizes
  2000-07-20 14:59 Linker warning on Solaris symbol has differing sizes Milan Cvetkovic
@ 2000-07-21 12:09 ` Alexandre Oliva
  2000-07-21 12:46   ` Milan Cvetkovic
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Oliva @ 2000-07-21 12:09 UTC (permalink / raw)
  To: Milan Cvetkovic; +Cc: gcc

On Jul 20, 2000, Milan Cvetkovic <mcvetkovic@mpathix.com> wrote:

> I have a third party shared object library libXYZ.so (binaries only)
> that appears to be compiled with GCC.

Which version of GCC?  GCC hasn't maintained the ABI from one major
release to another, so these problems may indeed occur when using
different releases of GCC.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Linker warning on Solaris symbol has differing sizes
  2000-07-21 12:09 ` Alexandre Oliva
@ 2000-07-21 12:46   ` Milan Cvetkovic
  0 siblings, 0 replies; 3+ messages in thread
From: Milan Cvetkovic @ 2000-07-21 12:46 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc

My GCC:

$ g++ -v
Reading specs from
/opt/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specs
gcc version 2.95.2 19991024 (release)
$

Their GCC, I have no idea. Is there a way to find out ?
I only believe they compiled it with GCC as only GNU nm (oposed to
/usr/ccs/bin/nm) utility could unmangle names in the library.

Regards, Milanc Cvetkovic
mcvetkovic@mpathix.com

Alexandre Oliva wrote:
> 
> On Jul 20, 2000, Milan Cvetkovic <mcvetkovic@mpathix.com> wrote:
> 
> > I have a third party shared object library libXYZ.so (binaries only)
> > that appears to be compiled with GCC.
> 
> Which version of GCC?  GCC hasn't maintained the ABI from one major
> release to another, so these problems may indeed occur when using
> different releases of GCC.
> 
> --
> Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
> Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
> CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
> Free Software Evangelist    *Please* write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-07-21 12:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-20 14:59 Linker warning on Solaris symbol has differing sizes Milan Cvetkovic
2000-07-21 12:09 ` Alexandre Oliva
2000-07-21 12:46   ` Milan Cvetkovic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).