what does -fno-pic do ?

Yubin Ruan ablacktshirt@gmail.com
Sun Jul 10 14:19:00 GMT 2016


Hi,
     I am reading some OS kernel codes, and I find that in the Makefile 
used to build the kernel, there is a **-fno-pic** flag. I totally don't 
understand what that mean. I try to find some description from the man 
pages but can find no direct description about that flag(same for the 
**-fpic** flags). All I can find is something like:

     For Darwin, only the -m64 option also turns off the -fno-pic and 
-mdynamic-no-pic options.

blah blah blah....

     I try to google it but it seems that people rarely discuss it on 
the Web.

     Does the **pic** in that flag represent Programmable Interrupt 
Controller that is used by the kernel the control interrupts to CPU ?
If it is, why no pic ? what does it really mean ?

     And, in addition, what would that flag influence the layout of the 
kernel image ?

Thanks,
Ruan.



More information about the Gcc mailing list