[Gllug] -fPIC option

rich at annexia.org rich at annexia.org
Sat Feb 1 18:07:51 UTC 2003


On Sat, Feb 01, 2003 at 05:17:01PM +0000, Tethys wrote:
> While we're at it, under what circumstances should -fpic be used instead
> of -fPIC? Surely if you want position independent code, then you want it
> regardless of branch displacement sizes? Nix?

I've been reading around this a bit, and it seems like the difference
between -fpic and -fPIC is the amount of position independence you get -
so -fPIC will (apparently) produce completely position-independent code
but with a size penalty. -fpic will produce mostly position-independent
code, resulting in some relocations at run time (and hence some non-
shared pages).

This might be the answer to my question too - it looks like my shared
libraries (compiled without any -fpic/PIC option) will be heavily
relocated at run time, so not very shared :-(

Rich.

-- 
Richard Jones, Red Hat Inc. (London, UK) http://www.redhat.com/software/ccm
http://www.annexia.org/ Freshmeat projects: http://freshmeat.net/users/rwmj

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list