I’m running into a linking error, and I’m not quite sure what to make of it. We are using trampolines on this particular platform (c64x+), but still seeing an issue that seems to indicate that the linker can’t automatically generate calls using trampolines in some particular cases:
>> error: relocation overflow occurred at address 0x00000274 in section '.customtext' of input file 'myFunctionality.obj (z:\\src\\myDependency.lib)'. The 21-bit PC-relative displacement 1048576 at this location is too large to fit into the 21-bit PC-Relative field; the destination address is too far away from the instruction. |
Not sure if it is somehow related, but we intentionally put the code in a separate code section, other than .text. The suspicious thing that sticks out to me, however is that the displacement (1048576) would overflow the (signed?) 21-bit PC-relative field by exactly one... I can work-around this issue by including additional unnecessary code which, presumably, alters the placement of this particular obj so that it either falls within the 21-bit PC limit, or causes a trampoline to be created successfully (not sure which at the moment).
At any rate, it seems like the linker ought to be able to generate a trampoline for this call. Does anyone have any thoughts about what might be going on?
-----
TMS320C6x C/C++ Compiler v6.0.8
Build Number 1GKUL-JA0KH827-RSAQQ-TAV-ZAZG_W_Q_Y
TMS320C6x COFF Linker v6.0.8
Build Number 1GKUL-JA0KH827-RSAQQ-TAV-ZAZG_W_Q_Y