[转]symbian rodata overlap errors

原文地址:

http://blog.csdn.net/wulongtiantang/archive/2010/01/28/5265267.aspx

 

error description:

arm-none-symbianelf-ld: section .rodata [002c8ed0 -> 004488f7] overlaps section .data [00400000 -> 00400083]
arm-none-symbianelf-ld: section .bss [00400084 -> 00400993] overlaps section .rodata [002c8ed0 -> 004488f7]
arm-none-symbianelf-ld: C:/proj/group/Proj_Data/GCCE_UREL/Proj.exe: section .data lma 0x400000 overlaps
previous sections

查询网上资料:

Your code size (.rodata) is too large so it overlaps the hard coded .data section begining at 0x400000.

I've changed these hard coded .data section in /epoc32/tools/cl_bpabi.pm line 793 & 799 :

"/$(CODE_SEGMENT_START) ", "/$(DATA_SEGMENT_START) 0x400000 ", "/$(SYMVER_OPTION) ","/$(SO_NAME_OPTION) ","$LinkAs"

I replaced 0x400000 by 0xA00000 and I get my app properly linked linked, and it works fine on phone.

我改了以后好像没什么用,看到这个:For UREL static solution everything is fine as the size is much more less then 4mb, but for UDEB (to be able to debug on hardware) the size goes beyond...

和我情况一样,我也是编译gcce udeb才不成功

然后我改MMP文件:

EPOCSTACKSIZE                           0x10000
EPOCHEAPSIZE                             0x100000 0x40000000

变为

EPOCSTACKSIZE                           0x100000
EPOCHEAPSIZE                             0x100000 0x4000000

再编译,搞定

 

/////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////

//

补充:

我按照上面的方法,将heap最大值改成4M,重新链接,发现还是有同样的错误。再到/epoc32/tools/cl_bpabi.pm,将0x400000改成0xA00000,再编译链接,这次就真的搞定了。不知道是不是要两处都改才行。没有再去试不改heap大小能否链接成功了。各位有兴趣的话可以自己去试试。o(∩_∩)o

 

你可能感兴趣的:(c,less,Symbian,2010)