[gccsdk] GCCSDK GCC 4 status update
leenoar at ntlworld.com
Thu Jan 4 04:01:09 PST 2007
In article <055cb19f4e.Jo at hobbes.bass-software.com>, John Tytgat
<John.Tytgat at aaug.net> wrote:
> 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.
Yes, ELF GCC 3.4.6 does global object contruction/destruction in
shared libraries, so I'll sort something similar out for GCC 4.
It's not so much the ELF loader that is responsible because
UnixLib has to be initialised before constructors can be called.
| |\ |
|__ee | \|oar StrongARM Risc PC,
leenoar at ntlworld.com RISC OS 4.
More information about the gcc