Nate Williams wrote:
> What happens when this is done?  Can it ever work?
> 
> How about the reverse, where you link in PIC compiled libraries into
> static (.a) libraries?  Does this work?
> 
> Assuming it works (in either case) are there any performance
> hits/advantages to either?
> 
> My impression from past discussions is that you can't use non-PIC code
> in shared libraries (it won't work), and that you can use PIC code in
> static libraries, but you take a performance hit for it...
> 
> Am I right?

You *can* use non-PIC for shared libraries, but the resulting code requires
text relocations at runtime which cause copy-on-write faults and kill any
shareability.  This might be acceptable if you are using .so's for
single-process plug-ins or something, but generally you wouldn't want it
for libc (for example. :-).  Of course, getting ld-elf.so and ld(1) to be
quiet about it is another thing altogether...

Cheers,
-Peter




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to