This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linker Error: relocation from function xxx overflowed; the 31-bit relocated address 0xdeffb0c0 is too large to encode

Hello: 

I am getting the following linker error on a DM6437.  CGTools 6.1.7.  The code is using C++ and Templates, with Compiler "Memory model" =  "Far Aggregate" or = "Far"   (We didn't have this problem with v6.0.8).  

That relocated address seems suspicious since it isn't 0x8xxxxxxx or is that an offset?   It doesn't make sense as an offset either.

Thanks,

--B

"C:/Program Files/C6000Code Generation Tools 6.1.7/include/limits", line 316: warning: relocation from function "Engine::init" to symbol "_init__Q2_3The31Converter__tm__7_5TiC64FPCQ2_3The7XMLNode_v" overflowed; the 31-bit relocated address 0xdeffb0c0 is too large to encode in the 21-bit signed PC-Relative field (type = 'R_C60PCR21' (82), file = "D:\\testCCS\\bin\\lib\\c64\\Debug\\engine.lib<Engine.obj>",offset = 0x00011d0c, section = ".text")

 

  • Assuming the same project builds with the older tools this sounds like a tools bug of some sort in which case my suggestion would be to either roll back to the tool set that worked or upgrade to a newer version.

    The address in there of 0xdeffb0c0 does not make any sense, it seems to me the memory map it is trying to use is somehow corrupted, but if it was your linker command file settings that broke it you should have gotten a similar error with 6.0.8.

    As a side note there is a wiki article on relocation overflow and what that particular error actually means, though based on your situation with tool versions this probably will not help fix things.