2005-01-07 Paul Brook <paul@codesourcery.com>

* configure.in: Add test for .init_array.
        * configure: Regenerate.
        * newlib.hin: Add HAVE_INITFINI_ARRAY.
        * libc/misc/Makefile.am: Add init.c
        * libc/misc/Makefile.in: Regenerate.
        * libc/misc/init.c: New file.
        * libc/sys/arm/crt0.S: Call __libc_{init,fini}_array instead of
        _init/_fini if they exist.
This commit is contained in:
Jeff Johnston
2005-01-07 18:04:39 +00:00
parent 35310094a1
commit f7a74742e6
9 changed files with 147 additions and 4 deletions

View File

@ -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