- 论坛徽章:
- 12
|
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
Use -fPIC or -fpic to generate code. Whether to use -fPIC or -fpic to generate code is target-dependent. The -fPIC choice always works, but may produce larger code than -fpic (mnenomic to remember this is that PIC is in a larger case, so it may produce larger amounts of code). Using -fpic option usually generates smaller and faster code, but will have platform-dependent limitations, such as the number of globally visible symbols or the size of the code. The linker will tell you whether it fits when you create the shared library. When in doubt, I choose -fPIC, because it always works.
就是说,-fPIC总是能够工作,但可能产生的代码较大。-fpic通常能产生更快更小的代码,但有平台限制。 |
评分
-
查看全部评分
|