This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: shared libraries and libgcc
- To: Frank Pilhofer <fp at informatik dot uni-frankfurt dot de>
- Subject: Re: shared libraries and libgcc
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 26 May 1998 21:14:15 -0600
- cc: egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <19980526110549.65289@rose.fpx.de>you write:
> Some of my problems could be solved if libgcc were a shared library
> itself, yet it is only compiled statically. Let me explain:
>
> - The Tcl core itself is programmed in C.
> - I write a C++ extension, which for example uses the new operator
> - gcc/egcs translate this to a call to __builtin_new, which is
> defined in libgcc.a:_op_new.o
> - Since no functions from libgcc.a:_op_new.o were used in the Tcl
> core, the functions were not linked.
> --> dynamic loading of my extension fails because of the
> unresolved symbol __builtin_new
The .o files which compose libgcc.a should be built with -fPIC so
that you can include them in shared libraries to avoid this problem.
ie, while libgcc.a is an archive library, its components are suitable
for including in a shared library.
jeff