This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] SH :undefined reference to `___EH_FRAME_BEGIN__' for COFF and HMS
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Anita Kulkarni <AnitaK at kpit dot com>
- Cc: "binutils at sources dot redhat. com (E-mail)" <binutils at sources dot redhat dot com>,Nick Clifton <nickc at cambridge dot redhat dot com>
- Date: Sun, 22 Sep 2002 13:41:39 -0400
- Subject: Re: [PATCH] SH :undefined reference to `___EH_FRAME_BEGIN__' for COFF and HMS
- References: <69595093233BB547BB70CF5E492B63F232A586@sohm.kpit.com>
Nick made a similar patch to this one for scripttempl/armcoff.sc last
year; I think Anita's patch looks correct. Anyone have a comment?
On Mon, Jun 03, 2002 at 07:07:55PM +0530, Anita Kulkarni wrote:
> 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.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer