[ECOS] Doubts regarding atexit()
Richard Rauch
rrauch@itrgmbh.de
Thu Feb 26 13:42:00 GMT 2015
Hello,
I have doubts/questions regarding atexit().
Actually eCos comes with an own atexit handler within ISO C library support.
But I am not sure, if this implementation is really linked instead of standard gcc implementation.
I tested with a gnu toolchain, which has no atexit implementation in his libgcc.a library.
When I am generating eCos and the eCos tests, I get the linker error messages:
... /lib\extras.o: In function `__static_initialization_and_destruction_0':
... /ecos/packages/io/fileio/current/src/misc.cxx:103: undefined reference to `__aeabi_atexit'
My linker options already includes "-nostdlib", bit this seems not to be sufficient for atexit issue.
When I add compiler option "-fno-use-cxa-atexit", everything will be generated.
Who could explain, how this works in detail. Seems there are different definitions of atexit in libraries and in eCos. How I can ensure, that the right one is used.
A further question: the compiler or linker is replacing somehow the atexit calls with calls to __aeabi_atexit. How this is working.
Many Thanks
Richard
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list