This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Tidy up arm-elf header files


Hi Richard,

> On Wed, Sep 05, 2001 at 05:55:45PM +0100, Nick Clifton wrote:
> > Umm, what needs to be changed ?  I am unfamiliar with this area.
> 
> arm-elf appears to be using __main, called from main, to
> run constructors.  The preferred method for ELF is to have
> a .init section, which collects instructions for a function
> called _init.  It is constructed from 4 pieces, crti.o,
> crtbegin.o, crtend.o, crtn.o.
> 
> You'll need to write crt[in].asm files for arm.  Examine
> any of the implementations for other chips for inspiration;
> ask if you have questions.
> 
> You'll need to enable building crtstuff.c.  This is where
> you get crtbegin/crtend.
> 
> You'll need to modify newlib/libc/sys/arm/crt0.S to register
> _fini with atexit, then invoke _init, all before calling main.
> I dunno if you want to change arm to use libgloss at the same
> time.  It would be nice, I suppose.
> 
> I've probably forgotten something, but that should be 99% there.

OK - but isn't that an additional change, on top of the changes I have
already made (and independent of it too) ?  ie can I apply my
use-elfos.h patch now and then work on changing arm-elf over to the
ELF preferred way of building ctors/dtors later ?

I know that someone posted that arm-elf was not building in egcs at
the moment, but I cannot reproduce that.  My builds work fine.

Cheers
        Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]