阅读背景:

如果在可执行文件中使用了gcc -fPIC标志,那么用于编译对象的含义是什么呢?

来源:互联网 

I am putting together a makefile for a project i am working on. I have an executable and a shared library in the project. Both use some of the same source files which get compiled separately into object files. To be able to use these objects in the shared library I need to use the -fPIC (position independent code) flag in gcc. Are there any implications of compiling objects with -fPIC that get used in a executable?I am putting together a makefile for a project




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: