relocation errors

Top  Previous  Next

configurer produces relocation errors


The TI compiler can generate references to external objects in two ways: using one instruction or using two. References using single instructions are faster than those using two instructions but they have limited addressing capabilities: objects that are too far away or are too large may not be reachable. References using two instructions can reach anywhere in the processor's address space.

 

'Relocation errors' indicate that the configurer has discovered a single-instruction reference that cannot reach its target. To ensure the compiler generates the longer instruction sequences when necessary, you should ensure that your source declares the objects as 'far'. For example:

 

extern far int Counter;

extern far void SpecialProcessing(void);

 

This usually happens only when you explicitly put data or functions in separate sections and not in the usual '.data' or '.text' sections.

linker complains about relocations


The TI compiler and linker must agree on the format and content of object files. On a number of occasions, TI has updated the code generation tools in a way that leaves them incompatible with older versions. Usually the problem is limited to older versions not accepting output generated by the newer versions.

 

This problem can appear if you are using a version of the Diamond libraries built with a version of the tools that is newer than the tools you have installed. There are only two solutions:

 

1.upgrade to the new version of the TI tools;
2.revert to an older version of Diamond.