我们在C6678上编译一个大型的C++程序,环境是CCS 6.1,使用JTAG把程序“裸跑”在一个C66x core上。但因为程序代码量比较大,出现下列warning:
#17003-D</a> relocation from function "getGlobalMatOpInitializer" to symbol "$P$T427$1" overflowed; the 16-bit relocated address 0xdcf4 is too large to encode in the 15-bit unsigned field (type = 'R_C6000_SBR_U15_B' (11), file = "./src/core/matop.obj", offset = 0x00005e04, section = ".text") cvdef.h /cppTest/src/core line 214 C/C++ Problem
请问要怎样才能支持一个大型的C++程序呢?
Remedy
- Use trampolines (if available)
- Use a large code (or data) memory model
- Make the code size smaller
- Modify the linker command file to place the calling function closer to the called function.
已经尝试过如下工程选项:--trampolines=on --mem_model:const=far --mem_model:data=far,另外不希望采用第3、4种方式。
谢谢!