Thank you Marcelo, Your answer makes me clear about how to use them. I have a further question, I am wondering what are the differences (could you provide a little more information) of the code generated by -fpic/-fPIC? Do you mean there are any differences in some tables which linker or something else will ues? regards, George --- Marcelo Slomp <mslomp@xxxxxxxxxxxxx> wrote: > > > Lin George wrote: > > > > Hello everyone, > > > > > > I am confused about the meaning and function of > -fpic > > and -fPIC option of gcc. I am more confused when > after > > reading the manual of gcc (for example, what means > > PIC, GOT, constant addresses, etc.). Could anyone > > explain to me what are their functions in easy to > > understand words? > > > > Here are the descriptions from gcc manual, which > makes > > me confused. :-) > > > > While -fpic is platform-dependent, -fPIC works > always, but generates much > more code than -fpic does. > In practice, using an non-technical language, -fPIC > will generate a code > capable to see things beyond > the normal scope, so that system can map the > (position independent) code in > any case. > The rule is: if you want a fast and small code, and > the target is > pic-enabled, use -fpic. > Otherwise, avoid headhaches using -fPIC always. > > Regards, > Marcelo Slomp > -- > View this message in context: > http://www.nabble.com/about--fpic--fPIC-option-for-gcc-tf2209766.html#a6308284 > Sent from the gcc - Help forum at Nabble.com. > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com