msp430/gas: correct BFD_RELOC_32 handling

Message ID 87b87381-2e22-423e-8dde-8eef241f1aab@suse.com
State New
Headers
Series msp430/gas: correct BFD_RELOC_32 handling |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Test passed

Commit Message

Jan Beulich Dec. 9, 2024, 10:44 a.m. UTC
  It was likely a copy-and-paste oversight that bfd_putl16() was used here
from the very beginning. And of course there's a difference only if the
value to be stored is different from the value that's already there;
typically both are 0.
  

Patch

--- a/gas/config/tc-msp430.c
+++ b/gas/config/tc-msp430.c
@@ -4541,7 +4541,7 @@  md_apply_fix (fixS * fixp, valueT * valu
 	  break;
 
 	case BFD_RELOC_32:
-	  bfd_putl16 ((bfd_vma) value, where);
+	  bfd_putl32 ((bfd_vma) value, where);
 	  break;
 
 	case BFD_RELOC_MSP430_ABS8: