gas: msp430's handling of BFD_RELOC_32

Nick Clifton nickc@redhat.com
Thu Dec 5 11:30:39 GMT 2024


Hi Jan,

> 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?

Yes, definitely!


> I can't exclude that this
> relocation type indeed needs special handling for this target when
> insns are being fixed up.

No - the whole point of the BFD_RELOC_32 relocation is that it is meant
to be a generic 32-bit value insertion relocation.  If a target needs a
special way to insert 32-bit values (eg in code regions) then it should
define its own, target specific reloc, for this situation.

Cheers
   Nick



More information about the Binutils mailing list