This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] SH :undefined reference to `___EH_FRAME_BEGIN__' for COFF and HMS
- From: "Anita Kulkarni" <AnitaK at kpit dot com>
- To: "binutils at sources dot redhat. com (E-mail)" <binutils at sources dot redhat dot com>
- Cc: "Nick Clifton" <nickc at cambridge dot redhat dot com>
- Date: Mon, 3 Jun 2002 19:07:55 +0530
- Subject: [PATCH] SH :undefined reference to `___EH_FRAME_BEGIN__' for COFF and HMS
Hi,
I have built the toolchain with binutils-2.12.1, gcc-3.1 and newlib-1.10.0 on linux.
I get the following error for COFF and HMS gcc
sh-hms-gcc -m2 test.c :
/usr/sh-hms3.1/lib/gcc-lib/sh-hms/3.1/m2/libgcc.a(__main.o): In function `___do_
global_dtors':
libgcc2.c:1904: undefined reference to `___EH_FRAME_BEGIN__'
/usr/sh-hms3.1/lib/gcc-lib/sh-hms/3.1/m2/libgcc.a(__main.o): In function `___do_
global_ctors':
libgcc2.c:1924: undefined reference to `___EH_FRAME_BEGIN__'
collect2: ld returned 1 exit status
It successfully creates *.out file for ELF.
Can I define the EH_FRAME_BEGIN as follows for COFF and HMS?
I have tested it and the error disappears but is this logical?
If yes, then please review the patch for sh.sc whether it is correct and ok to apply?
If not then is it a GCC bug?
Thank you for any help.
--------------------------------------------------------------------------------
--- sh.x.orig Mon Jun 3 16:31:55 2002
+++ sh.x Mon Jun 3 18:09:31 2002
@@ -25,6 +25,14 @@
.data :
{
*(.data)
+
+ *(.gcc_exc*)
+ ___EH_FRAME_BEGIN__ = . ;
+ *(.eh_fram*)
+ ___EH_FRAME_END__ = . ;
+ LONG(0);
+
+ __data_end__ = . ;
_edata = . ;
} > ram
.bss :
----------------------------------------------------------------------
--- sh.sc.orig Mon Jun 3 18:15:29 2002
+++ sh.sc Mon Jun 3 18:17:31 2002
@@ -29,6 +29,11 @@
.data :
{
*(.data)
+ ${RELOCATING+*(.gcc_exc*)}
+ ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
+ ${RELOCATING+*(.eh_fram*)}
+ ${RELOCATING+___EH_FRAME_END__ = . ;}
+ ${RELOCATING+LONG(0);}
${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > ram}
.bss :
-----------------------------------------------------------------------
Regards,
Anita
KPIT Infosystems Ltd., India ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free download of GNUSH and GNUH8 toolchains for Hitachi's SH and H8 Series.
The following site also offers free support to European customers.
Read more at http://www.kpit.com
Latest versions of GNUSH and GNUH8 are released on Apr 1, 2002.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~