Subject: Re: Self build error
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: port-dreamcast
Date: 01/24/2003 13:51:07
On Sat, Jan 25, 2003 at 05:45:27AM +0900, Izumi Tsutsui wrote:

 > > Sounds more like "crt.o doesn't do .init/.fini".
 > > Not a problem with the compiler, but with csu.
 > 
 > The following patch seems to fix the problem.
 > (though I don't know gas statements..)

I'm a little confused as to why the globl is needed ... it's supposed
to be calling a non-global (static) function...

 > 
 > Index: sh3_elf/dot_init.h
 > ===================================================================
 > RCS file: /cvsroot/src/lib/csu/sh3_elf/dot_init.h,v
 > retrieving revision 1.2
 > diff -u -r1.2 dot_init.h
 > --- sh3_elf/dot_init.h	2002/11/22 06:45:00	1.2
 > +++ sh3_elf/dot_init.h	2003/01/24 20:26:11
 > @@ -80,6 +80,7 @@
 >   */
 >  #define MD_CALL_STATIC_FUNCTION(section, func) \
 >  asm(".section " #section "\n"		\
 > +"    .globl " #func "	\n"		\
 >  "    mov.l 1f, r1	\n"		\
 >  "    mova 2f, r0	\n"		\
 >  "    braf r1		\n"		\
 > 
 > ---
 > Izumi Tsutsui
 > tsutsui@ceres.dti.ne.jp

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>