Subject: Re: -fPIC: any problems to be expected?
To: None <tech-toolchain@NetBSD.ORG>
From: Gordon W. Ross <>
List: tech-toolchain
Date: 07/28/1998 16:00:16
> Date: Tue, 28 Jul 1998 15:18:38 -0400 (EDT)
> From: Todd Vierling <>
> That's correct.  sparc cannot mix -fPIC and -fpic /in the same shared
> object/, but it should be perfectly able to handle using a -fPIC-compiled
> library with a binary linked against a -fpic library.  It's the relocations
> used inside the library itself that matter.  Otherwise, losing your
> toolchain wouldn't be the problem - compatibility with old binaries (and
> losing your whole libc) would.

I seem to recall that one could evade -fpic limitations by
making minor changes to the library code.  Something about
initializing function pointers at run time instead of at
load/link time.  At least, I've seen that in commercial
library code.  Anyone know why that helps and when?