Error when -mrelax used with -g for sh-elf tool chain
Shrinivas Atre
ShrinivasA@kpit.com
Tue Sep 24 08:58:00 GMT 2002
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.
-----------------------------------------------------------------------------
More information about the Binutils
mailing list