Link error: relocation truncated to fit: R_MIPS_GPREL16 time
来源:互联网 发布:淘宝hsf框架 编辑:程序博客网 时间:2024/05/01 05:20
Link error: relocation truncated to fit: R_MIPS_GPREL16 time
具体解释见http://sourceware.org/ml/ecos-discuss/2000-04/msg00214.html
简单的说,是因为你把全局变量放到了编译后的某一节中,而这个节不是通用的 .data .bss,而是特殊的节。导致最后链接的时候,编译器不知到选取哪个节中的变量。
例如:
#define SHARED __attribute__ ((section (".shared")))
在头文件中 extrn int a;
在.c中
SHARED int a;
此时链接时会报错,因为在.c中你把a放入了.shared节,而头文件说明该变量在普通的节中,但普通节中又找不到。这种错误在底层开发中常见。
- Link error: relocation truncated to fit: R_MIPS_GPREL16 time
- relocation truncated to fit: R_X86_64_PC32
- relocation truncated to fit: R_X86_64_32
- Building Error: relocation truncated to fit: R_X86_64_32S against symbol 'XXX'
- relocation truncated to fit: R_MIPS_CALL16 问题!
- relocation truncated to fit: R_X86_64_PC32错误排除
- relocation truncated to fit: R_MIPS_26 against
- relocation truncated to fit: R_MIPS_CALL16 问题!
- 解决relocation truncated to fit: R_PPC_ADDR24 的问题
- GCC 编译错误 relocation truncated to fit: R_X86_64_32S against `.bss'
- GCC 编译错误 relocation truncated to fit: R_X86_64_32S against `.bss'
- 编译u-boot:_udivsi3.S:67: relocation truncated to fit: R_ARM_PLT32 __div0
- 编译u-boot:_udivsi3.S:67: relocation truncated to fit: R_ARM_PLT32 __div0
- bl跳转指令使用错误导致编译出现错误--relocation truncated to fit: R_ARM_PC24 init_irq
- SCF1d.c:(.text+0xee8): relocation truncated to fit: R_X86_64_PC32 against symbol `Fel' defined in CO
- Linking fails : relocation truncated to fit: R_X86_程序占用内存大于2GB所导致的问题
- error: relocation value truncated at 0xa44 in section .text, file
- The solution to “undefined reference”and “relocation truncated” (mostly concern cell-id stuffs)
- 如何以最优时间复杂度得出——判断一个字节内的整数的二进制形式中的1个数
- 用Diff和Patch工具维护源码
- ·PL/SQL Developer使用技巧
- 微软称Silverlight技术领先于HTML5
- excel OFFSET
- Link error: relocation truncated to fit: R_MIPS_GPREL16 time
- Android平台显示单位px和dip以及sp的区别
- win7下利用vmwave7使用linux与其上面的oracle
- 图片SEO优化技巧:向站点地图中添加图片信息——来自Google站长管理员工具
- 百度与google的搜索结果比较:汇总 翻译
- 2010-9-7
- 为了积分,啥事。。
- 严重: Exception starting filter struts2
- Popup窗口访问父窗口的方法以及相互传值