summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2011-08-15 08:23:49 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2011-08-15 08:23:49 +0000
commit1f3585d1cbab8025013bbbff107bb0ed77d22dc7 (patch)
treec5189bf49fb8c56b0cd62ddfee39db0429a04eba
parent2011-08-15 Julien Delange <julien.delange@gmail.com> (diff)
downloadrtems-1f3585d1cbab8025013bbbff107bb0ed77d22dc7.tar.bz2
2011-08-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
* 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.
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/libcsupport/src/newlibc_exit.c4
-rw-r--r--cpukit/score/src/threadhandler.c2
3 files changed, 11 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 529bb3268d..ad5b924916 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,9 @@
+2011-08-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * 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.
+
2011-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1877/cpukit
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
diff --git a/cpukit/score/src/threadhandler.c b/cpukit/score/src/threadhandler.c
index 1b8709893e..b121809e4f 100644
--- a/cpukit/score/src/threadhandler.c
+++ b/cpukit/score/src/threadhandler.c
@@ -37,6 +37,8 @@
#if defined(__USE_INIT_FINI__)
#if defined(__M32R__)
#define INIT_NAME __init
+ #elif defined(__ARM_EABI__)
+ #define INIT_NAME __libc_init_array
#else
#define INIT_NAME _init
#endif