This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs & Dynamic Libraries
- To: Jean-Michel Paris <Jean-Michel dot Paris at pt dot nce dot sita dot int>, egcs at cygnus dot com
- Subject: Re: egcs & Dynamic Libraries
- From: Richard Henderson <rth at cygnus dot com>
- Date: Thu, 15 Oct 1998 15:42:37 -0700
- References: <36236CCC.21C60B31@pt.nce.sita.int>
- Reply-To: Richard Henderson <rth at cygnus dot com>
On Tue, Oct 13, 1998 at 05:07:56PM +0200, Jean-Michel Paris wrote:
> 1°/ Should I prefer -fPIC to -fpic ? What are the differents meanings ?
-fpic assumes that a small number of dynamic symbols (for some machine-
dependant definition of small) will be required in the resulting library.
-fPIC does not. This may affect the number of instructions needed to load
a symbol's address. In the case of Sparc this is 3 insns for -fPIC and
1 for -fpic.
Generally you can use -fpic until your library grows large enough that
you get relocation overflow errors from the linker.
> 2°/ Doing that on a little example, the library size go from 15kb
> (static .a) to 350Kb. I suppose this
> overhead is due to some dynamic resolution ?!
Configuring egcs with --enable-shared will build libstdc++ shared,
so that it does not get included in your library image.
> 3°/ How can I write the compilation command to produce the desired
> executable.
Um, like using any other library? What are you asking?
r~