免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 7950 | 回复: 7
打印 上一主题 下一主题

section lma overlaps previous sections [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-06-18 22:36 |只看该作者 |倒序浏览
大家好!最近因为某种原因,换了交叉编译工具链,以前是3.4.3,现在是4.2.3。
同样的源码,在编译应用程序模块时部分模块出现了类似如下的错误信息。
BFD: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: section .interp lma 0x4000f4 overlaps previous sections

BFD: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: section .reginfo lma 0x400108 overlaps previous sections

BFD: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: section .dynamic lma 0x400120 overlaps previous sections

BFD: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: section .hash lma 0x400200 overlaps previous sections

BFD: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: section .dynsym lma 0x400c28 overlaps previous sections

BFD: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: section .dynstr lma 0x402438 overlaps previous sections

BFD: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: section .rel.dyn lma 0x403460 overlaps previous sections

BFD: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: section .init lma 0x403488 overlaps previous sections

BFD: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: section .text lma 0x403510 overlaps previous sections

BFD: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: section .MIPS.stubs lma 0x42f2e0 overlaps previous sections

BFD: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: section .fini lma 0x42f9a0 overlaps previous sections

BFD: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: section .rodata lma 0x42fa00 overlaps previous sections

BFD: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: section .eh_frame lma 0x435e9c overlaps previous sections

BFD: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: section `.rodata' can't be allocated in segment 3

/opt/toolchains/uclibc-crosstools-gcc-4.2.3-3/usr/bin/mips-linux-uclibc-strip: /home/***/HG553V100R001/targets/fs.src/bin/stALGP14: Bad value
我上网查了一下,是
segment太大,覆盖了后面的segment。好像可以通过linker script来解决这个问题。
但我不知道怎么去修改linker script,来改变segment,请问有谁可以告诉我,怎么改,或者到哪里去改吗?
或者告诉我应该怎么去解决这个问题的思路也可以。好像也有人说可以通过设置工具链的编译选项来改变应用程序的大小和segment,但看了很多。
我还是不太明确到底怎么去解决这个问题。求救啊

论坛徽章:
2
摩羯座
日期:2013-10-10 14:29:04天蝎座
日期:2014-01-03 09:14:49
2 [报告]
发表于 2010-06-19 20:10 |只看该作者
这么多溢出啊。这个,先readelf看看各个section的情况。

论坛徽章:
0
3 [报告]
发表于 2010-06-19 22:06 |只看该作者
怎么看
我是linux环境下面编译的

论坛徽章:
0
4 [报告]
发表于 2010-06-19 22:08 |只看该作者
能不能细细说说。谢谢了。

论坛徽章:
0
5 [报告]
发表于 2010-06-19 22:51 |只看该作者
本帖最后由 heixia108 于 2010-06-19 22:53 编辑

make clean 以后,重新编译还会出现这个问题吗?

关于 Linker Scripts , http://sourceware.org/binutils/docs/ld/  上面有介绍,不知道对你有没有用

论坛徽章:
2
摩羯座
日期:2013-10-10 14:29:04天蝎座
日期:2014-01-03 09:14:49
6 [报告]
发表于 2010-06-20 18:35 |只看该作者
stALGP14是个可执行程序么?

$ readelf -h stALGP14

下一步,我也不是很清楚该如何。

论坛徽章:
3
2015年迎新春徽章
日期:2015-03-04 09:56:11数据库技术版块每日发帖之星
日期:2016-08-03 06:20:00数据库技术版块每日发帖之星
日期:2016-08-04 06:20:00
7 [报告]
发表于 2010-06-21 12:05 |只看该作者
我想应该是链接脚本的问题吧

论坛徽章:
3
2015年迎新春徽章
日期:2015-03-04 09:56:11数据库技术版块每日发帖之星
日期:2016-08-03 06:20:00数据库技术版块每日发帖之星
日期:2016-08-04 06:20:00
8 [报告]
发表于 2010-06-21 12:05 |只看该作者
你试着make clean之后重新编译一下试试
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP