summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-29 21:02:08 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-29 21:02:08 +0000
commit2607bee41906da4f47d98a92749c11533396838c (patch)
tree0ac6b10026422c6863e63d843305c2ac2f3030f8
parentceb83067f2248eb6f9517440c127250c98bbd8f3 (diff)
Patch by Joseph S. Myers to add support for ARM EABI
-rw-r--r--extra/Configs/Config.arm10
-rw-r--r--libc/misc/assert/__assert.c3
-rw-r--r--libc/misc/locale/locale.c4
-rw-r--r--libc/stdlib/atexit.c2
-rw-r--r--libc/sysdeps/linux/arm/Makefile.arch22
-rw-r--r--libc/sysdeps/linux/arm/__longjmp.S20
-rw-r--r--libc/sysdeps/linux/arm/aeabi_assert.c30
-rw-r--r--libc/sysdeps/linux/arm/aeabi_atexit.c31
-rw-r--r--libc/sysdeps/linux/arm/aeabi_errno_addr.c25
-rw-r--r--libc/sysdeps/linux/arm/aeabi_lcsts.c84
-rw-r--r--libc/sysdeps/linux/arm/aeabi_localeconv.c27
-rw-r--r--libc/sysdeps/linux/arm/aeabi_math.c42
-rw-r--r--libc/sysdeps/linux/arm/aeabi_mb_cur_max.c32
-rw-r--r--libc/sysdeps/linux/arm/aeabi_memclr.c33
-rw-r--r--libc/sysdeps/linux/arm/aeabi_memcpy.c34
-rw-r--r--libc/sysdeps/linux/arm/aeabi_memmove.c34
-rw-r--r--libc/sysdeps/linux/arm/aeabi_memset.c33
-rw-r--r--libc/sysdeps/linux/arm/aeabi_sighandlers.S52
-rw-r--r--libc/sysdeps/linux/arm/aeabi_unwind_cpp_pr1.c43
-rw-r--r--libc/sysdeps/linux/arm/bits/setjmp.h12
-rw-r--r--libc/sysdeps/linux/arm/bits/syscalls.h33
-rw-r--r--libc/sysdeps/linux/arm/clone.S2
-rw-r--r--libc/sysdeps/linux/arm/find_exidx.c80
-rw-r--r--libc/sysdeps/linux/arm/fpu_control.h29
-rw-r--r--libc/sysdeps/linux/arm/mmap64.S34
-rw-r--r--libc/sysdeps/linux/arm/setjmp.S53
-rw-r--r--libc/sysdeps/linux/arm/sigrestorer.S4
-rw-r--r--libc/sysdeps/linux/arm/syscall-eabi.S43
-rw-r--r--libc/sysdeps/linux/arm/vfork.S4
29 files changed, 807 insertions, 48 deletions
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index 83acceb55..86a0aaa29 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -24,6 +24,16 @@ config ARCH_CFLAGS
config LIBGCC_CFLAGS
string
+config CONFIG_ARM_EABI
+ bool "Use ARM EABI"
+ default n
+ help
+ If you choose "Y" here, functions and constants required by the
+ ARM EABI will be built into the library. You should choose "Y"
+ if your compiler uses the ARM EABI, in which case you will also
+ need a kernel supporting the EABI system call interface, or "N"
+ for a compiler using the old Linux ABI.
+
choice
prompt "Target Processor Type"
default CONFIG_GENERIC_ARM
diff --git a/libc/misc/assert/__assert.c b/libc/misc/assert/__assert.c
index 2fd0b3ee4..4282812a5 100644
--- a/libc/misc/assert/__assert.c
+++ b/libc/misc/assert/__assert.c
@@ -42,6 +42,7 @@ libc_hidden_proto(stderr)
#include <assert.h>
#undef assert
+libc_hidden_proto(__assert)
#define ASSERT_SHOW_PROGNAME 1
@@ -68,3 +69,5 @@ void attribute_noreturn __assert(const char *assertion, const char * filename,
}
abort();
}
+
+libc_hidden_def(__assert)
diff --git a/libc/misc/locale/locale.c b/libc/misc/locale/locale.c
index 69cc08bfd..2df4659b5 100644
--- a/libc/misc/locale/locale.c
+++ b/libc/misc/locale/locale.c
@@ -305,6 +305,8 @@ char *setlocale(int category, const char *locale)
* placement of the fields in the struct. If necessary, we could ensure
* this usings an array of offsets but at some size cost. */
+libc_hidden_proto(localeconv)
+
#ifdef __LOCALE_C_ONLY
link_warning(localeconv,"REMINDER: The 'localeconv' function is hardwired for C/POSIX locale only.")
@@ -358,6 +360,8 @@ struct lconv *localeconv(void)
#endif /* __LOCALE_C_ONLY */
+libc_hidden_def(localeconv)
+
#endif
/**********************************************************************/
#if defined(L__locale_init) && !defined(__LOCALE_C_ONLY)
diff --git a/libc/stdlib/atexit.c b/libc/stdlib/atexit.c
index cad25feb1..99f59e293 100644
--- a/libc/stdlib/atexit.c
+++ b/libc/stdlib/atexit.c
@@ -157,6 +157,7 @@ int on_exit(oefuncp func, void *arg)
#endif
#ifdef L___cxa_atexit
+libc_hidden_proto(__cxa_atexit)
extern int __cxa_atexit (cxaefuncp func, void *arg, void *dso_handle)
{
struct exit_function *efp;
@@ -178,6 +179,7 @@ extern int __cxa_atexit (cxaefuncp func, void *arg, void *dso_handle)
return 0;
}
+libc_hidden_def(__cxa_atexit)
#endif
#ifdef L___cxa_finalize
diff --git a/libc/sysdeps/linux/arm/Makefile.arch b/libc/sysdeps/linux/arm/Makefile.arch
index 1ed4b6a6e..eef7a9d1a 100644
--- a/libc/sysdeps/linux/arm/Makefile.arch
+++ b/libc/sysdeps/linux/arm/Makefile.arch
@@ -5,10 +5,30 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c syscall.c ioperm.c iopl.c sigaction.c __syscall_error.c
+CSRC := brk.c ioperm.c iopl.c sigaction.c __syscall_error.c
SSRC := \
__longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \
bsd-_setjmp.S sigrestorer.S mmap64.S
+ifeq ($(CONFIG_ARM_EABI),y)
+CSRC += aeabi_assert.c aeabi_atexit.c aeabi_errno_addr.c \
+ aeabi_localeconv.c aeabi_memclr.c aeabi_memcpy.c \
+ aeabi_memmove.c aeabi_memset.c find_exidx.c
+SSRC += syscall-eabi.S
+ifeq ($(UCLIBC_HAS_WCHAR),y)
+CSRC += aeabi_mb_cur_max.c
+endif
+else
+CSRC += syscall.c
+endif
+
include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch
+
+ifeq ($(CONFIG_ARM_EABI),y)
+libc-static-y += $(ARCH_OUT)/aeabi_lcsts.o $(ARCH_OUT)/aeabi_math.o \
+ $(ARCH_OUT)/aeabi_sighandlers.o
+libc-nonshared-y += $(ARCH_OUT)/aeabi_lcsts.os $(ARCH_OUT)/aeabi_math.os \
+ $(ARCH_OUT)/aeabi_sighandlers.os
+libc-shared-y += $(ARCH_OUT)/aeabi_unwind_cpp_pr1.os
+endif
diff --git a/libc/sysdeps/linux/arm/__longjmp.S b/libc/sysdeps/linux/arm/__longjmp.S
index ee588b2c8..b73474aa2 100644
--- a/libc/sysdeps/linux/arm/__longjmp.S
+++ b/libc/sysdeps/linux/arm/__longjmp.S
@@ -32,8 +32,18 @@ __longjmp:
movs r0, r1 /* get the return value in place */
moveq r0, #1 /* can't let setjmp() return zero! */
+ ldmia ip!, {v1-v6, sl, fp, sp, lr}
+
#if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
-# ifdef __MAVERICK__
+#ifdef __VFP_FP__
+ /* Restore the VFP registers. */
+ /* Following instruction is fldmiax ip!, {d8-d15}. */
+ ldc p11, cr8, [r12], #68
+ /* Restore the floating-point status register. */
+ ldr r1, [ip], #4
+ /* Following instruction is fmxr fpscr, r1. */
+ mcr p10, 7, r1, cr1, cr0, 0
+# elif defined __MAVERICK__
cfldrd mvd4, [ip], #8 ; nop
cfldrd mvd5, [ip], #8 ; nop
cfldrd mvd6, [ip], #8 ; nop
@@ -49,15 +59,9 @@ __longjmp:
# else
lfmfd f4, 4, [ip] ! /* load the floating point regs */
# endif
-#else
-# ifdef __MAVERICK__
- add ip, ip, #96 /* skip the FP registers */
-# else
- add ip, ip, #48 /* skip the FP registers */
-# endif
#endif
- ldmia ip , {v1-v6, sl, fp, sp, pc}
+ mov pc, lr
.size __longjmp,.-__longjmp
libc_hidden_def(__longjmp)
diff --git a/libc/sysdeps/linux/arm/aeabi_assert.c b/libc/sysdeps/linux/arm/aeabi_assert.c
new file mode 100644
index 000000000..e0985b446
--- /dev/null
+++ b/libc/sysdeps/linux/arm/aeabi_assert.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#undef NDEBUG
+#include <assert.h>
+#include <stdlib.h>
+
+libc_hidden_proto(__assert)
+
+void
+__aeabi_assert (const char *assertion, const char *file,
+ unsigned int line)
+{
+ __assert (assertion, file, line, NULL);
+}
diff --git a/libc/sysdeps/linux/arm/aeabi_atexit.c b/libc/sysdeps/linux/arm/aeabi_atexit.c
new file mode 100644
index 000000000..4a7a6f1dc
--- /dev/null
+++ b/libc/sysdeps/linux/arm/aeabi_atexit.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stdlib.h>
+
+extern int __cxa_atexit (void (*func) (void *), void *arg, void *dso_handle);
+libc_hidden_proto(__cxa_atexit)
+
+/* 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. */
+int
+__aeabi_atexit (void *arg, void (*func) (void *), void *d)
+{
+ return __cxa_atexit (func, arg, d);
+}
diff --git a/libc/sysdeps/linux/arm/aeabi_errno_addr.c b/libc/sysdeps/linux/arm/aeabi_errno_addr.c
new file mode 100644
index 000000000..09bdc1efe
--- /dev/null
+++ b/libc/sysdeps/linux/arm/aeabi_errno_addr.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+
+volatile int *
+__aeabi_errno_addr (void)
+{
+ return &errno;
+}
diff --git a/libc/sysdeps/linux/arm/aeabi_lcsts.c b/libc/sysdeps/linux/arm/aeabi_lcsts.c
new file mode 100644
index 000000000..99c79851e
--- /dev/null
+++ b/libc/sysdeps/linux/arm/aeabi_lcsts.c
@@ -0,0 +1,84 @@
+/* Link-time constants for ARM EABI.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* The ARM EABI requires that we provide ISO compile-time constants as
+ link-time constants. Some portable applications may reference these. */
+
+#include <errno.h>
+#include <limits.h>
+#include <locale.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdio.h>
+#include <time.h>
+
+#define eabi_constant2(X,Y) const int __aeabi_##X attribute_hidden = Y
+#define eabi_constant(X) const int __aeabi_##X attribute_hidden = X
+
+eabi_constant (EDOM);
+eabi_constant (ERANGE);
+eabi_constant (EILSEQ);
+
+eabi_constant (MB_LEN_MAX);
+
+eabi_constant (LC_COLLATE);
+eabi_constant (LC_CTYPE);
+eabi_constant (LC_MONETARY);
+eabi_constant (LC_NUMERIC);
+eabi_constant (LC_TIME);
+eabi_constant (LC_ALL);
+
+/* The value of __aeabi_JMP_BUF_SIZE is the number of doublewords in a
+ jmp_buf. */
+eabi_constant2 (JMP_BUF_SIZE, sizeof (jmp_buf) / 8);
+
+eabi_constant (SIGABRT);
+eabi_constant (SIGFPE);
+eabi_constant (SIGILL);
+eabi_constant (SIGINT);
+eabi_constant (SIGSEGV);
+eabi_constant (SIGTERM);
+
+eabi_constant2 (IOFBF, _IOFBF);
+eabi_constant2 (IOLBF, _IOLBF);
+eabi_constant2 (IONBF, _IONBF);
+eabi_constant (BUFSIZ);
+eabi_constant (FOPEN_MAX);
+eabi_constant (TMP_MAX);
+eabi_constant (FILENAME_MAX);
+eabi_constant (L_tmpnam);
+
+eabi_constant (CLOCKS_PER_SEC);
diff --git a/libc/sysdeps/linux/arm/aeabi_localeconv.c b/libc/sysdeps/linux/arm/aeabi_localeconv.c
new file mode 100644
index 000000000..c9e9dd23f
--- /dev/null
+++ b/libc/sysdeps/linux/arm/aeabi_localeconv.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <locale.h>
+
+libc_hidden_proto(localeconv)
+
+struct lconv *
+__aeabi_localeconv (void)
+{
+ return localeconv ();
+}
diff --git a/libc/sysdeps/linux/arm/aeabi_math.c b/libc/sysdeps/linux/arm/aeabi_math.c
new file mode 100644
index 000000000..e7f1dbf5f
--- /dev/null
+++ b/libc/sysdeps/linux/arm/aeabi_math.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <math.h>
+
+const double __aeabi_HUGE_VAL attribute_hidden = HUGE_VAL;
+const long double __aeabi_HUGE_VALL attribute_hidden = HUGE_VALL;
+const float __aeabi_HUGE_VALF attribute_hidden = HUGE_VALF;
+const float __aeabi_INFINITY attribute_hidden = INFINITY;
+const float __aeabi_NAN attribute_hidden = NAN;
diff --git a/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c b/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c
new file mode 100644
index 000000000..55281bfc9
--- /dev/null
+++ b/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <langinfo.h>
+#include <locale.h>
+#include <stdlib.h>
+
+#undef MB_CUR_MAX
+#define MB_CUR_MAX (_stdlib_mb_cur_max ())
+extern size_t _stdlib_mb_cur_max (void) __THROW __wur;
+libc_hidden_proto(_stdlib_mb_cur_max)
+
+int
+__aeabi_MB_CUR_MAX (void)
+{
+ return MB_CUR_MAX;
+}
diff --git a/libc/sysdeps/linux/arm/aeabi_memclr.c b/libc/sysdeps/linux/arm/aeabi_memclr.c
new file mode 100644
index 000000000..6b5ce82cf
--- /dev/null
+++ b/libc/sysdeps/linux/arm/aeabi_memclr.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <string.h>
+
+libc_hidden_proto(bzero)
+
+/* Clear memory. Can't alias to bzero because it's not defined in the
+ same translation unit. */
+void
+__aeabi_memclr (void *dest, size_t n)
+{
+ bzero (dest, n);
+}
+
+/* Versions of the above which may assume memory alignment. */
+strong_alias (__aeabi_memclr, __aeabi_memclr4)
+strong_alias (__aeabi_memclr, __aeabi_memclr8)
diff --git a/libc/sysdeps/linux/arm/aeabi_memcpy.c b/libc/sysdeps/linux/arm/aeabi_memcpy.c
new file mode 100644
index 000000000..18c7a38ea
--- /dev/null
+++ b/libc/sysdeps/linux/arm/aeabi_memcpy.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <string.h>
+
+libc_hidden_proto(memcpy)
+
+/* Copy memory like memcpy, but no return value required. Can't alias
+ to memcpy because it's not defined in the same translation
+ unit. */
+void
+__aeabi_memcpy (void *dest, const void *src, size_t n)
+{
+ memcpy (dest, src, n);
+}
+
+/* Versions of the above which may assume memory alignment. */
+strong_alias (__aeabi_memcpy, __aeabi_memcpy4)
+strong_alias (__aeabi_memcpy, __aeabi_memcpy8)
diff --git a/libc/sysdeps/linux/arm/aeabi_memmove.c b/libc/sysdeps/linux/arm/aeabi_memmove.c
new file mode 100644
index 000000000..70746ece4
--- /dev/null
+++ b/libc/sysdeps/linux/arm/aeabi_memmove.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <string.h>
+
+libc_hidden_proto(memmove)
+
+/* Copy memory like memmove, but no return value required. Can't
+ alias to memmove because it's not defined in the same translation
+ unit. */
+void
+__aeabi_memmove (void *dest, const void *src, size_t n)
+{
+ memmove (dest, src, n);
+}
+
+/* Versions of the above which may assume memory alignment. */
+strong_alias (__aeabi_memmove, __aeabi_memmove4)
+strong_alias (__aeabi_memmove, __aeabi_memmove8)
diff --git a/libc/sysdeps/linux/arm/aeabi_memset.c b/libc/sysdeps/linux/arm/aeabi_memset.c
new file mode 100644
index 000000000..8bf980b8b
--- /dev/null
+++ b/libc/sysdeps/linux/arm/aeabi_memset.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <string.h>
+
+libc_hidden_proto(memset)
+
+/* Set memory like memset, but different argument order and no return
+ value required. */
+void
+__aeabi_memset (void *dest, size_t n, int c)
+{
+ memset (dest, c, n);
+}
+
+/* Versions of the above which may assume memory alignment. */
+strong_alias (__aeabi_memset, __aeabi_memset4)
+strong_alias (__aeabi_memset, __aeabi_memset8)
diff --git a/libc/sysdeps/linux/arm/aeabi_sighandlers.S b/libc/sysdeps/linux/arm/aeabi_sighandlers.S
new file mode 100644
index 000000000..ba9769fd0
--- /dev/null
+++ b/libc/sysdeps/linux/arm/aeabi_sighandlers.S
@@ -0,0 +1,52 @@
+/* Link-time constants for ARM EABI - signal handlers.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* The ARM EABI defines these as "functions". */
+
+ .global __aeabi_SIG_DFL
+ .hidden __aeabi_SIG_DFL
+ .type __aeabi_SIG_DFL, %function
+ .set __aeabi_SIG_DFL, 0
+
+ .global __aeabi_SIG_IGN
+ .hidden __aeabi_SIG_IGN
+ .type __aeabi_SIG_IGN, %function
+ .set __aeabi_SIG_IGN, 1
+
+ .global __aeabi_SIG_ERR
+ .hidden __aeabi_SIG_ERR
+ .type __aeabi_SIG_ERR, %function
+ .set __aeabi_SIG_ERR, -1
diff --git a/libc/sysdeps/linux/arm/aeabi_unwind_cpp_pr1.c b/libc/sysdeps/linux/arm/aeabi_unwind_cpp_pr1.c
new file mode 100644
index 000000000..e657d3836
--- /dev/null
+++ b/libc/sysdeps/linux/arm/aeabi_unwind_cpp_pr1.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Because some objects in ld.so and libc.so are built with
+ -fexceptions, we end up with references to this personality
+ routine. However, these libraries are not linked against
+ libgcc_eh.a, so we need a dummy definition. This routine will
+ never actually be called. */
+
+#include <stdlib.h>
+
+attribute_hidden
+void
+__aeabi_unwind_cpp_pr0 (void)
+{
+}
+
+attribute_hidden
+void
+__aeabi_unwind_cpp_pr1 (void)
+{
+}
+
+attribute_hidden
+void
+__aeabi_unwind_cpp_pr2 (void)
+{
+}
diff --git a/libc/sysdeps/linux/arm/bits/setjmp.h b/libc/sysdeps/linux/arm/bits/setjmp.h
index ad42f96cd..745cdb8f7 100644
--- a/libc/sysdeps/linux/arm/bits/setjmp.h
+++ b/libc/sysdeps/linux/arm/bits/setjmp.h
@@ -27,14 +27,22 @@
#ifndef _ASM
/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
saved. */
-#ifdef __MAVERICK__
+#ifdef __ARM_EABI__
+/* The exact set o