This is the mail archive of the binutils@sources.redhat.com 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]

[PATCH]: Fix overflow in gas .relax instruction (68hc11)


Hi!

The .relax instruction is used on 68hc11/hc12 to mark a group of insns for specific
relaxation. Its operand is a label that marks the end of the group. The fixup that
was used for this label was using 1 byte but it should really use 2 (savannah bug 4358).
Committed on mainline.

Stephane

2003-09-06 Stephane Carrez <stcarrez@nerim.fr>

	PR savannah/4358:
	* config/tc-m68hc11.c (s_m68hc11_relax): Use 2 for size to avoid
	overflow complain.

Index: config/tc-m68hc11.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m68hc11.c,v
retrieving revision 1.40
diff -u -p -r1.40 tc-m68hc11.c
--- config/tc-m68hc11.c	21 May 2003 12:07:55 -0000	1.40
+++ config/tc-m68hc11.c	6 Sep 2003 20:41:34 -0000
@@ -2734,7 +2734,7 @@ s_m68hc11_relax (ignore)
       return;
     }
 
-  fix_new_exp (frag_now, frag_now_fix (), 1, &ex, 1,
+  fix_new_exp (frag_now, frag_now_fix (), 2, &ex, 1,
                BFD_RELOC_M68HC11_RL_GROUP);
 
   demand_empty_rest_of_line ();

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