relocation R_X86_64_32S against -fPIC
来源:互联网 发布:dota2多核优化启动项 编辑:程序博客网 时间:2024/06/06 12:57
/usr/bin/ld: src/common/common.o: relocation R_X86_64_32S against `.data' can not be used when making a shared object; recompile with -fPIC
src/common/common.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
src/common/common.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [shared] Error 1
出现这个问题是由于Makefile中的编译选项没有添加 -fPIC选项。
fPIC 作用于编译阶段,告诉编译器产生与位置无关代码(Position-Independent Code),则产生的代码中,没有绝对地址,全部使用相对地址,故而代码可以被加载器加载到内存的任意位置,都可以正确的执行。
0 0
- relocation R_X86_64_32S against -fPIC
- Building Error: relocation truncated to fit: R_X86_64_32S against symbol 'XXX'
- GCC 编译错误 relocation truncated to fit: R_X86_64_32S against `.bss'
- libMagick++-7.a(Magick___lib_libMagick___7_Q16HDRI_la-Blob.o): relocation R_X86_64_32S against `vtab
- GCC 编译错误 relocation truncated to fit: R_X86_64_32S against `.bss'
- relocation R_X86_64_32S against `a local symbol’ can not be used when making a shared object; recomp
- error: relocation R_X86_64_32S against `vtable for hit' can not be used when making a shared object
- relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recomp
- relocation R_X86_64_32S against `_nc_globals' can not be used when making a shared object; recompile
- relocation R_X86_64_32 against
- relocation R_X86_64_32 against `a local symbol'
- relocation truncated to fit: R_MIPS_26 against
- relocation R_X86_64_32 against `a local symbol'
- 【BUG】unresolvable R_ARM_THM_CALL relocation against symbol `strlen'
- 编译ffmpeg的relocation R_X86_64_32 against错误
- -fPIC
- -fPIC
- fPIC
- Outlook 的键盘快捷方式
- 多线程--同步函数使用的锁是this
- poj 2255 Tree Recovery(求后序遍历,二叉树)
- 完美打印二叉树
- 输入a1,a2,...,an,b1,b2,...,bn, 将这个序列顺序改为a1,b1,a2,b2,a3,b3,...,an,bn
- relocation R_X86_64_32S against -fPIC
- 不弹出提示框直接导出excel
- spring技术内幕11-JdbcTemplate封装Jdbc
- 编写高质量的Objective-C代码
- Go-XPath解析
- HKEY_LOCAL_MACHINE\Software\WOW6432Node
- HDU 4309 Seikimatsu Occult Tonneru(网络流+枚举状态)
- IOS企业开发者帐号申请
- response.setHeader()的用法