egcs-1.0.3a / binutils-2.8.1 and shared libs

Paul Forgey
Fri Sep 11 06:45:00 GMT 1998

I'm having a wierd problem using egcs to generate shared libraries.  My
platform is sparc-sun-solaris2.6.

Unfortunately, I can't reproduce this myself in a test case.  One real world
program which does reproduce this is qt-1.40.  That package works fine if I
use the Sun Workshop Pro C++ compiler to build it.

If I use egcs to build the shared library, complains about bad
relocations in bogus symbols when trying to run an executable linked against
that library.  I'm also seeing this for other shared libraries kde
generates.  In qt's case, I can build libqt statically, and it works fine
(but with huge executable images of course :).

The binutils version of ld is indeed being used.

What's wierd about this is that I can use ldd to view the dependancies of
the shared library, (as well as nm it) and from what I can tell, the format
and integrity of the library is otherwise OK.

Even stranger, I can build a perfectly working without
problems, so I'm wondering if linking against Solaris' X shared libraries
are causing this..

More information about the Gcc mailing list