From 1f3585d1cbab8025013bbbff107bb0ed77d22dc7 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 15 Aug 2011 08:23:49 +0000 Subject: 2011-08-15 Sebastian Huber * libcsupport/src/newlibc_exit.c, score/src/threadhandler.c: Added init/fini array support for ARM EABI. The __libc_init_array() and __libc_fini_array() functions are provided by Newlib. --- cpukit/libcsupport/src/newlibc_exit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpukit/libcsupport') diff --git a/cpukit/libcsupport/src/newlibc_exit.c b/cpukit/libcsupport/src/newlibc_exit.c index 818ba884f4..e88b0c83d3 100644 --- a/cpukit/libcsupport/src/newlibc_exit.c +++ b/cpukit/libcsupport/src/newlibc_exit.c @@ -128,6 +128,8 @@ void libc_wrapup(void) #if defined(__USE_INIT_FINI__) #if defined(__m32r__) #define FINI_SYMBOL __fini + #elif defined(__ARM_EABI__) + #define FINI_SYMBOL __libc_fini_array #else #define FINI_SYMBOL _fini #endif @@ -141,7 +143,7 @@ void EXIT_SYMBOL(int status) * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ - #if defined(__USE_INIT_FINI__) + #if defined(FINI_SYMBOL) FINI_SYMBOL(); #endif -- cgit v1.2.3