[patch] ARM EABI support routine
Wed Aug 24 17:27:00 GMT 2005
This actually opens a small can of worms due to the fact that
libc/sys/arm should not exist as it does today. To solve the problem
with board packages, newlib added the configuration setting:
--disable-newlib-supplied-syscalls. At the moment, this removes the
entire sys/arm directory from building so your file won't get built.
The irony is that the file you are adding is actually what belongs in
So, a change is needed in the configuration files in libc/sys/arm to
allow only this one file to build in the case of
There is also the problem with crt0.o. Currently, the configuration
checks to see if sys_dir is defined and if yes, expects crt0.o. This
could easily be changed by adding a new variable to configure.host which
specifies no crt0.o regardless.
-- Jeff J.
Paul Brook wrote:
> The attached patch adds an implementation of __aeabi_atexit.
> This routine is required by the Arm EABI. Its purpose issimilar to
> Currently there are implementations of this function in both glibc and
> libstdc++. I think it makes most sense to put the implementation in libc, and
> remove the libstdc++ version.
> Tested with cross to arm-none-eabi.
> 2005-08-24 Paul Brook <email@example.com>
> * libc/sys/arm/Makefile.am (lib_a_SOURCES): Add aeabi_atexit.c.
> * libc/sys/arm/Makefile.in: Regenerate.
> * libc/sys/arm/aeabi_atexit.c: New file.
> Index: newlib/libc/sys/arm/Makefile.am
> RCS file: /var/cvsroot/src-cvs/src/newlib/libc/sys/arm/Makefile.am,v
> retrieving revision 1.4
> diff -u -p -r1.4 Makefile.am
> --- newlib/libc/sys/arm/Makefile.am 9 Jun 2004 19:05:09 -0000 1.4
> +++ newlib/libc/sys/arm/Makefile.am 24 Aug 2005 13:21:37 -0000
> @@ -12,7 +12,7 @@ else
> extra_objs =
> -lib_a_SOURCES = libcfunc.c trap.S
> +lib_a_SOURCES = libcfunc.c trap.S aeabi_atexit.c
> lib_a_LIBADD = $(extra_objs)
> lib_a_DEPENDENCIES = $(extra_objs)
> Index: newlib/libc/sys/arm/aeabi_atexit.c
> RCS file: newlib/libc/sys/arm/aeabi_atexit.c
> diff -N newlib/libc/sys/arm/aeabi_atexit.c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ newlib/libc/sys/arm/aeabi_atexit.c 24 Aug 2005 14:21:57 -0000
> @@ -0,0 +1,10 @@
> +#include <stdlib.h>
> +/* Register a function to be called by exit or when a shared library
> + is unloaded. This routine is like __cxa_atexit, but uses the
> + calling sequence required by the ARM EABI. */
> +__aeabi_atexit (void *arg, void (*func) (void *), void *d)
> + return __cxa_atexit (func, arg, d);
More information about the Newlib