Subject: Re: dlopen() and libgcc.a
To: Nick Hudson <>
From: Todd Vierling <>
List: tech-toolchain
Date: 12/09/2000 21:52:34
On Sat, 9 Dec 2000, Nick Hudson wrote:

: > Yes, I've noticed this too. Perhaps there are reasons - parts of it
: > needed in early startup? Is there a problem with libgcc linked in
: > statically? Is it supposed to make a difference from the symbol
: > scope POV?
: Mixing PIC and non-PIC seems to cause problems only on some
: architectures, eg. sparc see PR/8669.

You're thinking of mixing -fpic and -fPIC, which does not work on sparc.
If libgcc is compiled -fPIC, it can be linked with a standard non-PIC
executable just fine.

I'm considering adding a PIC version of libgcc as a shared object, since
that's already done by gcc 2.95.x+.  That doesn't have the -fpic/-fPIC
problem (it's a separate .so) and will get pulled in automatically only for
"cc -shared".

-- Todd Vierling <>  *
-- Speed, stability, security, and support.  Wasabi NetBSD:  Run with it.