global contructors
Chris Johns
chrisj at rtems.org
Thu Aug 24 22:08:05 UTC 2006
Philippe Simons wrote:
> So i need to add "builtin_define ("__USE_INIT_FINI__");" to
> arm/rtemself.h or add a #ifdef __ELF__ to _Thread_Handler?
>
We are the only OS putting __USE_INIT_FINI__ into gcc so I have to
wonder why we do this. There is no code in gcc or newlib that depends on it.
There was a time when we supported m68k-coff and m68k-elf and this was
the solution. The coff and elf systems handled static constructors
differently.
The main point behind the __ELF__ comment was based on all our targets
now supporting ELF. Looking more I see we have a couple of targets such
as H8300 and SH that do not have __USE_INIT_FINI__. GCC has a comment
about some ELF targets "use crtstuff.c to provide __CTOR_LIST__" so it
may not be completely safe. The H8300 and SH may be such targets.
Another solution is to add __USE_INIT_FINI__ to the RTEMS cpu header
file and remove it from gcc.
Ralf maintains the tools and it is his call on what to do.
Regards
Chris
More information about the users
mailing list