This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
mn10300 fixup size errors
This fixes some bugs in the mn10300 port that lead to
"internal error: fixup not contained within frag". Thanks to
Mike Stein for alerting me to the problem.
* config/tc-mn10300.c (md_convert_frag): Correct fixup size.
(md_assemble): Likewise.
Index: gas/config/tc-mn10300.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mn10300.c,v
retrieving revision 1.59
diff -u -p -r1.59 tc-mn10300.c
--- gas/config/tc-mn10300.c 12 Jan 2007 06:23:52 -0000 1.59
+++ gas/config/tc-mn10300.c 22 Feb 2007 21:29:05 -0000
@@ -1019,7 +1019,7 @@ md_convert_frag (abfd, sec, fragP)
int offset = fragP->fr_fix;
fragP->fr_literal[offset] = 0xcc;
- fix_new (fragP, fragP->fr_fix + 1, 4, fragP->fr_symbol,
+ fix_new (fragP, fragP->fr_fix + 1, 2, fragP->fr_symbol,
fragP->fr_offset + 1, 1, BFD_RELOC_16_PCREL);
fragP->fr_var = 0;
fragP->fr_fix += 3;
@@ -2280,17 +2280,8 @@ keep_going:
abort ();
}
- /* Convert the size of the reloc into what fix_new_exp wants. */
- reloc_size = reloc_size / 8;
- if (reloc_size == 8)
- reloc_size = 0;
- else if (reloc_size == 16)
- reloc_size = 1;
- else if (reloc_size == 32)
- reloc_size = 2;
-
fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset,
- reloc_size, &fixups[i].exp, pcrel,
+ reloc_size / 8, &fixups[i].exp, pcrel,
((bfd_reloc_code_real_type) reloc));
if (pcrel)
--
Alan Modra
IBM OzLabs - Linux Technology Centre