SunOS shared libs ?
Munagala V. S. Ramanath
ram@netcom.com
Thu Jul 9 08:45:00 GMT 1998
Jeffrey A Law <law@hurl.cygnus.com> writes:
> In message < 199806101546.IAA05334@netcom13.netcom.com >you write:
> > write_c_file - output name is ../../../lib/libtype1.so, prefix is libtype1_
> > so
> > static int count;
> > typedef void entry_pt();
> > void _GLOBAL__FI_libtype1_so() {
> > ++count;
> > }
> Here's the reason why you still need the -fPIC option when building
> a shared library out of just pure C code. The reference to "count"
> must be PIC. I don't know why we need to increment that counter.
> Someone familiar with C++ and collect2 would have to comment.
>
> jeff
Thanks for the response but my message was several weeks old and
had already been answered by Manfred; it somehow got recirculated
to the list; I have no idea how that happened (I did not resend it).
Ram
More information about the Gcc
mailing list