From 35310094a18515e7b0be818abbff262f6718f849 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Fri, 7 Jan 2005 18:01:26 +0000 Subject: [PATCH] 2005-01-07 Paul Brook * arm/crt0.S: Call __libc_{init,fini}_array instead of _init/_fini if they exist. --- libgloss/ChangeLog | 5 +++++ libgloss/arm/crt0.S | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog index a0d6e2df2..e12d02400 100644 --- a/libgloss/ChangeLog +++ b/libgloss/ChangeLog @@ -1,3 +1,8 @@ +2005-01-07 Paul Brook + + * arm/crt0.S: Call __libc_{init,fini}_array instead of + _init/_fini if they exist. + 2004-11-26 Paul Brook * libc/sys/arm/crt0.S (_start): Add .cantunwind annotation. diff --git a/libgloss/arm/crt0.S b/libgloss/arm/crt0.S index b5633368d..33bcc3a4b 100644 --- a/libgloss/arm/crt0.S +++ b/libgloss/arm/crt0.S @@ -1,3 +1,4 @@ +#include "newlib.h" #include "swi.h" /* ANSI concatenation macros. */ @@ -10,6 +11,11 @@ #error __USER_LABEL_PREFIX is not defined #endif +#ifdef HAVE_INITFINI_ARRAY +#define _init __libc_init_array +#define _fini __libc_fini_array +#endif + /* .text is used instead of .section .text so it works with arm-aout too. */ .text .code 32