-
Bug
-
Resolution: Fixed
-
Medium
-
Code Generation Tools
-
CODEGEN-7957
-
-
-
default
-
Don't use any non-zero addends in symbolic operands where a 22-bit value is expected (e.g. MOVL). Instead add in the addend with a subsequent ADDL instruction.
C2000 uses the REL22 relocation for instructions like MOVL with a symbolic immediate. If the symbolic immediate has an addend (for example, symbol+8) and the file format is ELF, the assembler will use a RELA relocation, indicating that an addend is present. For REL22 RELA relocations only, the linker will sometimes write the relocated value to the wrong place in the section. The exact place written is a function of what other relocations are present in the section, so it's not easy to predict.