This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] h8300: Internal Error: fixup not contained within frag
- From: "Deepen Mantri" <Deepen dot Mantri at kpitcummins dot com>
- To: <binutils at sourceware dot org>
- Cc: "Alan Modra" <amodra at bigpond dot net dot au>
- Date: Thu, 4 Oct 2007 20:52:19 +0530
- Subject: [PATCH] h8300: Internal Error: fixup not contained within frag
Hi,
Compilation of the following testcase for RENESAS H8S target, gives
the error -> "internal error: fix up not contained within frag".
test.c
===================================================================
int main(void)
{
(*(volatile unsigned char *)(0xFFFFFEC0)) = 0x00;
return 0;
}
===================================================================
Command line: h8300-elf-gcc test.c -ms -ms2600 -O2 -Wa,-ahls=test.list
By referring
http://sources.redhat.com/ml/binutils/2007-02/msg00277.html,
I removed the fixup check for "BFD_RELOC_H8_DIR16A8" types of fixups
and got rid of the error. Whether this is the right way to avoid the
error?
*config/tc-h8300.h (TC_FX_SIZE_SLACK):BFD_RELOC_H8_DIR16A8 relocs
are allowed outside of frag.
gas/tc-h8300.h
===================================================================
--- gas/config/tc-h8300.h 2007-10-04 17:51:12.000000000 +0530
+++ gas/config/tc-h8300.h 2007-10-04 13:12:02.000000000 +0530
@@ -88,5 +88,5 @@ extern int SXmode;
#define md_operand(x)
/* This target is buggy, and sets fix size too large. */
-#define TC_FX_SIZE_SLACK(FIX) 1
-
+#define TC_FX_SIZE_SLACK(FIX)\
+((FIX)->fx_r_type == BFD_RELOC_H8_DIR16A8 ? -1 : 1)
===================================================================
Regards,
Deepen Mantri
KPIT Cummins InfoSystems Ltd.
Pune, India
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free download of GNU based tool-chains for Renesas' SH, H8, R8C,
M16C and M32C Series. The following site also offers free
technical support to its users. Visit http://www.kpitgnutools.com
for details. Latest versions of KPIT GNU tools were released on
October 1st,07
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~