This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Doubts regarding atexit()
- From: "Richard Rauch" <rrauch at itrgmbh dot de>
- To: <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 26 Feb 2015 14:42:42 +0100
- Subject: Doubts regarding atexit()
- Authentication-results: sourceware.org; auth=none
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