我移植一段linux下的代码到我的工程里,编译出现以下错误
Link Error : Illegal 16-bit PC relative reference to symbol '_malloc' from address 0x00003d42c in section '.text' of file 'libc.a alloc.o'. This type of reference has a range from 4294934528 to 32767 bytes.说明:code model 设置的是far 32bit请那位高手指点一下,这个问题怎么解决呢
先试试把project settings-->ColdFire Processor配置页面下的"Use.sdata/.sbss for:"改成"All data smaller than 0 bytes";
如果不行,再试试重新编译EWL_C.CF.mcp项目,编译选项根据自己的project设置,最后把编译后的新的libc.a加到项目中,同时禁止project调用系统默认ewl库。