|
section lma overlaps previous sections
[复制链接]
大家好!最近因为某种原因,换了交叉编译工具链,以前是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,但看了很多。
我还是不太明确到底怎么去解决这个问题。求救啊
|
|