This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: crtstuff sentinels


On Thursday 08 December 2005 00:52, DJ Delorie wrote:
> > > The "-1" sentinal used for CTOR_LIST is not a representable address,
> > > and the code gcc ends up using compares 0xffffffff (the -1) with
> > > 0x00ffffff (what ends up in $a0) and it doesn't match.
> > >
> > > Suggestions?
> >
> > Use ELF .init_array/.fini_array
>
> I got distracted trying to support this (binutils fixes), but in the
> end discovered that it won't (or doesn't seem to) work.  GCC still
> builds the ctor/dtor array, but now it doesn't call it nor make it
> available (the symbols are still in crtstuff, but they're not global).

It can definitely be made to work.
A newlib based arm-none-eabi toolchain uses it.

Paul


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