This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Error when -mrelax used with -g for sh-elf tool chain
- From: "Shrinivas Atre" <ShrinivasA at kpit dot com>
- To: <gcc at gcc dot gnu dot org>
- Cc: "Shrinivas Atre" <ShrinivasA at kpit dot com>
- Date: Thu, 19 Sep 2002 18:22:02 +0530
- Subject: Error when -mrelax used with -g for sh-elf tool chain
-----Original Message-----
From: Shrinivas Atre
Sent: Thursday, September 19, 2002 2:56 PM
To: gcc-bugs@gcc.gnu.org; 'binutils@sources.redhat.com'
Cc: Shrinivas Atre
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.
-----------------------------------------------------------------------------