[gccsdk] GCCSDK GCC 4 status update

John Tytgat John.Tytgat at aaug.net
Wed Jan 3 18:28:18 PST 2007


In message <459B634E.1090801 at sqrt.co.uk>
          Nick Burrett <nick at sqrt.co.uk> wrote:

> John Tytgat wrote:
> > The biggest issues are (again IMHO):
> > 
> > 1. Static constructor/destructors are not called : I'm not sure what the
> >    way forward is but it looks to me that the .ctor/.dtor sections are
> >    correctly populated in the ELF binary but that the ELF loader needs
> >    to call those ? Or is the runtime library supposed to do that ?
> >    Suggestions ?
> 
> This can either be done by the ELFloader, or you can build libgcc with 
> certain options to make it perform the explicit ctor/dtor calls.  The 
> latter was used in the AOF implementation.

Actually both approaches were already done and working.  I misanalysed
this and the reason of failure was that the init_priority attribute is
not taken into account when using the __CTOR_LIST__ initialisation approach
(it can't and even if we would have used the .ctor section approach, that
doesn't work for EABI either).  I've updated the wiki status page and this
is now of a much less importance. :-)

It means however that the ELF loader when loading shared ELF objects need
to take the .ctors and .dtors into account.

> > 4. Maybe the missing stack chunk support for __builtin_apply(),
> >    __builtin_apply_args() and __builtin_return() could spoil the support
> >    for languages like Ada or Java.  I'm not sure where they are typically
> >    used.
> 
> __builtin_apply and __builtin_apply_args are frequently used by 
> Objective-C and Objective-C++.

Src grepping seems to confirm this.

> I can't remember whether they are used in Ada.

It doesn't look like it.

Thanks,
John.
-- 
John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven




More information about the gcc mailing list