This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Error when -mrelax used with -g for sh-elf tool chain
- From: "Shrinivas Atre" <ShrinivasA at kpit dot com>
- To: <gcc-bugs at gcc dot gnu dot org>,<binutils at sources dot redhat dot com>
- Cc: "Shrinivas Atre" <ShrinivasA at kpit dot com>
- Date: Thu, 19 Sep 2002 14:55:43 +0530
- Subject: Error when -mrelax used with -g for sh-elf tool chain
Hi,
I am using gcc3.2 and binutils 2.13.
When any program compiled with sh-elf tool chain with -g and -mrelax together following error is observed.
This is not observed for sh-coff tool chain.
-----------------------------------------------------------------------------------
[shrinivasa@Linuxsrv5 bug]$ sh-elf-gcc empty.c -mrelax -g
/tmp/ccgEqGKf.s: Assembler messages:
/tmp/ccgEqGKf.s:129: Error: Cannot represent relocation type BFD_RELOC_SH_SWITCH32
-----------------------------------------------------------------------------------
Also when following program is compiled with -mrelax switch (without -g) following warnings are observed. The generated code does not print anything on simulator.
================= Test.c ===================
int testfunc( void )
{
int i,j;
i = i * (j+10);
j = j * (i+1);
return i*j;
}
int main(void)
{
int ui;
ui = testfunc();
printf("Returned value is %d \r\n",ui);
return ui;
}
==================================================
-----------------------------------------------------------------------------------
[shrinivasa@Linuxsrv5 bug]$ sh-elf-gcc test.c -mrelax
/usr/sh-elf3.2/lib/gcc-lib/sh-elf/3.2-GNUSH_v0204/../../../../sh-elf/bin/ld: /tm
p/ccur4d1r.o: 0x48: warning: could not find expected reloc
/usr/sh-elf3.2/lib/gcc-lib/sh-elf/3.2-GNUSH_v0204/../../../../sh-elf/bin/ld: /tm
p/ccur4d1r.o: 0x48: warning: could not find expected reloc
[shrinivasa@Linuxsrv5 bug]$
-----------------------------------------------------------------------------------
Regards,
Shrinivas
-----------------------------------------------------------------------------
Free download of GNUSH and GNUH8 tool chains for Hitachi's SH and H8 Series.
The following site also offers free support to European customers.
Read more at http://www.kpit.com/products/support.htm
Latest versions of GNUSH and GNUH8 are released on July 1, 2002.
-----------------------------------------------------------------------------