gas: msp430's handling of BFD_RELOC_32
Jan Beulich
jbeulich@suse.com
Wed Dec 4 10:48:22 GMT 2024
Nick,
from its introduction (commit 2469cfa28442) md_apply_fix3() has
case BFD_RELOC_32:
bfd_putl16 ((bfd_vma) value, where);
break;
Is this perhaps a copy-and-past mistake, and a 32-bit put is meant
instead? I'm suspecting this to be the reason why a new testcase of
mine (using .long with an expression involving a forward ref symbol,
which later evaluates to a constant) fails for this target, clipping
values to 16 bits.
I'm uncertain in particular because an earlier comment in the function
says "Fetch the instruction, insert the fully resolved operand value,
and stuff the instruction back again." I can't exclude that this
relocation type indeed needs special handling for this target when
insns are being fixed up. In that case a way to tell insns from data
allocation would apparently need introducing.
Thanks, Jan
More information about the Binutils
mailing list