Alexandre Oliva wrote:

> On May 29, 2000, Stephan Kulow <[EMAIL PROTECTED]> wrote:
>
> > This is a bug in gcc at least til 2.8.1 (no 2.95 here at the
> > moment):
>
> > _IO_do_write                        0x8c
> > /opt/GCC281/lib/libstdc++.
> > a(stdiostream.o)
>
> Not a bug.  It's just that libstdc++ is not PIC, and Solaris' linker
> refuses to include such non-PIC code in a shared library.  This means
> you wouldn't be able to create a shared library with g++ on Solaris.

In general, this statement is false. The Solaris (>=2.5) linker _does_
allow non-PIC code in shared libraries. It may refuse to link in objects
from a static archive (I don't know if this is true or not), but if it
didn't, I suspect it wouldn't matter if the static archive contained PIC
or non-PIC code. I know that have seen non-PIC objects linked into a
shared library by the Solaris linker.
--
Regards,
Paul

Reply via email to