This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Fix cut-&-pasto in tc-avr.c


Kenny noticed this typo in tc-avr.c.  It shows up on a testcase like:

        .data
        .4byte  x - y
x:
        .4byte  1
y:

which gets misassembled as:

Contents of section .data:
 0000 fcff0000 01000000                    ........        

instead of:

Contents of section .data:
 0000 fcffffff 01000000                    ........        

(I would have added that as a testcase, but there doesn't seem to be an
AVR testsuite for GAS.)

Tested on avr-elf and applied.

Richard


gas/
	* config/tc-avr.c (md_apply_fix): Fix handling of BFD_RELOC32.

Index: gas/config/tc-avr.c
===================================================================
--- gas/config/tc-avr.c	2011-04-11 15:05:41.000000000 +0100
+++ gas/config/tc-avr.c	2012-04-17 14:50:14.423888823 +0100
@@ -1224,7 +1224,7 @@ md_apply_fix (fixS *fixP, valueT * valP,
 	  break;
 
 	case BFD_RELOC_32:
-	  bfd_putl16 ((bfd_vma) value, where);
+	  bfd_putl32 ((bfd_vma) value, where);
 	  break;
 
 	case BFD_RELOC_16:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]