This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: crtstuff sentinels
> > 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).
Any other ideas?