The behavior of the MSP430 GNU assembler has changed for the worse.
I have a program which redefines a symbol multiple times in order to create a linked list. The macro which does this is:
.macro CODE lex, name, label .word _link .equ _link, . .byte \lex .ascii "\name" .align 1 ; force 16 bit alignment \label : .endm
This works fine with version 2.21.1 of the assembler but fails with version 2.24.51.20140505 which is part of the binutils packages that comes with TI's GCC.
Because the documentation for the assembler states that .set can be used multiple times:
"You may `.set' a symbol many times in the same assembly."
I tried using that as well but with the same results. The assembler whines:
430ef202.S: Assembler messages:
430ef202.S:238: Error: redefined symbol cannot be used on reloc
The documentation for .equ mentions that it is a synonym for .set and says nothing about redefinition. In fact there is an .equiv op that is specifically for instances where redefinition is an error.
So there are two problems here:
1) The behaviour of the assembler has changed.
2) The .set pseudo op does not do what the documentation very specifically says it does.
I have searched for a command line argument that would disable this error but I can't find one. Is there a way to work around this problem?