public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* Merge sysdeps/arm/eabi into sysdeps/arm
@ 2012-04-21 16:34 Joseph S. Myers
  0 siblings, 0 replies; only message in thread
From: Joseph S. Myers @ 2012-04-21 16:34 UTC (permalink / raw)
  To: libc-ports

Following up on the removal of ARM old-ABI support, I've applied this 
patch to merge sysdeps/arm/eabi into sysdeps/arm.  I verified that symbol 
versions and disassembly of the libraries were identical before and after 
the patch.

diff --git a/ChangeLog.arm b/ChangeLog.arm
index 43a595d..d648927 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,6 +1,115 @@
 2012-04-21  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #13556]
+	* sysdeps/arm/preconfigure: Don't include /eabi in $machine.
+	* sysdeps/arm/Makefile [subdir = elf] (sysdep_routines): Add
+	setting from eabi/Makefile.
+	[subdir = elf] (sysdep-rtld-routines): Likewise.
+	[subdir = elf] (shared-only-routines): Likewise.
+	[subdir = csu] (gen-as-const-headers): Likewise.
+	[subdir = csu] (aeabi_constants): Likewise.
+	[subdir = csu] (aeabi_routines): Likewise.
+	[subdir = csu] (sysdep_routines): Likewise.
+	[subdir = csu] (static-only-routines): Likewise.
+	[subdir = gmon] (sysdep_routines): Likewise.
+	[subdir = debug] (CFLAGS-backtrace.c): Likewise.
+	[subdir = math] ($(objpfx)libm.so): Add dependency from
+	eabi/Makefile.
+	* sysdeps/arm/eabi/Makefile: Remove.
+	* sysdeps/arm/eabi/Versions: Move to ...
+	* sysdeps/arm/Versions: ... here.
+	* sysdeps/arm/eabi/__longjmp.S: Move to ...
+	* sysdeps/arm/__longjmp.S: ... here.
+	* sysdeps/arm/eabi/abi-note.S: Move to ...
+	* sysdeps/arm/abi-note.S: ... here.
+	* sysdeps/arm/eabi/aeabi_assert.c: Move to ...
+	* sysdeps/arm/aeabi_assert.c: ... here.
+	* sysdeps/arm/eabi/aeabi_atexit.c: Move to ...
+	* sysdeps/arm/aeabi_atexit.c: ... here.
+	* sysdeps/arm/eabi/aeabi_errno_addr.c: Move to ...
+	* sysdeps/arm/aeabi_errno_addr.c: ... here.
+	* sysdeps/arm/eabi/aeabi_lcsts.c: Move to ...
+	* sysdeps/arm/aeabi_lcsts.c: ... here.
+	* sysdeps/arm/eabi/aeabi_localeconv.c: Move to ...
+	* sysdeps/arm/aeabi_localeconv.c: ... here.
+	* sysdeps/arm/eabi/aeabi_math.c: Move to ...
+	* sysdeps/arm/aeabi_math.c: ... here.
+	* sysdeps/arm/eabi/aeabi_mb_cur_max.c: Move to ...
+	* sysdeps/arm/aeabi_mb_cur_max.c: ... here.
+	* sysdeps/arm/eabi/aeabi_memclr.c: Move to ...
+	* sysdeps/arm/aeabi_memclr.c: ... here.
+	* sysdeps/arm/eabi/aeabi_memcpy.c: Move to ...
+	* sysdeps/arm/aeabi_memcpy.c: ... here.
+	* sysdeps/arm/eabi/aeabi_memmove.c: Move to ...
+	* sysdeps/arm/aeabi_memmove.c: ... here.
+	* sysdeps/arm/eabi/aeabi_memset.c: Move to ...
+	* sysdeps/arm/aeabi_memset.c: ... here.
+	* sysdeps/arm/eabi/aeabi_sighandlers.S: Move to ...
+	* sysdeps/arm/aeabi_sighandlers.S: ... here.
+	* sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c: Move to ...
+	* sysdeps/arm/aeabi_unwind_cpp_pr1.c: ... here.
+	* sysdeps/arm/eabi/arm-mcount.S: Move to ...
+	* sysdeps/arm/arm-mcount.S: ... here.
+	* sysdeps/arm/eabi/backtrace.c: Move to ...
+	* sysdeps/arm/backtrace.c: ... here.
+	* sysdeps/arm/eabi/fclrexcpt.c: Move to ...
+	* sysdeps/arm/fclrexcpt.c: ... here.
+	* sysdeps/arm/eabi/fedisblxcpt.c: Move to ...
+	* sysdeps/arm/fedisblxcpt.c: ... here.
+	* sysdeps/arm/eabi/feenablxcpt.c: Move to ...
+	* sysdeps/arm/feenablxcpt.c: ... here.
+	* sysdeps/arm/eabi/fegetenv.c: Move to ...
+	* sysdeps/arm/fegetenv.c: ... here.
+	* sysdeps/arm/eabi/fegetexcept.c: Move to ...
+	* sysdeps/arm/fegetexcept.c: ... here.
+	* sysdeps/arm/eabi/fegetround.c: Move to ...
+	* sysdeps/arm/fegetround.c: ... here.
+	* sysdeps/arm/eabi/feholdexcpt.c: Move to ...
+	* sysdeps/arm/feholdexcpt.c: ... here.
+	* sysdeps/arm/eabi/fesetenv.c: Move to ...
+	* sysdeps/arm/fesetenv.c: ... here.
+	* sysdeps/arm/eabi/fesetround.c: Move to ...
+	* sysdeps/arm/fesetround.c: ... here.
+	* sysdeps/arm/eabi/feupdateenv.c: Move to ...
+	* sysdeps/arm/feupdateenv.c: ... here.
+	* sysdeps/arm/eabi/fgetexcptflg.c: Move to ...
+	* sysdeps/arm/fgetexcptflg.c: ... here.
+	* sysdeps/arm/eabi/find_exidx.c: Move to ...
+	* sysdeps/arm/find_exidx.c: ... here.
+	* sysdeps/arm/eabi/fpu_control.h: Move to ...
+	* sysdeps/arm/fpu_control.h: ... here.
+	* sysdeps/arm/eabi/fraiseexcpt.c: Move to ...
+	* sysdeps/arm/fraiseexcpt.c: ... here.
+	* sysdeps/arm/eabi/fsetexcptflg.c: Move to ...
+	* sysdeps/arm/fsetexcptflg.c: ... here.
+	* sysdeps/arm/eabi/ftestexcept.c: Move to ...
+	* sysdeps/arm/ftestexcept.c: ... here.
+	* sysdeps/arm/eabi/jmpbuf-offsets.h: Move to ...
+	* sysdeps/arm/jmpbuf-offsets.h: ... here.
+	* sysdeps/arm/eabi/machine-gmon.h: Move to ...
+	* sysdeps/arm/machine-gmon.h: ... here.
+	* sysdeps/arm/eabi/rtld-global-offsets.sym: Move to ...
+	* sysdeps/arm/rtld-global-offsets.sym: ... here.
+	* sysdeps/arm/eabi/setfpucw.c: Move to ...
+	* sysdeps/arm/setfpucw.c: ... here.
+	* sysdeps/arm/eabi/setjmp.S: Move to ...
+	* sysdeps/arm/setjmp.S: ... here.
+	* sysdeps/arm/eabi/armv6t2/memchr.S: Move to ...
+	* sysdeps/arm/armv6t2/memchr.S: ... here.
+	* sysdeps/arm/eabi/armv7/Implies: Move to ...
+	* sysdeps/arm/armv7/Implies: ... here.  Remove /eabi from implied
+	directory.
+	* sysdeps/arm/eabi/bits/fenv.h: Move to ...
+	* sysdeps/arm/bits/fenv.h: ... here.
+	* sysdeps/arm/eabi/bits/huge_val.h: Move to ...
+	* sysdeps/arm/bits/huge_val.h: ... here.
+	* sysdeps/arm/eabi/bits/setjmp.h: Move to ...
+	* sysdeps/arm/bits/setjmp.h: ... here.
+	* sysdeps/unix/sysv/linux/arm/getcontext.S: Update directory name
+	in comment.
+	* sysdeps/unix/sysv/linux/arm/setcontext.S: Likewise.
+
+	[BZ #13556]
 	* sysdeps/unix/sysv/linux/arm/socket.S: Remove.
 	* sysdeps/unix/sysv/linux/arm/syscalls.list (syscall): Remove.
 	(oldgetrlimit): Likewise.
diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile
index 1a88430..5fd5136 100644
--- a/sysdeps/arm/Makefile
+++ b/sysdeps/arm/Makefile
@@ -1,14 +1,35 @@
 ifeq ($(subdir),elf)
 sysdep-dl-routines += tlsdesc dl-tlsdesc
-sysdep_routines += tlsdesc dl-tlsdesc
-sysdep-rtld-routines += tlsdesc dl-tlsdesc
+sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx tlsdesc dl-tlsdesc
+sysdep-rtld-routines += aeabi_unwind_cpp_pr1 tlsdesc dl-tlsdesc
+shared-only-routines += aeabi_unwind_cpp_pr1
 endif
 
 ifeq ($(subdir),csu)
-gen-as-const-headers += tlsdesc.sym
+# get offset to rtld_global._dl_hwcap
+gen-as-const-headers += rtld-global-offsets.sym tlsdesc.sym
+aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
+aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
+	aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \
+	aeabi_memmove aeabi_memset
+
+sysdep_routines += $(aeabi_constants) $(aeabi_routines)
+static-only-routines += $(aeabi_constants)
 endif
 
 # to pull in __aeabi_read_tp, needed for tls
 ifeq ($(subdir),malloc)
 $(objpfx)libmemusage.so: $(common-objpfx)libc_nonshared.a
 endif
+
+ifeq ($(subdir),gmon)
+sysdep_routines += arm-mcount
+endif
+
+ifeq ($(subdir),debug)
+CFLAGS-backtrace.c += -funwind-tables
+endif
+
+ifeq ($(subdir),math)
+$(objpfx)libm.so: $(elfobjdir)/ld.so
+endif
diff --git a/sysdeps/arm/Versions b/sysdeps/arm/Versions
new file mode 100644
index 0000000..5f2af29
--- /dev/null
+++ b/sysdeps/arm/Versions
@@ -0,0 +1,20 @@
+libc {
+  GLIBC_2.4 {
+    # ARM EABI compatibility routines
+    __aeabi_assert;
+    __aeabi_atexit;
+    __aeabi_errno_addr;
+    __aeabi_localeconv;
+    __aeabi_MB_CUR_MAX;
+    __aeabi_memclr; __aeabi_memclr4; __aeabi_memclr8;
+    __aeabi_memcpy; __aeabi_memcpy4; __aeabi_memcpy8;
+    __aeabi_memmove; __aeabi_memmove4; __aeabi_memmove8;
+    __aeabi_memset; __aeabi_memset4; __aeabi_memset8;
+
+    # Helper routines
+    __gnu_Unwind_Find_exidx;
+  }
+  GLIBC_2.8 {
+    __gnu_mcount_nc;
+  }
+}
diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S
new file mode 100644
index 0000000..cc802c1
--- /dev/null
+++ b/sysdeps/arm/__longjmp.S
@@ -0,0 +1,111 @@
+/* longjmp for ARM.
+   Copyright (C) 1997, 1998, 2005, 2006, 2009, 2010
+     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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+#define _SETJMP_H
+#define _ASM
+#include <bits/setjmp.h>
+#include <rtld-global-offsets.h>
+
+/* __longjmp(jmpbuf, val) */
+
+ENTRY (__longjmp)
+	mov	ip, r0
+	movs	r0, r1		/* get the return value in place */
+	moveq	r0, #1		/* can't let setjmp() return zero! */
+
+#ifdef CHECK_SP
+	ldr	r4, [ip, #32]	/* jmpbuf's sp */
+	cfi_undefined (r4)
+	CHECK_SP (r4)
+#endif
+	LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
+	cfi_restore (v1)
+	cfi_restore (v2)
+	cfi_restore (v3)
+	cfi_restore (v4)
+	cfi_restore (v5)
+	cfi_restore (v6)
+	cfi_restore (sl)
+	cfi_restore (fp)
+	cfi_restore (sp)
+	cfi_restore (lr)
+
+#ifdef IS_IN_rtld
+  	ldr	a2, 1f
+	ldr	a3, Lrtld_local_ro
+0:	add	a2, pc, a2
+	add	a2, a2, a3
+	ldr	a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+#else
+#ifdef PIC
+  	ldr	a2, 1f
+	ldr	a3, Lrtld_global_ro
+0:	add	a2, pc, a2
+	ldr	a2, [a2, a3]
+	ldr	a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+#else
+	ldr	a2, Lhwcap
+	ldr	a2, [a2, #0]
+#endif
+#endif
+
+	tst	a2, #HWCAP_ARM_VFP
+	beq	Lno_vfp
+
+	/* Restore the VFP registers.  */
+	/* Following instruction is vldmia ip!, {d8-d15}.  */
+	ldc	p11, cr8, [r12], #64
+	/* Restore the floating-point status register.  */
+	ldr     a3, [ip], #4
+	/* Following instruction is fmxr fpscr, a3.  */
+	mcr	p10, 7, a3, cr1, cr0, 0
+Lno_vfp:
+
+	tst	a2, #HWCAP_ARM_IWMMXT
+	beq	Lno_iwmmxt
+
+	/* Restore the call-preserved iWMMXt registers.  */
+	/* Following instructions are wldrd wr10, [ip], #8 (etc.)  */
+	ldcl	p1, cr10, [r12], #8
+	ldcl	p1, cr11, [r12], #8
+	ldcl	p1, cr12, [r12], #8
+	ldcl	p1, cr13, [r12], #8
+	ldcl	p1, cr14, [r12], #8
+	ldcl	p1, cr15, [r12], #8
+Lno_iwmmxt:
+
+	DO_RET(lr)
+
+#ifdef IS_IN_rtld
+1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - 8
+Lrtld_local_ro:
+	.long	C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
+#else
+#ifdef PIC
+1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - 8
+Lrtld_global_ro:
+	.long	C_SYMBOL_NAME(_rtld_global_ro)(GOT)
+#else
+Lhwcap:
+	.long	C_SYMBOL_NAME(_dl_hwcap)
+#endif
+#endif
+
+END (__longjmp)
diff --git a/sysdeps/arm/abi-note.S b/sysdeps/arm/abi-note.S
new file mode 100644
index 0000000..1060c3d
--- /dev/null
+++ b/sysdeps/arm/abi-note.S
@@ -0,0 +1,9 @@
+/* Tag_ABI_align8_preserved: This code preserves 8-byte
+   alignment in any callee.  */
+	.eabi_attribute 25, 1
+/* Tag_ABI_align8_needed: This code may require 8-byte alignment from
+   the caller.  */
+	.eabi_attribute 24, 1
+
+#include <csu/abi-note.S>
+
diff --git a/sysdeps/arm/aeabi_assert.c b/sysdeps/arm/aeabi_assert.c
new file mode 100644
index 0000000..c8fb188
--- /dev/null
+++ b/sysdeps/arm/aeabi_assert.c
@@ -0,0 +1,26 @@
+/* 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <assert.h>
+#include <stdlib.h>
+
+void
+__aeabi_assert (const char *assertion, const char *file,
+		unsigned int line)
+{
+  __assert_fail (assertion, file, line, NULL);
+}
diff --git a/sysdeps/arm/aeabi_atexit.c b/sysdeps/arm/aeabi_atexit.c
new file mode 100644
index 0000000..5427fae
--- /dev/null
+++ b/sysdeps/arm/aeabi_atexit.c
@@ -0,0 +1,27 @@
+/* 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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.  */
+int
+__aeabi_atexit (void *arg, void (*func) (void *), void *d)
+{
+  return __cxa_atexit (func, arg, d);
+}
diff --git a/sysdeps/arm/aeabi_errno_addr.c b/sysdeps/arm/aeabi_errno_addr.c
new file mode 100644
index 0000000..b9ee3a5
--- /dev/null
+++ b/sysdeps/arm/aeabi_errno_addr.c
@@ -0,0 +1,24 @@
+/* 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+
+volatile int *
+__aeabi_errno_addr (void)
+{
+  return &errno;
+}
diff --git a/sysdeps/arm/aeabi_lcsts.c b/sysdeps/arm/aeabi_lcsts.c
new file mode 100644
index 0000000..c53800d
--- /dev/null
+++ b/sysdeps/arm/aeabi_lcsts.c
@@ -0,0 +1,98 @@
+/* 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* 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);
+
+FILE *__aeabi_stdin attribute_hidden;
+FILE *__aeabi_stdout attribute_hidden;
+FILE *__aeabi_stderr attribute_hidden;
+
+static void __attribute__ ((used))
+setup_aeabi_stdio (void)
+{
+  __aeabi_stdin = stdin;
+  __aeabi_stdout = stdout;
+  __aeabi_stderr = stderr;
+}
+
+static void (*fp) (void) __attribute__ ((used, section (".preinit_array")))
+  = setup_aeabi_stdio;
+
+eabi_constant (CLOCKS_PER_SEC);
diff --git a/sysdeps/arm/aeabi_localeconv.c b/sysdeps/arm/aeabi_localeconv.c
new file mode 100644
index 0000000..233dc62
--- /dev/null
+++ b/sysdeps/arm/aeabi_localeconv.c
@@ -0,0 +1,24 @@
+/* Copyright (C) 2004, 2005, 2008 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <locale.h>
+
+struct lconv *
+__aeabi_localeconv (void)
+{
+  return __localeconv ();
+}
diff --git a/sysdeps/arm/aeabi_math.c b/sysdeps/arm/aeabi_math.c
new file mode 100644
index 0000000..d7bcd56
--- /dev/null
+++ b/sysdeps/arm/aeabi_math.c
@@ -0,0 +1,41 @@
+/* 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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/sysdeps/arm/aeabi_mb_cur_max.c b/sysdeps/arm/aeabi_mb_cur_max.c
new file mode 100644
index 0000000..3c03a9a
--- /dev/null
+++ b/sysdeps/arm/aeabi_mb_cur_max.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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <langinfo.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <locale/localeinfo.h>
+
+int
+__aeabi_MB_CUR_MAX (void)
+{
+  return MB_CUR_MAX;
+}
diff --git a/sysdeps/arm/aeabi_memclr.c b/sysdeps/arm/aeabi_memclr.c
new file mode 100644
index 0000000..e297452
--- /dev/null
+++ b/sysdeps/arm/aeabi_memclr.c
@@ -0,0 +1,30 @@
+/* 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <string.h>
+
+/* 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/sysdeps/arm/aeabi_memcpy.c b/sysdeps/arm/aeabi_memcpy.c
new file mode 100644
index 0000000..403a7ef
--- /dev/null
+++ b/sysdeps/arm/aeabi_memcpy.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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <string.h>
+
+/* 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/sysdeps/arm/aeabi_memmove.c b/sysdeps/arm/aeabi_memmove.c
new file mode 100644
index 0000000..e824946
--- /dev/null
+++ b/sysdeps/arm/aeabi_memmove.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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <string.h>
+
+/* 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/sysdeps/arm/aeabi_memset.c b/sysdeps/arm/aeabi_memset.c
new file mode 100644
index 0000000..b7775f9
--- /dev/null
+++ b/sysdeps/arm/aeabi_memset.c
@@ -0,0 +1,30 @@
+/* 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <string.h>
+
+/* 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/sysdeps/arm/aeabi_sighandlers.S b/sysdeps/arm/aeabi_sighandlers.S
new file mode 100644
index 0000000..082039e
--- /dev/null
+++ b/sysdeps/arm/aeabi_sighandlers.S
@@ -0,0 +1,53 @@
+/* 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* The ARM EABI defines these as "functions".  */
+
+#include <sysdep.h>
+
+	.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/sysdeps/arm/aeabi_unwind_cpp_pr1.c b/sysdeps/arm/aeabi_unwind_cpp_pr1.c
new file mode 100644
index 0000000..5dbbd9b
--- /dev/null
+++ b/sysdeps/arm/aeabi_unwind_cpp_pr1.c
@@ -0,0 +1,51 @@
+/* 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* 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)
+{
+#ifndef IS_IN_rtld
+  abort ();
+#endif
+}
+
+attribute_hidden
+void
+__aeabi_unwind_cpp_pr1 (void)
+{
+#ifndef IS_IN_rtld
+  abort ();
+#endif
+}
+
+attribute_hidden
+void
+__aeabi_unwind_cpp_pr2 (void)
+{
+#ifndef IS_IN_rtld
+  abort ();
+#endif
+}
diff --git a/sysdeps/arm/arm-mcount.S b/sysdeps/arm/arm-mcount.S
new file mode 100644
index 0000000..5ee66be
--- /dev/null
+++ b/sysdeps/arm/arm-mcount.S
@@ -0,0 +1,108 @@
+/* Implementation of profiling support.  ARM EABI version.
+   Copyright (C) 2008, 2009, 2010 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* Don't call mcount when calling mcount...  */
+#undef PROF
+
+#include <sysdep.h>
+
+
+#ifdef __thumb2__
+	.thumb
+	.syntax unified
+#endif
+
+
+/* Use an assembly stub with a special ABI.  The calling lr has been
+   pushed to the stack (which will be misaligned).  We should preserve
+   all registers except ip and pop a word off the stack.
+
+   NOTE: This assumes mcount_internal does not clobber any non-core
+   (coprocessor) registers.  Currently this is true, but may require
+   additional attention in the future.
+
+   The calling sequence looks something like:
+func:
+   push {lr}
+   bl __gnu_mount_nc
+   <function body>
+*/
+
+ENTRY(__gnu_mcount_nc)
+	push {r0, r1, r2, r3, lr}
+	cfi_adjust_cfa_offset (20)
+	cfi_rel_offset (r0, 0)
+	cfi_rel_offset (r1, 4)
+	cfi_rel_offset (r2, 8)
+	cfi_rel_offset (r3, 12)
+	cfi_rel_offset (lr, 16)
+	bic r1, lr, #1
+	ldr r0, [sp, #20]
+	bl __mcount_internal
+	pop {r0, r1, r2, r3, ip, lr}
+	cfi_adjust_cfa_offset (-24)
+	cfi_restore (r0)
+	cfi_restore (r1)
+	cfi_restore (r2)
+	cfi_restore (r3)
+	cfi_register (lr, ip)
+	bx ip
+END(__gnu_mcount_nc)
+
+
+/* Provide old mcount for backwards compatibility.  This requires
+   code be compiled with APCS frame pointers.  */
+
+ENTRY(_mcount)
+	stmdb sp!, {r0, r1, r2, r3, fp, lr}
+	cfi_adjust_cfa_offset (24)
+	cfi_rel_offset (r0, 0)
+	cfi_rel_offset (r1, 4)
+	cfi_rel_offset (r2, 8)
+	cfi_rel_offset (r3, 12)
+	cfi_rel_offset (fp, 16)
+	cfi_rel_offset (lr, 20)
+#ifdef __thumb2__
+	movs r0, fp
+	ittt ne
+	ldrne r0, [r0, #-4]
+#else
+	movs fp, fp
+	ldrne r0, [fp, #-4]
+#endif
+	movnes r1, lr
+	blne __mcount_internal
+#ifdef __thumb2__
+	ldmia sp!, {r0, r1, r2, r3, fp, pc}
+#else
+	ldmia sp!, {r0, r1, r2, r3, fp, lr}
+	cfi_adjust_cfa_offset (-24)
+	cfi_restore (r0)
+	cfi_restore (r1)
+	cfi_restore (r2)
+	cfi_restore (r3)
+	cfi_restore (fp)
+	cfi_restore (lr)
+	bx lr
+#endif
+END(_mcount)
+
+/* The canonical name for the function is `_mcount' in both C and asm,
+   but some old asm code might assume it's `mcount'.  */
+#undef mcount
+weak_alias (_mcount, mcount)
diff --git a/sysdeps/arm/armv6t2/memchr.S b/sysdeps/arm/armv6t2/memchr.S
new file mode 100644
index 0000000..69ea320
--- /dev/null
+++ b/sysdeps/arm/armv6t2/memchr.S
@@ -0,0 +1,163 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Code contributed by Dave Gilbert <david.gilbert@linaro.org>
+
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+
+@ This memchr routine is optimised on a Cortex-A9 and should work on all ARMv7
+@ and ARMv6T2 processors.  It has a fast path for short sizes, and has an
+@ optimised path for large data sets; the worst case is finding the match early
+@ in a large data set.
+@ Note: The use of cbz/cbnz means it's Thumb only
+
+@ 2011-07-15 david.gilbert@linaro.org
+@    Copy from Cortex strings release 21 and change license
+@ http://bazaar.launchpad.net/~linaro-toolchain-dev/cortex-strings/trunk/view/head:/src/linaro-a9/memchr.S
+@    Change function declarations/entry/exit
+@ 2011-12-01 david.gilbert@linaro.org
+@    Add some fixes from comments received (including use of ldrd instead ldm)
+@ 2011-12-07 david.gilbert@linaro.org
+@    Removed cbz from align loop - can't be taken
+
+@ this lets us check a flag in a 00/ff byte easily in either endianness
+#ifdef __ARMEB__
+#define CHARTSTMASK(c) 1<<(31-(c*8))
+#else
+#define CHARTSTMASK(c) 1<<(c*8)
+#endif
+	.syntax unified
+
+	.text
+	.thumb
+
+@ ---------------------------------------------------------------------------
+	.thumb_func
+	.global memchr
+	.type memchr,%function
+ENTRY(memchr)
+	@ r0 = start of memory to scan
+	@ r1 = character to look for
+	@ r2 = length
+	@ returns r0 = pointer to character or NULL if not found
+	and	r1,r1,#0xff	@ Don't think we can trust the caller to actually pass a char
+
+	cmp	r2,#16		@ If it's short don't bother with anything clever
+	blt	20f
+
+	tst	r0, #7		@ If it's already aligned skip the next bit
+	beq	10f
+
+	@ Work up to an aligned point
+5:
+	ldrb	r3, [r0],#1
+	subs	r2, r2, #1
+	cmp	r3, r1
+	beq	50f		@ If it matches exit found
+	tst	r0, #7
+	bne	5b		@ If not aligned yet then do next byte
+
+10:
+	@ At this point, we are aligned, we know we have at least 8 bytes to work with
+	push	{r4,r5,r6,r7}
+	cfi_adjust_cfa_offset (16)
+	cfi_rel_offset (r4, 0)
+	cfi_rel_offset (r5, 4)
+	cfi_rel_offset (r6, 8)
+	cfi_rel_offset (r7, 12)
+
+	cfi_remember_state
+
+	orr	r1, r1, r1, lsl #8	@ expand the match word across to all bytes
+	orr	r1, r1, r1, lsl #16
+	bic	r4, r2, #7	@ Number of double words to work with * 8
+	mvns	r7, #0		@ all F's
+	movs	r3, #0
+
+15:
+	ldrd 	r5,r6, [r0],#8
+	subs	r4, r4, #8
+	eor	r5,r5, r1	@ Get it so that r5,r6 have 00's where the bytes match the target
+	eor	r6,r6, r1
+	uadd8	r5, r5, r7	@ Parallel add 0xff - sets the GE bits for anything that wasn't 0
+	sel	r5, r3, r7	@ bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION
+	uadd8	r6, r6, r7	@ Parallel add 0xff - sets the GE bits for anything that wasn't 0
+	sel	r6, r5, r7	@ chained....bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION
+	cbnz	r6, 60f
+	bne	15b		@ (Flags from the subs above) If not run out of bytes then go around again
+
+	pop	{r4,r5,r6,r7}
+	cfi_adjust_cfa_offset (-16)
+	cfi_restore (r4)
+	cfi_restore (r5)
+	cfi_restore (r6)
+	cfi_restore (r7)
+
+	and	r1,r1,#0xff	@ Get r1 back to a single character from the expansion above
+	and	r2,r2,#7	@ Leave the count remaining as the number after the double words have been done
+
+20:
+	cbz	r2, 40f		@ 0 length or hit the end already then not found
+
+21:  @ Post aligned section, or just a short call
+	ldrb	r3,[r0],#1
+	subs	r2,r2,#1
+	eor	r3,r3,r1	@ r3 = 0 if match - doesn't break flags from sub
+	cbz	r3, 50f
+	bne	21b		@ on r2 flags
+
+40:
+	movs	r0,#0		@ not found
+	DO_RET(lr)
+
+50:
+	subs	r0,r0,#1	@ found
+	DO_RET(lr)
+
+60:  @ We're here because the fast path found a hit - now we have to track down exactly which word it was
+     @ r0 points to the start of the double word after the one that was tested
+     @ r5 has the 00/ff pattern for the first word, r6 has the chained value
+	cfi_restore_state
+	cmp	r5, #0
+	itte	eq
+	moveq	r5, r6		@ the end is in the 2nd word
+	subeq	r0,r0,#3	@ Points to 2nd byte of 2nd word
+	subne	r0,r0,#7	@ or 2nd byte of 1st word
+
+	@ r0 currently points to the 2nd byte of the word containing the hit
+	tst	r5, # CHARTSTMASK(0)	@ 1st character
+	bne	61f
+	adds	r0,r0,#1
+	tst	r5, # CHARTSTMASK(1)	@ 2nd character
+	ittt	eq
+	addeq	r0,r0,#1
+	tsteq	r5, # (3<<15)		@ 2nd & 3rd character
+	@ If not the 3rd must be the last one
+	addeq	r0,r0,#1
+
+61:
+	pop	{r4,r5,r6,r7}
+	cfi_adjust_cfa_offset (-16)
+	cfi_restore (r4)
+	cfi_restore (r5)
+	cfi_restore (r6)
+	cfi_restore (r7)
+
+	subs	r0,r0,#1
+	DO_RET(lr)
+
+END(memchr)
+libc_hidden_builtin_def (memchr)
diff --git a/sysdeps/arm/armv7/Implies b/sysdeps/arm/armv7/Implies
new file mode 100644
index 0000000..c6cd0eb
--- /dev/null
+++ b/sysdeps/arm/armv7/Implies
@@ -0,0 +1,2 @@
+# We can do everything that 6T2 can
+arm/armv6t2
diff --git a/sysdeps/arm/backtrace.c b/sysdeps/arm/backtrace.c
new file mode 100644
index 0000000..3d839e6
--- /dev/null
+++ b/sysdeps/arm/backtrace.c
@@ -0,0 +1,125 @@
+/* Return backtrace of current program state.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Kazu Hirata <kazu@codesourcery.com>, 2008.
+
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <bits/libc-lock.h>
+#include <dlfcn.h>
+#include <execinfo.h>
+#include <stdlib.h>
+#include <unwind.h>
+
+struct trace_arg
+{
+  void **array;
+  int cnt, size;
+};
+
+#ifdef SHARED
+static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *);
+static _Unwind_VRS_Result (*unwind_vrs_get) (_Unwind_Context *,
+					     _Unwind_VRS_RegClass,
+					     _uw,
+					     _Unwind_VRS_DataRepresentation,
+					     void *);
+
+static void *libgcc_handle;
+
+static void
+init (void)
+{
+  libgcc_handle = __libc_dlopen ("libgcc_s.so.1");
+
+  if (libgcc_handle == NULL)
+    return;
+
+  unwind_backtrace = __libc_dlsym (libgcc_handle, "_Unwind_Backtrace");
+  unwind_vrs_get = __libc_dlsym (libgcc_handle, "_Unwind_VRS_Get");
+  if (unwind_vrs_get == NULL)
+    unwind_backtrace = NULL;
+}
+
+/* This function is identical to "_Unwind_GetGR", except that it uses
+   "unwind_vrs_get" instead of "_Unwind_VRS_Get".  */
+static inline _Unwind_Word
+unwind_getgr (_Unwind_Context *context, int regno)
+{
+  _uw val;
+  unwind_vrs_get (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val);
+  return val;
+}
+
+/* This macro is identical to the _Unwind_GetIP macro, except that it
+   uses "unwind_getgr" instead of "_Unwind_GetGR".  */
+# define unwind_getip(context) \
+  (unwind_getgr (context, 15) & ~(_Unwind_Word)1)
+#else
+# define unwind_backtrace _Unwind_Backtrace
+# define unwind_getip _Unwind_GetIP
+#endif
+
+static _Unwind_Reason_Code
+backtrace_helper (struct _Unwind_Context *ctx, void *a)
+{
+  struct trace_arg *arg = a;
+
+  /* We are first called with address in the __backtrace function.
+     Skip it.  */
+  if (arg->cnt != -1)
+    arg->array[arg->cnt] = (void *) unwind_getip (ctx);
+  if (++arg->cnt == arg->size)
+    return _URC_END_OF_STACK;
+  return _URC_NO_REASON;
+}
+
+int
+__backtrace (array, size)
+     void **array;
+     int size;
+{
+  struct trace_arg arg = { .array = array, .size = size, .cnt = -1 };
+#ifdef SHARED
+  __libc_once_define (static, once);
+
+  __libc_once (once, init);
+  if (unwind_backtrace == NULL)
+    return 0;
+#endif
+
+  if (size >= 1)
+    unwind_backtrace (backtrace_helper, &arg);
+
+  if (arg.cnt > 1 && arg.array[arg.cnt - 1] == NULL)
+    --arg.cnt;
+  return arg.cnt != -1 ? arg.cnt : 0;
+}
+weak_alias (__backtrace, backtrace)
+libc_hidden_def (__backtrace)
+
+
+#ifdef SHARED
+/* Free all resources if necessary.  */
+libc_freeres_fn (free_mem)
+{
+  unwind_backtrace = NULL;
+  if (libgcc_handle != NULL)
+    {
+      __libc_dlclose (libgcc_handle);
+      libgcc_handle = NULL;
+    }
+}
+#endif
diff --git a/sysdeps/arm/bits/fenv.h b/sysdeps/arm/bits/fenv.h
new file mode 100644
index 0000000..006ccf5
--- /dev/null
+++ b/sysdeps/arm/bits/fenv.h
@@ -0,0 +1,73 @@
+/* Copyright (C) 2004, 2005, 2012 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+/* Define bits representing exceptions in the FPU status word.  */
+enum
+  {
+    FE_INVALID = 1,
+#define FE_INVALID FE_INVALID
+    FE_DIVBYZERO = 2,
+#define FE_DIVBYZERO FE_DIVBYZERO
+    FE_OVERFLOW = 4,
+#define FE_OVERFLOW FE_OVERFLOW
+    FE_UNDERFLOW = 8,
+#define FE_UNDERFLOW FE_UNDERFLOW
+    FE_INEXACT = 16,
+#define FE_INEXACT FE_INEXACT
+  };
+
+/* Amount to shift by to convert an exception to a mask bit.  */
+#define FE_EXCEPT_SHIFT	8
+
+/* All supported exceptions.  */
+#define FE_ALL_EXCEPT	\
+	(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
+
+/* VFP supports all of the four defined rounding modes.  */
+enum
+  {
+    FE_TONEAREST = 0,
+#define FE_TONEAREST FE_TONEAREST
+    FE_UPWARD = 0x400000,
+#define FE_UPWARD FE_UPWARD
+    FE_DOWNWARD = 0x800000,
+#define FE_DOWNWARD FE_DOWNWARD
+    FE_TOWARDZERO = 0xc00000
+#define FE_TOWARDZERO FE_TOWARDZERO
+  };
+
+/* Type representing exception flags. */
+typedef unsigned int fexcept_t;
+
+/* Type representing floating-point environment.  */
+typedef struct
+  {
+    unsigned int __cw;
+  }
+fenv_t;
+
+/* If the default argument is used we use this value.  */
+#define FE_DFL_ENV	((fenv_t *) -1l)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exceptions are masked.  */
+# define FE_NOMASK_ENV  ((const fenv_t *) -2)
+#endif
diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h
new file mode 100644
index 0000000..6008b10
--- /dev/null
+++ b/sysdeps/arm/bits/huge_val.h
@@ -0,0 +1,54 @@
+/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity).
+   Used by <stdlib.h> and <math.h> functions for overflow.
+   Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _MATH_H
+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+#endif
+
+/* IEEE positive infinity (-HUGE_VAL is negative infinity).  */
+
+#if __GNUC_PREREQ(3,3)
+# define HUGE_VAL	(__builtin_huge_val())
+#elif __GNUC_PREREQ(2,96)
+# define HUGE_VAL	(__extension__ 0x1.0p2047)
+#elif defined __GNUC__
+
+# define HUGE_VAL \
+  (__extension__							      \
+   ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; })   \
+    { __l: 0x7ff0000000000000ULL }).__d)
+
+#else /* not GCC */
+
+# include <endian.h>
+
+typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
+
+# if __BYTE_ORDER == __BIG_ENDIAN
+#  define __HUGE_VAL_bytes	{ 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
+# endif
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+#  define __HUGE_VAL_bytes	{ 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
+# endif
+
+static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
+# define HUGE_VAL	(__huge_val.__d)
+
+#endif	/* GCC.  */
diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h
new file mode 100644
index 0000000..bdc41ce
--- /dev/null
+++ b/sysdeps/arm/bits/setjmp.h
@@ -0,0 +1,37 @@
+/* Copyright (C) 2004, 2005, 2006, 2009 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* Define the machine-dependent type `jmp_buf'.  ARM EABI version.  */
+
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+#ifndef _ASM
+/* The exact set of registers saved may depend on the particular core
+   in use, as some coprocessor registers may need to be saved.  The C
+   Library ABI requires that the buffer be 8-byte aligned, and
+   recommends that the buffer contain 64 words.  The first 28 words
+   are occupied by v1-v6, sl, fp, sp, pc, d8-d15, and fpscr.  (Note
+   that d8-15 require 17 words, due to the use of fstmx.)  */
+typedef int __jmp_buf[64] __attribute__((__aligned__ (8)));
+#endif
+
+#endif
diff --git a/sysdeps/arm/eabi/Makefile b/sysdeps/arm/eabi/Makefile
deleted file mode 100644
index 025465a..0000000
--- a/sysdeps/arm/eabi/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-ifeq ($(subdir),csu)
-aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
-aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
-	aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \
-	aeabi_memmove aeabi_memset
-
-sysdep_routines += $(aeabi_constants) $(aeabi_routines)
-static-only-routines += $(aeabi_constants)
-
-# get offset to rtld_global._dl_hwcap
-gen-as-const-headers += rtld-global-offsets.sym
-endif
-
-ifeq ($(subdir),gmon)
-sysdep_routines += arm-mcount
-endif
-
-ifeq ($(subdir),debug)
-CFLAGS-backtrace.c += -funwind-tables
-endif
-
-ifeq ($(subdir),elf)
-sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx
-shared-only-routines += aeabi_unwind_cpp_pr1
-sysdep-rtld-routines += aeabi_unwind_cpp_pr1
-endif
-
-ifeq ($(subdir),math)
-$(objpfx)libm.so: $(elfobjdir)/ld.so
-endif
diff --git a/sysdeps/arm/eabi/Versions b/sysdeps/arm/eabi/Versions
deleted file mode 100644
index 5f2af29..0000000
--- a/sysdeps/arm/eabi/Versions
+++ /dev/null
@@ -1,20 +0,0 @@
-libc {
-  GLIBC_2.4 {
-    # ARM EABI compatibility routines
-    __aeabi_assert;
-    __aeabi_atexit;
-    __aeabi_errno_addr;
-    __aeabi_localeconv;
-    __aeabi_MB_CUR_MAX;
-    __aeabi_memclr; __aeabi_memclr4; __aeabi_memclr8;
-    __aeabi_memcpy; __aeabi_memcpy4; __aeabi_memcpy8;
-    __aeabi_memmove; __aeabi_memmove4; __aeabi_memmove8;
-    __aeabi_memset; __aeabi_memset4; __aeabi_memset8;
-
-    # Helper routines
-    __gnu_Unwind_Find_exidx;
-  }
-  GLIBC_2.8 {
-    __gnu_mcount_nc;
-  }
-}
diff --git a/sysdeps/arm/eabi/__longjmp.S b/sysdeps/arm/eabi/__longjmp.S
deleted file mode 100644
index cc802c1..0000000
--- a/sysdeps/arm/eabi/__longjmp.S
+++ /dev/null
@@ -1,111 +0,0 @@
-/* longjmp for ARM.
-   Copyright (C) 1997, 1998, 2005, 2006, 2009, 2010
-     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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-#include <rtld-global-offsets.h>
-
-/* __longjmp(jmpbuf, val) */
-
-ENTRY (__longjmp)
-	mov	ip, r0
-	movs	r0, r1		/* get the return value in place */
-	moveq	r0, #1		/* can't let setjmp() return zero! */
-
-#ifdef CHECK_SP
-	ldr	r4, [ip, #32]	/* jmpbuf's sp */
-	cfi_undefined (r4)
-	CHECK_SP (r4)
-#endif
-	LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
-	cfi_restore (v1)
-	cfi_restore (v2)
-	cfi_restore (v3)
-	cfi_restore (v4)
-	cfi_restore (v5)
-	cfi_restore (v6)
-	cfi_restore (sl)
-	cfi_restore (fp)
-	cfi_restore (sp)
-	cfi_restore (lr)
-
-#ifdef IS_IN_rtld
-  	ldr	a2, 1f
-	ldr	a3, Lrtld_local_ro
-0:	add	a2, pc, a2
-	add	a2, a2, a3
-	ldr	a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
-#ifdef PIC
-  	ldr	a2, 1f
-	ldr	a3, Lrtld_global_ro
-0:	add	a2, pc, a2
-	ldr	a2, [a2, a3]
-	ldr	a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
-	ldr	a2, Lhwcap
-	ldr	a2, [a2, #0]
-#endif
-#endif
-
-	tst	a2, #HWCAP_ARM_VFP
-	beq	Lno_vfp
-
-	/* Restore the VFP registers.  */
-	/* Following instruction is vldmia ip!, {d8-d15}.  */
-	ldc	p11, cr8, [r12], #64
-	/* Restore the floating-point status register.  */
-	ldr     a3, [ip], #4
-	/* Following instruction is fmxr fpscr, a3.  */
-	mcr	p10, 7, a3, cr1, cr0, 0
-Lno_vfp:
-
-	tst	a2, #HWCAP_ARM_IWMMXT
-	beq	Lno_iwmmxt
-
-	/* Restore the call-preserved iWMMXt registers.  */
-	/* Following instructions are wldrd wr10, [ip], #8 (etc.)  */
-	ldcl	p1, cr10, [r12], #8
-	ldcl	p1, cr11, [r12], #8
-	ldcl	p1, cr12, [r12], #8
-	ldcl	p1, cr13, [r12], #8
-	ldcl	p1, cr14, [r12], #8
-	ldcl	p1, cr15, [r12], #8
-Lno_iwmmxt:
-
-	DO_RET(lr)
-
-#ifdef IS_IN_rtld
-1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_local_ro:
-	.long	C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
-#else
-#ifdef PIC
-1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_global_ro:
-	.long	C_SYMBOL_NAME(_rtld_global_ro)(GOT)
-#else
-Lhwcap:
-	.long	C_SYMBOL_NAME(_dl_hwcap)
-#endif
-#endif
-
-END (__longjmp)
diff --git a/sysdeps/arm/eabi/abi-note.S b/sysdeps/arm/eabi/abi-note.S
deleted file mode 100644
index 1060c3d..0000000
--- a/sysdeps/arm/eabi/abi-note.S
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Tag_ABI_align8_preserved: This code preserves 8-byte
-   alignment in any callee.  */
-	.eabi_attribute 25, 1
-/* Tag_ABI_align8_needed: This code may require 8-byte alignment from
-   the caller.  */
-	.eabi_attribute 24, 1
-
-#include <csu/abi-note.S>
-
diff --git a/sysdeps/arm/eabi/aeabi_assert.c b/sysdeps/arm/eabi/aeabi_assert.c
deleted file mode 100644
index c8fb188..0000000
--- a/sysdeps/arm/eabi/aeabi_assert.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <assert.h>
-#include <stdlib.h>
-
-void
-__aeabi_assert (const char *assertion, const char *file,
-		unsigned int line)
-{
-  __assert_fail (assertion, file, line, NULL);
-}
diff --git a/sysdeps/arm/eabi/aeabi_atexit.c b/sysdeps/arm/eabi/aeabi_atexit.c
deleted file mode 100644
index 5427fae..0000000
--- a/sysdeps/arm/eabi/aeabi_atexit.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#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.  */
-int
-__aeabi_atexit (void *arg, void (*func) (void *), void *d)
-{
-  return __cxa_atexit (func, arg, d);
-}
diff --git a/sysdeps/arm/eabi/aeabi_errno_addr.c b/sysdeps/arm/eabi/aeabi_errno_addr.c
deleted file mode 100644
index b9ee3a5..0000000
--- a/sysdeps/arm/eabi/aeabi_errno_addr.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <errno.h>
-
-volatile int *
-__aeabi_errno_addr (void)
-{
-  return &errno;
-}
diff --git a/sysdeps/arm/eabi/aeabi_lcsts.c b/sysdeps/arm/eabi/aeabi_lcsts.c
deleted file mode 100644
index c53800d..0000000
--- a/sysdeps/arm/eabi/aeabi_lcsts.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/* 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* 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);
-
-FILE *__aeabi_stdin attribute_hidden;
-FILE *__aeabi_stdout attribute_hidden;
-FILE *__aeabi_stderr attribute_hidden;
-
-static void __attribute__ ((used))
-setup_aeabi_stdio (void)
-{
-  __aeabi_stdin = stdin;
-  __aeabi_stdout = stdout;
-  __aeabi_stderr = stderr;
-}
-
-static void (*fp) (void) __attribute__ ((used, section (".preinit_array")))
-  = setup_aeabi_stdio;
-
-eabi_constant (CLOCKS_PER_SEC);
diff --git a/sysdeps/arm/eabi/aeabi_localeconv.c b/sysdeps/arm/eabi/aeabi_localeconv.c
deleted file mode 100644
index 233dc62..0000000
--- a/sysdeps/arm/eabi/aeabi_localeconv.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (C) 2004, 2005, 2008 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <locale.h>
-
-struct lconv *
-__aeabi_localeconv (void)
-{
-  return __localeconv ();
-}
diff --git a/sysdeps/arm/eabi/aeabi_math.c b/sysdeps/arm/eabi/aeabi_math.c
deleted file mode 100644
index d7bcd56..0000000
--- a/sysdeps/arm/eabi/aeabi_math.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#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/sysdeps/arm/eabi/aeabi_mb_cur_max.c b/sysdeps/arm/eabi/aeabi_mb_cur_max.c
deleted file mode 100644
index 3c03a9a..0000000
--- a/sysdeps/arm/eabi/aeabi_mb_cur_max.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <langinfo.h>
-#include <locale.h>
-#include <stdlib.h>
-#include <locale/localeinfo.h>
-
-int
-__aeabi_MB_CUR_MAX (void)
-{
-  return MB_CUR_MAX;
-}
diff --git a/sysdeps/arm/eabi/aeabi_memclr.c b/sysdeps/arm/eabi/aeabi_memclr.c
deleted file mode 100644
index e297452..0000000
--- a/sysdeps/arm/eabi/aeabi_memclr.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <string.h>
-
-/* 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/sysdeps/arm/eabi/aeabi_memcpy.c b/sysdeps/arm/eabi/aeabi_memcpy.c
deleted file mode 100644
index 403a7ef..0000000
--- a/sysdeps/arm/eabi/aeabi_memcpy.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <string.h>
-
-/* 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/sysdeps/arm/eabi/aeabi_memmove.c b/sysdeps/arm/eabi/aeabi_memmove.c
deleted file mode 100644
index e824946..0000000
--- a/sysdeps/arm/eabi/aeabi_memmove.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <string.h>
-
-/* 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/sysdeps/arm/eabi/aeabi_memset.c b/sysdeps/arm/eabi/aeabi_memset.c
deleted file mode 100644
index b7775f9..0000000
--- a/sysdeps/arm/eabi/aeabi_memset.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <string.h>
-
-/* 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/sysdeps/arm/eabi/aeabi_sighandlers.S b/sysdeps/arm/eabi/aeabi_sighandlers.S
deleted file mode 100644
index 082039e..0000000
--- a/sysdeps/arm/eabi/aeabi_sighandlers.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/* 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* The ARM EABI defines these as "functions".  */
-
-#include <sysdep.h>
-
-	.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/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c b/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c
deleted file mode 100644
index 5dbbd9b..0000000
--- a/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* 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)
-{
-#ifndef IS_IN_rtld
-  abort ();
-#endif
-}
-
-attribute_hidden
-void
-__aeabi_unwind_cpp_pr1 (void)
-{
-#ifndef IS_IN_rtld
-  abort ();
-#endif
-}
-
-attribute_hidden
-void
-__aeabi_unwind_cpp_pr2 (void)
-{
-#ifndef IS_IN_rtld
-  abort ();
-#endif
-}
diff --git a/sysdeps/arm/eabi/arm-mcount.S b/sysdeps/arm/eabi/arm-mcount.S
deleted file mode 100644
index 5ee66be..0000000
--- a/sysdeps/arm/eabi/arm-mcount.S
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Implementation of profiling support.  ARM EABI version.
-   Copyright (C) 2008, 2009, 2010 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* Don't call mcount when calling mcount...  */
-#undef PROF
-
-#include <sysdep.h>
-
-
-#ifdef __thumb2__
-	.thumb
-	.syntax unified
-#endif
-
-
-/* Use an assembly stub with a special ABI.  The calling lr has been
-   pushed to the stack (which will be misaligned).  We should preserve
-   all registers except ip and pop a word off the stack.
-
-   NOTE: This assumes mcount_internal does not clobber any non-core
-   (coprocessor) registers.  Currently this is true, but may require
-   additional attention in the future.
-
-   The calling sequence looks something like:
-func:
-   push {lr}
-   bl __gnu_mount_nc
-   <function body>
-*/
-
-ENTRY(__gnu_mcount_nc)
-	push {r0, r1, r2, r3, lr}
-	cfi_adjust_cfa_offset (20)
-	cfi_rel_offset (r0, 0)
-	cfi_rel_offset (r1, 4)
-	cfi_rel_offset (r2, 8)
-	cfi_rel_offset (r3, 12)
-	cfi_rel_offset (lr, 16)
-	bic r1, lr, #1
-	ldr r0, [sp, #20]
-	bl __mcount_internal
-	pop {r0, r1, r2, r3, ip, lr}
-	cfi_adjust_cfa_offset (-24)
-	cfi_restore (r0)
-	cfi_restore (r1)
-	cfi_restore (r2)
-	cfi_restore (r3)
-	cfi_register (lr, ip)
-	bx ip
-END(__gnu_mcount_nc)
-
-
-/* Provide old mcount for backwards compatibility.  This requires
-   code be compiled with APCS frame pointers.  */
-
-ENTRY(_mcount)
-	stmdb sp!, {r0, r1, r2, r3, fp, lr}
-	cfi_adjust_cfa_offset (24)
-	cfi_rel_offset (r0, 0)
-	cfi_rel_offset (r1, 4)
-	cfi_rel_offset (r2, 8)
-	cfi_rel_offset (r3, 12)
-	cfi_rel_offset (fp, 16)
-	cfi_rel_offset (lr, 20)
-#ifdef __thumb2__
-	movs r0, fp
-	ittt ne
-	ldrne r0, [r0, #-4]
-#else
-	movs fp, fp
-	ldrne r0, [fp, #-4]
-#endif
-	movnes r1, lr
-	blne __mcount_internal
-#ifdef __thumb2__
-	ldmia sp!, {r0, r1, r2, r3, fp, pc}
-#else
-	ldmia sp!, {r0, r1, r2, r3, fp, lr}
-	cfi_adjust_cfa_offset (-24)
-	cfi_restore (r0)
-	cfi_restore (r1)
-	cfi_restore (r2)
-	cfi_restore (r3)
-	cfi_restore (fp)
-	cfi_restore (lr)
-	bx lr
-#endif
-END(_mcount)
-
-/* The canonical name for the function is `_mcount' in both C and asm,
-   but some old asm code might assume it's `mcount'.  */
-#undef mcount
-weak_alias (_mcount, mcount)
diff --git a/sysdeps/arm/eabi/armv6t2/memchr.S b/sysdeps/arm/eabi/armv6t2/memchr.S
deleted file mode 100644
index 69ea320..0000000
--- a/sysdeps/arm/eabi/armv6t2/memchr.S
+++ /dev/null
@@ -1,163 +0,0 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Code contributed by Dave Gilbert <david.gilbert@linaro.org>
-
-   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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-
-@ This memchr routine is optimised on a Cortex-A9 and should work on all ARMv7
-@ and ARMv6T2 processors.  It has a fast path for short sizes, and has an
-@ optimised path for large data sets; the worst case is finding the match early
-@ in a large data set.
-@ Note: The use of cbz/cbnz means it's Thumb only
-
-@ 2011-07-15 david.gilbert@linaro.org
-@    Copy from Cortex strings release 21 and change license
-@ http://bazaar.launchpad.net/~linaro-toolchain-dev/cortex-strings/trunk/view/head:/src/linaro-a9/memchr.S
-@    Change function declarations/entry/exit
-@ 2011-12-01 david.gilbert@linaro.org
-@    Add some fixes from comments received (including use of ldrd instead ldm)
-@ 2011-12-07 david.gilbert@linaro.org
-@    Removed cbz from align loop - can't be taken
-
-@ this lets us check a flag in a 00/ff byte easily in either endianness
-#ifdef __ARMEB__
-#define CHARTSTMASK(c) 1<<(31-(c*8))
-#else
-#define CHARTSTMASK(c) 1<<(c*8)
-#endif
-	.syntax unified
-
-	.text
-	.thumb
-
-@ ---------------------------------------------------------------------------
-	.thumb_func
-	.global memchr
-	.type memchr,%function
-ENTRY(memchr)
-	@ r0 = start of memory to scan
-	@ r1 = character to look for
-	@ r2 = length
-	@ returns r0 = pointer to character or NULL if not found
-	and	r1,r1,#0xff	@ Don't think we can trust the caller to actually pass a char
-
-	cmp	r2,#16		@ If it's short don't bother with anything clever
-	blt	20f
-
-	tst	r0, #7		@ If it's already aligned skip the next bit
-	beq	10f
-
-	@ Work up to an aligned point
-5:
-	ldrb	r3, [r0],#1
-	subs	r2, r2, #1
-	cmp	r3, r1
-	beq	50f		@ If it matches exit found
-	tst	r0, #7
-	bne	5b		@ If not aligned yet then do next byte
-
-10:
-	@ At this point, we are aligned, we know we have at least 8 bytes to work with
-	push	{r4,r5,r6,r7}
-	cfi_adjust_cfa_offset (16)
-	cfi_rel_offset (r4, 0)
-	cfi_rel_offset (r5, 4)
-	cfi_rel_offset (r6, 8)
-	cfi_rel_offset (r7, 12)
-
-	cfi_remember_state
-
-	orr	r1, r1, r1, lsl #8	@ expand the match word across to all bytes
-	orr	r1, r1, r1, lsl #16
-	bic	r4, r2, #7	@ Number of double words to work with * 8
-	mvns	r7, #0		@ all F's
-	movs	r3, #0
-
-15:
-	ldrd 	r5,r6, [r0],#8
-	subs	r4, r4, #8
-	eor	r5,r5, r1	@ Get it so that r5,r6 have 00's where the bytes match the target
-	eor	r6,r6, r1
-	uadd8	r5, r5, r7	@ Parallel add 0xff - sets the GE bits for anything that wasn't 0
-	sel	r5, r3, r7	@ bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION
-	uadd8	r6, r6, r7	@ Parallel add 0xff - sets the GE bits for anything that wasn't 0
-	sel	r6, r5, r7	@ chained....bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION
-	cbnz	r6, 60f
-	bne	15b		@ (Flags from the subs above) If not run out of bytes then go around again
-
-	pop	{r4,r5,r6,r7}
-	cfi_adjust_cfa_offset (-16)
-	cfi_restore (r4)
-	cfi_restore (r5)
-	cfi_restore (r6)
-	cfi_restore (r7)
-
-	and	r1,r1,#0xff	@ Get r1 back to a single character from the expansion above
-	and	r2,r2,#7	@ Leave the count remaining as the number after the double words have been done
-
-20:
-	cbz	r2, 40f		@ 0 length or hit the end already then not found
-
-21:  @ Post aligned section, or just a short call
-	ldrb	r3,[r0],#1
-	subs	r2,r2,#1
-	eor	r3,r3,r1	@ r3 = 0 if match - doesn't break flags from sub
-	cbz	r3, 50f
-	bne	21b		@ on r2 flags
-
-40:
-	movs	r0,#0		@ not found
-	DO_RET(lr)
-
-50:
-	subs	r0,r0,#1	@ found
-	DO_RET(lr)
-
-60:  @ We're here because the fast path found a hit - now we have to track down exactly which word it was
-     @ r0 points to the start of the double word after the one that was tested
-     @ r5 has the 00/ff pattern for the first word, r6 has the chained value
-	cfi_restore_state
-	cmp	r5, #0
-	itte	eq
-	moveq	r5, r6		@ the end is in the 2nd word
-	subeq	r0,r0,#3	@ Points to 2nd byte of 2nd word
-	subne	r0,r0,#7	@ or 2nd byte of 1st word
-
-	@ r0 currently points to the 2nd byte of the word containing the hit
-	tst	r5, # CHARTSTMASK(0)	@ 1st character
-	bne	61f
-	adds	r0,r0,#1
-	tst	r5, # CHARTSTMASK(1)	@ 2nd character
-	ittt	eq
-	addeq	r0,r0,#1
-	tsteq	r5, # (3<<15)		@ 2nd & 3rd character
-	@ If not the 3rd must be the last one
-	addeq	r0,r0,#1
-
-61:
-	pop	{r4,r5,r6,r7}
-	cfi_adjust_cfa_offset (-16)
-	cfi_restore (r4)
-	cfi_restore (r5)
-	cfi_restore (r6)
-	cfi_restore (r7)
-
-	subs	r0,r0,#1
-	DO_RET(lr)
-
-END(memchr)
-libc_hidden_builtin_def (memchr)
diff --git a/sysdeps/arm/eabi/armv7/Implies b/sysdeps/arm/eabi/armv7/Implies
deleted file mode 100644
index 8a78440..0000000
--- a/sysdeps/arm/eabi/armv7/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-# We can do everything that 6T2 can
-arm/eabi/armv6t2
diff --git a/sysdeps/arm/eabi/backtrace.c b/sysdeps/arm/eabi/backtrace.c
deleted file mode 100644
index 3d839e6..0000000
--- a/sysdeps/arm/eabi/backtrace.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/* Return backtrace of current program state.
-   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Kazu Hirata <kazu@codesourcery.com>, 2008.
-
-   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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <bits/libc-lock.h>
-#include <dlfcn.h>
-#include <execinfo.h>
-#include <stdlib.h>
-#include <unwind.h>
-
-struct trace_arg
-{
-  void **array;
-  int cnt, size;
-};
-
-#ifdef SHARED
-static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *);
-static _Unwind_VRS_Result (*unwind_vrs_get) (_Unwind_Context *,
-					     _Unwind_VRS_RegClass,
-					     _uw,
-					     _Unwind_VRS_DataRepresentation,
-					     void *);
-
-static void *libgcc_handle;
-
-static void
-init (void)
-{
-  libgcc_handle = __libc_dlopen ("libgcc_s.so.1");
-
-  if (libgcc_handle == NULL)
-    return;
-
-  unwind_backtrace = __libc_dlsym (libgcc_handle, "_Unwind_Backtrace");
-  unwind_vrs_get = __libc_dlsym (libgcc_handle, "_Unwind_VRS_Get");
-  if (unwind_vrs_get == NULL)
-    unwind_backtrace = NULL;
-}
-
-/* This function is identical to "_Unwind_GetGR", except that it uses
-   "unwind_vrs_get" instead of "_Unwind_VRS_Get".  */
-static inline _Unwind_Word
-unwind_getgr (_Unwind_Context *context, int regno)
-{
-  _uw val;
-  unwind_vrs_get (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val);
-  return val;
-}
-
-/* This macro is identical to the _Unwind_GetIP macro, except that it
-   uses "unwind_getgr" instead of "_Unwind_GetGR".  */
-# define unwind_getip(context) \
-  (unwind_getgr (context, 15) & ~(_Unwind_Word)1)
-#else
-# define unwind_backtrace _Unwind_Backtrace
-# define unwind_getip _Unwind_GetIP
-#endif
-
-static _Unwind_Reason_Code
-backtrace_helper (struct _Unwind_Context *ctx, void *a)
-{
-  struct trace_arg *arg = a;
-
-  /* We are first called with address in the __backtrace function.
-     Skip it.  */
-  if (arg->cnt != -1)
-    arg->array[arg->cnt] = (void *) unwind_getip (ctx);
-  if (++arg->cnt == arg->size)
-    return _URC_END_OF_STACK;
-  return _URC_NO_REASON;
-}
-
-int
-__backtrace (array, size)
-     void **array;
-     int size;
-{
-  struct trace_arg arg = { .array = array, .size = size, .cnt = -1 };
-#ifdef SHARED
-  __libc_once_define (static, once);
-
-  __libc_once (once, init);
-  if (unwind_backtrace == NULL)
-    return 0;
-#endif
-
-  if (size >= 1)
-    unwind_backtrace (backtrace_helper, &arg);
-
-  if (arg.cnt > 1 && arg.array[arg.cnt - 1] == NULL)
-    --arg.cnt;
-  return arg.cnt != -1 ? arg.cnt : 0;
-}
-weak_alias (__backtrace, backtrace)
-libc_hidden_def (__backtrace)
-
-
-#ifdef SHARED
-/* Free all resources if necessary.  */
-libc_freeres_fn (free_mem)
-{
-  unwind_backtrace = NULL;
-  if (libgcc_handle != NULL)
-    {
-      __libc_dlclose (libgcc_handle);
-      libgcc_handle = NULL;
-    }
-}
-#endif
diff --git a/sysdeps/arm/eabi/bits/fenv.h b/sysdeps/arm/eabi/bits/fenv.h
deleted file mode 100644
index 006ccf5..0000000
--- a/sysdeps/arm/eabi/bits/fenv.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright (C) 2004, 2005, 2012 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _FENV_H
-# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
-#endif
-
-/* Define bits representing exceptions in the FPU status word.  */
-enum
-  {
-    FE_INVALID = 1,
-#define FE_INVALID FE_INVALID
-    FE_DIVBYZERO = 2,
-#define FE_DIVBYZERO FE_DIVBYZERO
-    FE_OVERFLOW = 4,
-#define FE_OVERFLOW FE_OVERFLOW
-    FE_UNDERFLOW = 8,
-#define FE_UNDERFLOW FE_UNDERFLOW
-    FE_INEXACT = 16,
-#define FE_INEXACT FE_INEXACT
-  };
-
-/* Amount to shift by to convert an exception to a mask bit.  */
-#define FE_EXCEPT_SHIFT	8
-
-/* All supported exceptions.  */
-#define FE_ALL_EXCEPT	\
-	(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
-
-/* VFP supports all of the four defined rounding modes.  */
-enum
-  {
-    FE_TONEAREST = 0,
-#define FE_TONEAREST FE_TONEAREST
-    FE_UPWARD = 0x400000,
-#define FE_UPWARD FE_UPWARD
-    FE_DOWNWARD = 0x800000,
-#define FE_DOWNWARD FE_DOWNWARD
-    FE_TOWARDZERO = 0xc00000
-#define FE_TOWARDZERO FE_TOWARDZERO
-  };
-
-/* Type representing exception flags. */
-typedef unsigned int fexcept_t;
-
-/* Type representing floating-point environment.  */
-typedef struct
-  {
-    unsigned int __cw;
-  }
-fenv_t;
-
-/* If the default argument is used we use this value.  */
-#define FE_DFL_ENV	((fenv_t *) -1l)
-
-#ifdef __USE_GNU
-/* Floating-point environment where none of the exceptions are masked.  */
-# define FE_NOMASK_ENV  ((const fenv_t *) -2)
-#endif
diff --git a/sysdeps/arm/eabi/bits/huge_val.h b/sysdeps/arm/eabi/bits/huge_val.h
deleted file mode 100644
index 6008b10..0000000
--- a/sysdeps/arm/eabi/bits/huge_val.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity).
-   Used by <stdlib.h> and <math.h> functions for overflow.
-   Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
-   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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _MATH_H
-# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
-#endif
-
-/* IEEE positive infinity (-HUGE_VAL is negative infinity).  */
-
-#if __GNUC_PREREQ(3,3)
-# define HUGE_VAL	(__builtin_huge_val())
-#elif __GNUC_PREREQ(2,96)
-# define HUGE_VAL	(__extension__ 0x1.0p2047)
-#elif defined __GNUC__
-
-# define HUGE_VAL \
-  (__extension__							      \
-   ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; })   \
-    { __l: 0x7ff0000000000000ULL }).__d)
-
-#else /* not GCC */
-
-# include <endian.h>
-
-typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
-
-# if __BYTE_ORDER == __BIG_ENDIAN
-#  define __HUGE_VAL_bytes	{ 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
-# endif
-# if __BYTE_ORDER == __LITTLE_ENDIAN
-#  define __HUGE_VAL_bytes	{ 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
-# endif
-
-static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
-# define HUGE_VAL	(__huge_val.__d)
-
-#endif	/* GCC.  */
diff --git a/sysdeps/arm/eabi/bits/setjmp.h b/sysdeps/arm/eabi/bits/setjmp.h
deleted file mode 100644
index bdc41ce..0000000
--- a/sysdeps/arm/eabi/bits/setjmp.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 2004, 2005, 2006, 2009 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* Define the machine-dependent type `jmp_buf'.  ARM EABI version.  */
-
-#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H 1
-
-#if !defined _SETJMP_H && !defined _PTHREAD_H
-# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
-#endif
-
-#ifndef _ASM
-/* The exact set of registers saved may depend on the particular core
-   in use, as some coprocessor registers may need to be saved.  The C
-   Library ABI requires that the buffer be 8-byte aligned, and
-   recommends that the buffer contain 64 words.  The first 28 words
-   are occupied by v1-v6, sl, fp, sp, pc, d8-d15, and fpscr.  (Note
-   that d8-15 require 17 words, due to the use of fstmx.)  */
-typedef int __jmp_buf[64] __attribute__((__aligned__ (8)));
-#endif
-
-#endif
diff --git a/sysdeps/arm/eabi/fclrexcpt.c b/sysdeps/arm/eabi/fclrexcpt.c
deleted file mode 100644
index ddedc35..0000000
--- a/sysdeps/arm/eabi/fclrexcpt.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Clear given exceptions in current floating-point environment.
-   Copyright (C) 1997,98,99,2000,01,05,11 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-int
-__feclearexcept (int excepts)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      unsigned long int temp;
-
-      /* Mask out unsupported bits/exceptions.  */
-      excepts &= FE_ALL_EXCEPT;
-
-      /* Get the current floating point status. */
-      _FPU_GETCW (temp);
-
-      /* Clear the relevant bits.  */
-      temp = (temp & ~FE_ALL_EXCEPT) | (temp & FE_ALL_EXCEPT & ~excepts);
-
-      /* Put the new data in effect.  */
-      _FPU_SETCW (temp);
-
-      /* Success.  */
-      return 0;
-    }
-
-  /* Unsupported, so fail unless nothing needs to be done.  */
-  return (excepts != 0);
-}
-
-#include <shlib-compat.h>
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__feclearexcept, __old_feclearexcept)
-compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
-#endif
-
-versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
diff --git a/sysdeps/arm/eabi/fedisblxcpt.c b/sysdeps/arm/eabi/fedisblxcpt.c
deleted file mode 100644
index c9c62a4..0000000
--- a/sysdeps/arm/eabi/fedisblxcpt.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Disable floating-point exceptions.
-   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Philip Blundell <philb@gnu.org>, 2001.
-
-   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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-int
-fedisableexcept (int excepts)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      unsigned long int new_exc, old_exc;
-
-      _FPU_GETCW(new_exc);
-
-      old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
-
-      excepts &= FE_ALL_EXCEPT;
-
-      new_exc &= ~(excepts << FE_EXCEPT_SHIFT);
-
-      _FPU_SETCW(new_exc);
-
-      return old_exc;
-    }
-
-  /* Unsupported, so return -1 for failure.  */
-  return -1;
-}
diff --git a/sysdeps/arm/eabi/feenablxcpt.c b/sysdeps/arm/eabi/feenablxcpt.c
deleted file mode 100644
index 3b2b934..0000000
--- a/sysdeps/arm/eabi/feenablxcpt.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Enable floating-point exceptions.
-   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Philip Blundell <philb@gnu.org>, 2001.
-
-   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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-int
-feenableexcept (int excepts)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      unsigned long int new_exc, old_exc;
-
-      _FPU_GETCW(new_exc);
-
-      old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
-
-      excepts &= FE_ALL_EXCEPT;
-
-      new_exc |= (excepts << FE_EXCEPT_SHIFT);
-
-      _FPU_SETCW(new_exc);
-
-      return old_exc;
-    }
-
-  /* Unsupported, so return -1 for failure.  */
-  return -1;
-}
diff --git a/sysdeps/arm/eabi/fegetenv.c b/sysdeps/arm/eabi/fegetenv.c
deleted file mode 100644
index c638635..0000000
--- a/sysdeps/arm/eabi/fegetenv.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Store current floating-point environment.
-   Copyright (C) 1997,98,99,2000,01,05,10 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-int
-__fegetenv (fenv_t *envp)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      unsigned long int temp;
-      _FPU_GETCW (temp);
-      envp->__cw = temp;
-
-      /* Success.  */
-      return 0;
-    }
-
-  /* Unsupported, so fail.  */
-  return 1;
-}
-
-#include <shlib-compat.h>
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__fegetenv, __old_fegetenv)
-compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
-#endif
-
-libm_hidden_ver (__fegetenv, fegetenv)
-versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
diff --git a/sysdeps/arm/eabi/fegetexcept.c b/sysdeps/arm/eabi/fegetexcept.c
deleted file mode 100644
index 929d6c5..0000000
--- a/sysdeps/arm/eabi/fegetexcept.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Get floating-point exceptions.
-   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Philip Blundell <philb@gnu.org>, 2001
-
-   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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-int
-fegetexcept (void)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      unsigned long temp;
-
-      _FPU_GETCW (temp);
-
-      return (temp >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
-    }
-
-  /* Unsupported. Return all exceptions disabled.  */
-  return 0;
-}
diff --git a/sysdeps/arm/eabi/fegetround.c b/sysdeps/arm/eabi/fegetround.c
deleted file mode 100644
index df10497..0000000
--- a/sysdeps/arm/eabi/fegetround.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Return current rounding direction.
-   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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-int
-fegetround (void)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      unsigned int temp;
-
-      /* Get the current environment.  */
-      _FPU_GETCW (temp);
-
-      return temp & FE_TOWARDZERO;
-    }
-
-  /* The current soft-float implementation only handles TONEAREST.  */
-  return FE_TONEAREST;
-}
diff --git a/sysdeps/arm/eabi/feholdexcpt.c b/sysdeps/arm/eabi/feholdexcpt.c
deleted file mode 100644
index 4aed48b..0000000
--- a/sysdeps/arm/eabi/feholdexcpt.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Store current floating-point environment and clear exceptions.
-   Copyright (C) 1997, 1998, 1999, 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-int
-feholdexcept (fenv_t *envp)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      unsigned long int temp;
-
-      /* Store the environment.  */
-      _FPU_GETCW(temp);
-      envp->__cw = temp;
-
-      /* Now set all exceptions to non-stop.  */
-      temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
-
-      /* And clear all exception flags.  */
-      temp &= ~FE_ALL_EXCEPT;
-
-      _FPU_SETCW(temp);
-
-      return 0;
-    }
-
-  /* Unsupported, so fail.  */
-  return 1;
-}
-
-libm_hidden_def (feholdexcept)
diff --git a/sysdeps/arm/eabi/fesetenv.c b/sysdeps/arm/eabi/fesetenv.c
deleted file mode 100644
index 6137032..0000000
--- a/sysdeps/arm/eabi/fesetenv.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Install given floating-point environment.
-   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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-int
-__fesetenv (const fenv_t *envp)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      unsigned int temp;
-
-      _FPU_GETCW (temp);
-      temp &= _FPU_RESERVED;
-
-      if (envp == FE_DFL_ENV)
-	temp |= _FPU_DEFAULT;
-      else if (envp == FE_NOMASK_ENV)
-	temp |= _FPU_IEEE;
-      else
-	temp |= envp->__cw & ~_FPU_RESERVED;
-
-      _FPU_SETCW (temp);
-
-      /* Success.  */
-      return 0;
-    }
-
-  /* Unsupported, so fail.  */
-  return 1;
-}
-
-#include <shlib-compat.h>
-libm_hidden_ver (__fesetenv, fesetenv)
-versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
diff --git a/sysdeps/arm/eabi/fesetround.c b/sysdeps/arm/eabi/fesetround.c
deleted file mode 100644
index 997bd98..0000000
--- a/sysdeps/arm/eabi/fesetround.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Set current rounding direction.
-   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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-int
-fesetround (int round)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      fpu_control_t temp;
-
-      switch (round)
-	{
-	case FE_TONEAREST:
-	case FE_UPWARD:
-	case FE_DOWNWARD:
-	case FE_TOWARDZERO:
-	  _FPU_GETCW (temp);
-	  temp = (temp & ~FE_TOWARDZERO) | round;
-	  _FPU_SETCW (temp);
-	  return 0;
-	default:
-	  return 1;
-	}
-    }
-  else if (round == FE_TONEAREST)
-    /* This is the only supported rounding mode for soft-fp.  */
-    return 0;
-
-  /* Unsupported, so fail.  */
-  return 1;
-}
-
-libm_hidden_def (fesetround)
diff --git a/sysdeps/arm/eabi/feupdateenv.c b/sysdeps/arm/eabi/feupdateenv.c
deleted file mode 100644
index 98f2654..0000000
--- a/sysdeps/arm/eabi/feupdateenv.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Install given floating-point environment and raise exceptions.
-   Copyright (C) 1997, 1999, 2000, 2008, 2010 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-int
-__feupdateenv (const fenv_t *envp)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      unsigned int temp;
-
-      /* Get the current exception state.  */
-      _FPU_GETCW (temp);
-
-      /* Install new environment.  */
-      fesetenv (envp);
-
-      /* Raise the saved exceptions.  */
-      feraiseexcept (temp & FE_ALL_EXCEPT);
-
-      /* Success.  */
-      return 0;
-    }
-
-  /* Unsupported, so fail.  */
-  return 1;
-}
-
-#include <shlib-compat.h>
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__feupdateenv, __old_feupdateenv)
-compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
-#endif
-
-libm_hidden_ver (__feupdateenv, feupdateenv)
-versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);
diff --git a/sysdeps/arm/eabi/fgetexcptflg.c b/sysdeps/arm/eabi/fgetexcptflg.c
deleted file mode 100644
index 41661a2..0000000
--- a/sysdeps/arm/eabi/fgetexcptflg.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Store current representation for exceptions.
-   Copyright (C) 1997, 1999, 2000, 2008 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
-   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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-int
-__fegetexceptflag (fexcept_t *flagp, int excepts)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      unsigned long temp;
-
-      /* Get the current exceptions.  */
-      _FPU_GETCW (temp);
-
-      *flagp = temp & excepts & FE_ALL_EXCEPT;
-
-      /* Success.  */
-      return 0;
-    }
-
-  /* Unsupported, so fail.  */
-  return 1;
-}
-
-#include <shlib-compat.h>
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__fegetexceptflag, __old_fegetexceptflag)
-compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1);
-#endif
-versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2);
diff --git a/sysdeps/arm/eabi/find_exidx.c b/sysdeps/arm/eabi/find_exidx.c
deleted file mode 100644
index 12ade46..0000000
--- a/sysdeps/arm/eabi/find_exidx.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* Copyright (C) 2005, 2008 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <link.h>
-#include <unwind.h>
-
-struct unw_eh_callback_data
-{
-  _Unwind_Ptr pc;
-  _Unwind_Ptr exidx_start;
-  int exidx_len;
-};
-
-
-/* Callback to determins if the PC lies within an object, and remember the
-   location of the exception index table if it does.  */
-
-static int
-find_exidx_callback (struct dl_phdr_info * info, size_t size, void * ptr)
-{
-  struct unw_eh_callback_data * data;
-  const ElfW(Phdr) *phdr;
-  int i;
-  int match;
-  _Unwind_Ptr load_base;
-
-  data = (struct unw_eh_callback_data *) ptr;
-  load_base = info->dlpi_addr;
-  phdr = info->dlpi_phdr;
-
-  match = 0;
-  for (i = info->dlpi_phnum; i > 0; i--, phdr++)
-    {
-      if (phdr->p_type == PT_LOAD)
-        {
-          _Unwind_Ptr vaddr = phdr->p_vaddr + load_base;
-          if (data->pc >= vaddr && data->pc < vaddr + phdr->p_memsz)
-            match = 1;
-        }
-      else if (phdr->p_type == PT_ARM_EXIDX)
-	{
-	  data->exidx_start = (_Unwind_Ptr) (phdr->p_vaddr + load_base);
-	  data->exidx_len = phdr->p_memsz;
-	}
-    }
-
-  return match;
-}
-
-
-/* Find the exception index table containing PC.  */
-
-_Unwind_Ptr
-__gnu_Unwind_Find_exidx (_Unwind_Ptr pc, int * pcount)
-{
-  struct unw_eh_callback_data data;
-
-  data.pc = pc;
-  data.exidx_start = 0;
-  if (__dl_iterate_phdr (find_exidx_callback, &data) <= 0)
-    return 0;
-
-  *pcount = data.exidx_len / 8;
-  return data.exidx_start;
-}
diff --git a/sysdeps/arm/eabi/fpu_control.h b/sysdeps/arm/eabi/fpu_control.h
deleted file mode 100644
index 635bc7d..0000000
--- a/sysdeps/arm/eabi/fpu_control.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* FPU control word definitions.  ARM VFP version.
-   Copyright (C) 2004, 2005, 2009 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _FPU_CONTROL_H
-#define _FPU_CONTROL_H
-
-#if !defined(_LIBC) && defined(__SOFTFP__)
-
-#define _FPU_RESERVED 0xffffffff
-#define _FPU_DEFAULT  0x00000000
-typedef unsigned int fpu_control_t;
-#define _FPU_GETCW(cw) 0
-#define _FPU_SETCW(cw) do { } while (0)
-extern fpu_control_t __fpu_control;
-
-#else
-
-/* masking of interrupts */
-#define _FPU_MASK_IM	0x00000100	/* invalid operation */
-#define _FPU_MASK_ZM	0x00000200	/* divide by zero */
-#define _FPU_MASK_OM	0x00000400	/* overflow */
-#define _FPU_MASK_UM	0x00000800	/* underflow */
-#define _FPU_MASK_PM	0x00001000	/* inexact */
-
-/* Some bits in the FPSCR are not yet defined.  They must be preserved when
-   modifying the contents.  */
-#define _FPU_RESERVED	0x0e08e0e0
-#define _FPU_DEFAULT    0x00000000
-/* Default + exceptions enabled. */
-#define _FPU_IEEE	(_FPU_DEFAULT | 0x00001f00)
-
-/* Type of the control word.  */
-typedef unsigned int fpu_control_t;
-
-/* Macros for accessing the hardware control word.  */
-/* This is fmrx %0, fpscr.  */
-#define _FPU_GETCW(cw) \
-  __asm__ __volatile__ ("mrc p10, 7, %0, cr1, cr0, 0" : "=r" (cw))
-/* This is fmxr fpscr, %0.  */
-#define _FPU_SETCW(cw) \
-  __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw))
-
-/* Default control word set at startup.  */
-extern fpu_control_t __fpu_control;
-
-#endif /* __SOFTFP__ */
-
-#endif /* _FPU_CONTROL_H */
diff --git a/sysdeps/arm/eabi/fraiseexcpt.c b/sysdeps/arm/eabi/fraiseexcpt.c
deleted file mode 100644
index 0a43688..0000000
--- a/sysdeps/arm/eabi/fraiseexcpt.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Raise given exceptions.
-   Copyright (C) 2004, 2005, 2011 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fpu_control.h>
-#include <fenv.h>
-#include <float.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-int
-feraiseexcept (int excepts)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      int fpscr;
-      const float fp_zero = 0.0, fp_one = 1.0, fp_max = FLT_MAX,
-                  fp_min = FLT_MIN, fp_1e32 = 1.0e32f, fp_two = 2.0,
-		  fp_three = 3.0;
-
-      /* Raise exceptions represented by EXPECTS.  But we must raise only
-	 one signal at a time.  It is important that if the overflow/underflow
-	 exception and the inexact exception are given at the same time,
-	 the overflow/underflow exception follows the inexact exception.  After
-	 each exception we read from the fpscr, to force the exception to be
-	 raised immediately.  */
-
-      /* There are additional complications because this file may be compiled
-         without VFP support enabled, and we also can't assume that the
-	 assembler has VFP instructions enabled. To get around this we use the
-	 generic coprocessor mnemonics and avoid asking GCC to put float values
-	 in VFP registers.  */
-
-      /* First: invalid exception.  */
-      if (FE_INVALID & excepts)
-	__asm__ __volatile__ (
-	  "ldc p10, cr0, %1\n\t"                        /* flds s0, %1  */
-	  "cdp p10, 8, cr0, cr0, cr0, 0\n\t"            /* fdivs s0, s0, s0  */
-	  "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr)  /* fmrx %0, fpscr  */
-			                : "m" (fp_zero)
-					: "s0");
-
-      /* Next: division by zero.  */
-      if (FE_DIVBYZERO & excepts)
-	__asm__ __volatile__ (
-	  "ldc p10, cr0, %1\n\t"                        /* flds s0, %1  */
-	  "ldcl p10, cr0, %2\n\t"                       /* flds s1, %2  */
-	  "cdp p10, 8, cr0, cr0, cr0, 1\n\t"            /* fdivs s0, s0, s1  */
-	  "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr)  /* fmrx %0, fpscr  */
-			                : "m" (fp_one), "m" (fp_zero)
-					: "s0", "s1");
-
-      /* Next: overflow.  */
-      if (FE_OVERFLOW & excepts)
-	/* There's no way to raise overflow without also raising inexact.  */
-	__asm__ __volatile__ (
-	  "ldc p10, cr0, %1\n\t"                        /* flds s0, %1  */
-	  "ldcl p10, cr0, %2\n\t"                       /* flds s1, %2  */
-	  "cdp p10, 3, cr0, cr0, cr0, 1\n\t"            /* fadds s0, s0, s1  */
-	  "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr)  /* fmrx %0, fpscr  */
-			                : "m" (fp_max), "m" (fp_1e32)
-					: "s0", "s1");
-
-      /* Next: underflow.  */
-      if (FE_UNDERFLOW & excepts)
-	__asm__ __volatile__ (
-	  "ldc p10, cr0, %1\n\t"                        /* flds s0, %1  */
-	  "ldcl p10, cr0, %2\n\t"                       /* flds s1, %2  */
-	  "cdp p10, 8, cr0, cr0, cr0, 1\n\t"            /* fdivs s0, s0, s1  */
-	  "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr)  /* fmrx %0, fpscr  */
-			                : "m" (fp_min), "m" (fp_three)
-					: "s0", "s1");
-
-      /* Last: inexact.  */
-      if (FE_INEXACT & excepts)
-	__asm__ __volatile__ (
-	  "ldc p10, cr0, %1\n\t"                        /* flds s0, %1  */
-	  "ldcl p10, cr0, %2\n\t"                       /* flds s1, %2  */
-	  "cdp p10, 8, cr0, cr0, cr0, 1\n\t"            /* fdivs s0, s0, s1  */
-	  "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr)  /* fmrx %0, fpscr  */
-			                : "m" (fp_two), "m" (fp_three)
-					: "s0", "s1");
-
-      /* Success.  */
-      return 0;
-    }
-
-  /* Unsupported, so fail unless nothing needs to be done.  */
-  return (excepts != 0);
-}
-
-libm_hidden_def (feraiseexcept)
diff --git a/sysdeps/arm/eabi/fsetexcptflg.c b/sysdeps/arm/eabi/fsetexcptflg.c
deleted file mode 100644
index bee51a9..0000000
--- a/sysdeps/arm/eabi/fsetexcptflg.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Set floating-point environment exception handling.
-   Copyright (C) 1997,98,99,2000,01,05,08,11 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fenv.h>
-#include <math.h>
-#include <fpu_control.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-int
-__fesetexceptflag (const fexcept_t *flagp, int excepts)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      fexcept_t temp;
-
-      /* Get the current environment.  */
-      _FPU_GETCW (temp);
-
-      /* Set the desired exception mask.  */
-      temp &= ~(excepts & FE_ALL_EXCEPT);
-      temp |= (*flagp & excepts & FE_ALL_EXCEPT);
-
-      /* Save state back to the FPU.  */
-      _FPU_SETCW (temp);
-
-      /* Success.  */
-      return 0;
-    }
-
-  /* Unsupported, so fail unless nothing needs to be done.  */
-  return (excepts != 0);
-}
-
-#include <shlib-compat.h>
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__fesetexceptflag, __old_fesetexceptflag)
-compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1);
-#endif
-
-versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2);
diff --git a/sysdeps/arm/eabi/ftestexcept.c b/sysdeps/arm/eabi/ftestexcept.c
deleted file mode 100644
index 06817d2..0000000
--- a/sysdeps/arm/eabi/ftestexcept.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Test exception in current environment.
-   Copyright (C) 1997, 1998, 2005, 2010 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-int
-fetestexcept (int excepts)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      fexcept_t temp;
-
-      /* Get current exceptions.  */
-      _FPU_GETCW(temp);
-
-      return temp & excepts & FE_ALL_EXCEPT;
-    }
-
-  /* Unsupported, return 0.  */
-  return 0;
-}
-libm_hidden_def (fetestexcept)
diff --git a/sysdeps/arm/eabi/jmpbuf-offsets.h b/sysdeps/arm/eabi/jmpbuf-offsets.h
deleted file mode 100644
index 642a965..0000000
--- a/sysdeps/arm/eabi/jmpbuf-offsets.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Private macros for accessing __jmp_buf contents.  ARM EABI version.
-   Copyright (C) 2007 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#define __JMP_BUF_SP		8
diff --git a/sysdeps/arm/eabi/machine-gmon.h b/sysdeps/arm/eabi/machine-gmon.h
deleted file mode 100644
index 671d6b1..0000000
--- a/sysdeps/arm/eabi/machine-gmon.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Machine-dependent definitions for profiling support.  ARM EABI version.
-   Copyright (C) 2008, 2009 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-
-/* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0, 
-   so we must use an assembly stub.  */
-
-/* We must not pollute the global namespace.  */
-#define mcount_internal __mcount_internal
-
-extern void mcount_internal (u_long frompc, u_long selfpc) internal_function;
-#define _MCOUNT_DECL(frompc, selfpc) \
-  void internal_function mcount_internal (u_long frompc, u_long selfpc)
-
-
-/* Define MCOUNT as empty since we have the implementation in another file.  */
-#define MCOUNT
diff --git a/sysdeps/arm/eabi/rtld-global-offsets.sym b/sysdeps/arm/eabi/rtld-global-offsets.sym
deleted file mode 100644
index ff4e97f..0000000
--- a/sysdeps/arm/eabi/rtld-global-offsets.sym
+++ /dev/null
@@ -1,7 +0,0 @@
-#define SHARED 1
-
-#include <ldsodefs.h>
-
-#define rtld_global_ro_offsetof(mem) offsetof (struct rtld_global_ro, mem)
-
-RTLD_GLOBAL_RO_DL_HWCAP_OFFSET	rtld_global_ro_offsetof (_dl_hwcap)
diff --git a/sysdeps/arm/eabi/setfpucw.c b/sysdeps/arm/eabi/setfpucw.c
deleted file mode 100644
index d0cea32..0000000
--- a/sysdeps/arm/eabi/setfpucw.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Set the FPU control word.
-   Copyright (C) 1996, 1997, 1999, 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <math.h>
-#include <fpu_control.h>
-
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
-
-void
-__setfpucw (fpu_control_t set)
-{
-  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
-    {
-      fpu_control_t cw;
-
-      /* Fetch the current control word.  */
-      _FPU_GETCW (cw);
-
-      /* Preserve the reserved bits, and set the rest as the user
-	 specified (or the default, if the user gave zero).  */
-      cw &= _FPU_RESERVED;
-      cw |= set & ~_FPU_RESERVED;
-
-      _FPU_SETCW (cw);
-    }
-
-  /* Do nothing if a VFP unit isn't present.  */
-}
diff --git a/sysdeps/arm/eabi/setjmp.S b/sysdeps/arm/eabi/setjmp.S
deleted file mode 100644
index 5e3f39c..0000000
--- a/sysdeps/arm/eabi/setjmp.S
+++ /dev/null
@@ -1,98 +0,0 @@
-/* setjmp for ARM.
-   Copyright (C) 1997, 1998, 2005, 2006, 2008 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, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-#include <rtld-global-offsets.h>
-
-ENTRY (__sigsetjmp)
-	mov	ip, r0
-
-	/* Save registers */
-	stmia	ip!, {v1-v6, sl, fp, sp, lr}
-
-	/* Check if we have a VFP unit.  */
-#ifdef IS_IN_rtld
-	ldr	a3, 1f
-	ldr	a4, Lrtld_local_ro
-0:	add	a3, pc, a3
-	add	a3, a3, a4
-	ldr	a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
-#ifdef PIC
-	ldr	a3, 1f
-	ldr	a4, Lrtld_global_ro
-0:	add	a3, pc, a3
-	ldr	a3, [a3, a4]
-	ldr	a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
-	ldr	a3, Lhwcap
-	ldr	a3, [a3, #0]
-#endif
-#endif
-
-	tst	a3, #HWCAP_ARM_VFP
-	beq	Lno_vfp
-
-	/* Store the VFP registers.
-	   Don't use VFP instructions directly because this code
-	   is used in non-VFP multilibs.  */
-	/* Following instruction is vstmia ip!, {d8-d15}.  */
-	stc	p11, cr8, [ip], #64
-	/* Store the floating-point status register.  */
-	/* Following instruction is vmrs a4, fpscr.  */
-	mrc	p10, 7, a4, cr1, cr0, 0
-	str	a4, [ip], #4
-Lno_vfp:
-
-	tst	a3, #HWCAP_ARM_IWMMXT
-	beq	Lno_iwmmxt
-
-	/* Save the call-preserved iWMMXt registers.  */
-	/* Following instructions are wstrd wr10, [ip], #8 (etc.)  */
-	stcl	p1, cr10, [r12], #8
-	stcl	p1, cr11, [r12], #8
-	stcl	p1, cr12, [r12], #8
-	stcl	p1, cr13, [r12], #8
-	stcl	p1, cr14, [r12], #8
-	stcl	p1, cr15, [r12], #8
-Lno_iwmmxt:
-
-	/* Make a tail call to __sigjmp_save; it takes the same args.  */
-	B	PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
-
-#ifdef IS_IN_rtld
-1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_local_ro:
-	.long	C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
-#else
-#ifdef PIC
-1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_global_ro:
-	.long	C_SYMBOL_NAME(_rtld_global_ro)(GOT)
-#else
-Lhwcap:
-	.long	C_SYMBOL_NAME(_dl_hwcap)
-#endif
-#endif
-
-END (__sigsetjmp)
-
-hidden_def (__sigsetjmp)
diff --git a/sysdeps/arm/fclrexcpt.c b/sysdeps/arm/fclrexcpt.c
new file mode 100644
index 0000000..ddedc35
--- /dev/null
+++ b/sysdeps/arm/fclrexcpt.c
@@ -0,0 +1,60 @@
+/* Clear given exceptions in current floating-point environment.
+   Copyright (C) 1997,98,99,2000,01,05,11 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+__feclearexcept (int excepts)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      unsigned long int temp;
+
+      /* Mask out unsupported bits/exceptions.  */
+      excepts &= FE_ALL_EXCEPT;
+
+      /* Get the current floating point status. */
+      _FPU_GETCW (temp);
+
+      /* Clear the relevant bits.  */
+      temp = (temp & ~FE_ALL_EXCEPT) | (temp & FE_ALL_EXCEPT & ~excepts);
+
+      /* Put the new data in effect.  */
+      _FPU_SETCW (temp);
+
+      /* Success.  */
+      return 0;
+    }
+
+  /* Unsupported, so fail unless nothing needs to be done.  */
+  return (excepts != 0);
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__feclearexcept, __old_feclearexcept)
+compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
diff --git a/sysdeps/arm/fedisblxcpt.c b/sysdeps/arm/fedisblxcpt.c
new file mode 100644
index 0000000..c9c62a4
--- /dev/null
+++ b/sysdeps/arm/fedisblxcpt.c
@@ -0,0 +1,50 @@
+/* Disable floating-point exceptions.
+   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Philip Blundell <philb@gnu.org>, 2001.
+
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+fedisableexcept (int excepts)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      unsigned long int new_exc, old_exc;
+
+      _FPU_GETCW(new_exc);
+
+      old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
+
+      excepts &= FE_ALL_EXCEPT;
+
+      new_exc &= ~(excepts << FE_EXCEPT_SHIFT);
+
+      _FPU_SETCW(new_exc);
+
+      return old_exc;
+    }
+
+  /* Unsupported, so return -1 for failure.  */
+  return -1;
+}
diff --git a/sysdeps/arm/feenablxcpt.c b/sysdeps/arm/feenablxcpt.c
new file mode 100644
index 0000000..3b2b934
--- /dev/null
+++ b/sysdeps/arm/feenablxcpt.c
@@ -0,0 +1,50 @@
+/* Enable floating-point exceptions.
+   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Philip Blundell <philb@gnu.org>, 2001.
+
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+feenableexcept (int excepts)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      unsigned long int new_exc, old_exc;
+
+      _FPU_GETCW(new_exc);
+
+      old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
+
+      excepts &= FE_ALL_EXCEPT;
+
+      new_exc |= (excepts << FE_EXCEPT_SHIFT);
+
+      _FPU_SETCW(new_exc);
+
+      return old_exc;
+    }
+
+  /* Unsupported, so return -1 for failure.  */
+  return -1;
+}
diff --git a/sysdeps/arm/fegetenv.c b/sysdeps/arm/fegetenv.c
new file mode 100644
index 0000000..c638635
--- /dev/null
+++ b/sysdeps/arm/fegetenv.c
@@ -0,0 +1,51 @@
+/* Store current floating-point environment.
+   Copyright (C) 1997,98,99,2000,01,05,10 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+__fegetenv (fenv_t *envp)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      unsigned long int temp;
+      _FPU_GETCW (temp);
+      envp->__cw = temp;
+
+      /* Success.  */
+      return 0;
+    }
+
+  /* Unsupported, so fail.  */
+  return 1;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__fegetenv, __old_fegetenv)
+compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
+#endif
+
+libm_hidden_ver (__fegetenv, fegetenv)
+versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
diff --git a/sysdeps/arm/fegetexcept.c b/sysdeps/arm/fegetexcept.c
new file mode 100644
index 0000000..929d6c5
--- /dev/null
+++ b/sysdeps/arm/fegetexcept.c
@@ -0,0 +1,42 @@
+/* Get floating-point exceptions.
+   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Philip Blundell <philb@gnu.org>, 2001
+
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+fegetexcept (void)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      unsigned long temp;
+
+      _FPU_GETCW (temp);
+
+      return (temp >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
+    }
+
+  /* Unsupported. Return all exceptions disabled.  */
+  return 0;
+}
diff --git a/sysdeps/arm/fegetround.c b/sysdeps/arm/fegetround.c
new file mode 100644
index 0000000..df10497
--- /dev/null
+++ b/sysdeps/arm/fegetround.c
@@ -0,0 +1,42 @@
+/* Return current rounding direction.
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+fegetround (void)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      unsigned int temp;
+
+      /* Get the current environment.  */
+      _FPU_GETCW (temp);
+
+      return temp & FE_TOWARDZERO;
+    }
+
+  /* The current soft-float implementation only handles TONEAREST.  */
+  return FE_TONEAREST;
+}
diff --git a/sysdeps/arm/feholdexcpt.c b/sysdeps/arm/feholdexcpt.c
new file mode 100644
index 0000000..4aed48b
--- /dev/null
+++ b/sysdeps/arm/feholdexcpt.c
@@ -0,0 +1,53 @@
+/* Store current floating-point environment and clear exceptions.
+   Copyright (C) 1997, 1998, 1999, 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+feholdexcept (fenv_t *envp)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      unsigned long int temp;
+
+      /* Store the environment.  */
+      _FPU_GETCW(temp);
+      envp->__cw = temp;
+
+      /* Now set all exceptions to non-stop.  */
+      temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
+
+      /* And clear all exception flags.  */
+      temp &= ~FE_ALL_EXCEPT;
+
+      _FPU_SETCW(temp);
+
+      return 0;
+    }
+
+  /* Unsupported, so fail.  */
+  return 1;
+}
+
+libm_hidden_def (feholdexcept)
diff --git a/sysdeps/arm/fesetenv.c b/sysdeps/arm/fesetenv.c
new file mode 100644
index 0000000..6137032
--- /dev/null
+++ b/sysdeps/arm/fesetenv.c
@@ -0,0 +1,56 @@
+/* Install given floating-point environment.
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+__fesetenv (const fenv_t *envp)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      unsigned int temp;
+
+      _FPU_GETCW (temp);
+      temp &= _FPU_RESERVED;
+
+      if (envp == FE_DFL_ENV)
+	temp |= _FPU_DEFAULT;
+      else if (envp == FE_NOMASK_ENV)
+	temp |= _FPU_IEEE;
+      else
+	temp |= envp->__cw & ~_FPU_RESERVED;
+
+      _FPU_SETCW (temp);
+
+      /* Success.  */
+      return 0;
+    }
+
+  /* Unsupported, so fail.  */
+  return 1;
+}
+
+#include <shlib-compat.h>
+libm_hidden_ver (__fesetenv, fesetenv)
+versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
diff --git a/sysdeps/arm/fesetround.c b/sysdeps/arm/fesetround.c
new file mode 100644
index 0000000..997bd98
--- /dev/null
+++ b/sysdeps/arm/fesetround.c
@@ -0,0 +1,56 @@
+/* Set current rounding direction.
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+fesetround (int round)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      fpu_control_t temp;
+
+      switch (round)
+	{
+	case FE_TONEAREST:
+	case FE_UPWARD:
+	case FE_DOWNWARD:
+	case FE_TOWARDZERO:
+	  _FPU_GETCW (temp);
+	  temp = (temp & ~FE_TOWARDZERO) | round;
+	  _FPU_SETCW (temp);
+	  return 0;
+	default:
+	  return 1;
+	}
+    }
+  else if (round == FE_TONEAREST)
+    /* This is the only supported rounding mode for soft-fp.  */
+    return 0;
+
+  /* Unsupported, so fail.  */
+  return 1;
+}
+
+libm_hidden_def (fesetround)
diff --git a/sysdeps/arm/feupdateenv.c b/sysdeps/arm/feupdateenv.c
new file mode 100644
index 0000000..98f2654
--- /dev/null
+++ b/sysdeps/arm/feupdateenv.c
@@ -0,0 +1,59 @@
+/* Install given floating-point environment and raise exceptions.
+   Copyright (C) 1997, 1999, 2000, 2008, 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+__feupdateenv (const fenv_t *envp)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      unsigned int temp;
+
+      /* Get the current exception state.  */
+      _FPU_GETCW (temp);
+
+      /* Install new environment.  */
+      fesetenv (envp);
+
+      /* Raise the saved exceptions.  */
+      feraiseexcept (temp & FE_ALL_EXCEPT);
+
+      /* Success.  */
+      return 0;
+    }
+
+  /* Unsupported, so fail.  */
+  return 1;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__feupdateenv, __old_feupdateenv)
+compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
+#endif
+
+libm_hidden_ver (__feupdateenv, feupdateenv)
+versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);
diff --git a/sysdeps/arm/fgetexcptflg.c b/sysdeps/arm/fgetexcptflg.c
new file mode 100644
index 0000000..41661a2
--- /dev/null
+++ b/sysdeps/arm/fgetexcptflg.c
@@ -0,0 +1,53 @@
+/* Store current representation for exceptions.
+   Copyright (C) 1997, 1999, 2000, 2008 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+__fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      unsigned long temp;
+
+      /* Get the current exceptions.  */
+      _FPU_GETCW (temp);
+
+      *flagp = temp & excepts & FE_ALL_EXCEPT;
+
+      /* Success.  */
+      return 0;
+    }
+
+  /* Unsupported, so fail.  */
+  return 1;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__fegetexceptflag, __old_fegetexceptflag)
+compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1);
+#endif
+versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2);
diff --git a/sysdeps/arm/find_exidx.c b/sysdeps/arm/find_exidx.c
new file mode 100644
index 0000000..12ade46
--- /dev/null
+++ b/sysdeps/arm/find_exidx.c
@@ -0,0 +1,79 @@
+/* Copyright (C) 2005, 2008 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <link.h>
+#include <unwind.h>
+
+struct unw_eh_callback_data
+{
+  _Unwind_Ptr pc;
+  _Unwind_Ptr exidx_start;
+  int exidx_len;
+};
+
+
+/* Callback to determins if the PC lies within an object, and remember the
+   location of the exception index table if it does.  */
+
+static int
+find_exidx_callback (struct dl_phdr_info * info, size_t size, void * ptr)
+{
+  struct unw_eh_callback_data * data;
+  const ElfW(Phdr) *phdr;
+  int i;
+  int match;
+  _Unwind_Ptr load_base;
+
+  data = (struct unw_eh_callback_data *) ptr;
+  load_base = info->dlpi_addr;
+  phdr = info->dlpi_phdr;
+
+  match = 0;
+  for (i = info->dlpi_phnum; i > 0; i--, phdr++)
+    {
+      if (phdr->p_type == PT_LOAD)
+        {
+          _Unwind_Ptr vaddr = phdr->p_vaddr + load_base;
+          if (data->pc >= vaddr && data->pc < vaddr + phdr->p_memsz)
+            match = 1;
+        }
+      else if (phdr->p_type == PT_ARM_EXIDX)
+	{
+	  data->exidx_start = (_Unwind_Ptr) (phdr->p_vaddr + load_base);
+	  data->exidx_len = phdr->p_memsz;
+	}
+    }
+
+  return match;
+}
+
+
+/* Find the exception index table containing PC.  */
+
+_Unwind_Ptr
+__gnu_Unwind_Find_exidx (_Unwind_Ptr pc, int * pcount)
+{
+  struct unw_eh_callback_data data;
+
+  data.pc = pc;
+  data.exidx_start = 0;
+  if (__dl_iterate_phdr (find_exidx_callback, &data) <= 0)
+    return 0;
+
+  *pcount = data.exidx_len / 8;
+  return data.exidx_start;
+}
diff --git a/sysdeps/arm/fpu_control.h b/sysdeps/arm/fpu_control.h
new file mode 100644
index 0000000..635bc7d
--- /dev/null
+++ b/sysdeps/arm/fpu_control.h
@@ -0,0 +1,63 @@
+/* FPU control word definitions.  ARM VFP version.
+   Copyright (C) 2004, 2005, 2009 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _FPU_CONTROL_H
+#define _FPU_CONTROL_H
+
+#if !defined(_LIBC) && defined(__SOFTFP__)
+
+#define _FPU_RESERVED 0xffffffff
+#define _FPU_DEFAULT  0x00000000
+typedef unsigned int fpu_control_t;
+#define _FPU_GETCW(cw) 0
+#define _FPU_SETCW(cw) do { } while (0)
+extern fpu_control_t __fpu_control;
+
+#else
+
+/* masking of interrupts */
+#define _FPU_MASK_IM	0x00000100	/* invalid operation */
+#define _FPU_MASK_ZM	0x00000200	/* divide by zero */
+#define _FPU_MASK_OM	0x00000400	/* overflow */
+#define _FPU_MASK_UM	0x00000800	/* underflow */
+#define _FPU_MASK_PM	0x00001000	/* inexact */
+
+/* Some bits in the FPSCR are not yet defined.  They must be preserved when
+   modifying the contents.  */
+#define _FPU_RESERVED	0x0e08e0e0
+#define _FPU_DEFAULT    0x00000000
+/* Default + exceptions enabled. */
+#define _FPU_IEEE	(_FPU_DEFAULT | 0x00001f00)
+
+/* Type of the control word.  */
+typedef unsigned int fpu_control_t;
+
+/* Macros for accessing the hardware control word.  */
+/* This is fmrx %0, fpscr.  */
+#define _FPU_GETCW(cw) \
+  __asm__ __volatile__ ("mrc p10, 7, %0, cr1, cr0, 0" : "=r" (cw))
+/* This is fmxr fpscr, %0.  */
+#define _FPU_SETCW(cw) \
+  __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw))
+
+/* Default control word set at startup.  */
+extern fpu_control_t __fpu_control;
+
+#endif /* __SOFTFP__ */
+
+#endif /* _FPU_CONTROL_H */
diff --git a/sysdeps/arm/fraiseexcpt.c b/sysdeps/arm/fraiseexcpt.c
new file mode 100644
index 0000000..0a43688
--- /dev/null
+++ b/sysdeps/arm/fraiseexcpt.c
@@ -0,0 +1,109 @@
+/* Raise given exceptions.
+   Copyright (C) 2004, 2005, 2011 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fpu_control.h>
+#include <fenv.h>
+#include <float.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+feraiseexcept (int excepts)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      int fpscr;
+      const float fp_zero = 0.0, fp_one = 1.0, fp_max = FLT_MAX,
+                  fp_min = FLT_MIN, fp_1e32 = 1.0e32f, fp_two = 2.0,
+		  fp_three = 3.0;
+
+      /* Raise exceptions represented by EXPECTS.  But we must raise only
+	 one signal at a time.  It is important that if the overflow/underflow
+	 exception and the inexact exception are given at the same time,
+	 the overflow/underflow exception follows the inexact exception.  After
+	 each exception we read from the fpscr, to force the exception to be
+	 raised immediately.  */
+
+      /* There are additional complications because this file may be compiled
+         without VFP support enabled, and we also can't assume that the
+	 assembler has VFP instructions enabled. To get around this we use the
+	 generic coprocessor mnemonics and avoid asking GCC to put float values
+	 in VFP registers.  */
+
+      /* First: invalid exception.  */
+      if (FE_INVALID & excepts)
+	__asm__ __volatile__ (
+	  "ldc p10, cr0, %1\n\t"                        /* flds s0, %1  */
+	  "cdp p10, 8, cr0, cr0, cr0, 0\n\t"            /* fdivs s0, s0, s0  */
+	  "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr)  /* fmrx %0, fpscr  */
+			                : "m" (fp_zero)
+					: "s0");
+
+      /* Next: division by zero.  */
+      if (FE_DIVBYZERO & excepts)
+	__asm__ __volatile__ (
+	  "ldc p10, cr0, %1\n\t"                        /* flds s0, %1  */
+	  "ldcl p10, cr0, %2\n\t"                       /* flds s1, %2  */
+	  "cdp p10, 8, cr0, cr0, cr0, 1\n\t"            /* fdivs s0, s0, s1  */
+	  "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr)  /* fmrx %0, fpscr  */
+			                : "m" (fp_one), "m" (fp_zero)
+					: "s0", "s1");
+
+      /* Next: overflow.  */
+      if (FE_OVERFLOW & excepts)
+	/* There's no way to raise overflow without also raising inexact.  */
+	__asm__ __volatile__ (
+	  "ldc p10, cr0, %1\n\t"                        /* flds s0, %1  */
+	  "ldcl p10, cr0, %2\n\t"                       /* flds s1, %2  */
+	  "cdp p10, 3, cr0, cr0, cr0, 1\n\t"            /* fadds s0, s0, s1  */
+	  "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr)  /* fmrx %0, fpscr  */
+			                : "m" (fp_max), "m" (fp_1e32)
+					: "s0", "s1");
+
+      /* Next: underflow.  */
+      if (FE_UNDERFLOW & excepts)
+	__asm__ __volatile__ (
+	  "ldc p10, cr0, %1\n\t"                        /* flds s0, %1  */
+	  "ldcl p10, cr0, %2\n\t"                       /* flds s1, %2  */
+	  "cdp p10, 8, cr0, cr0, cr0, 1\n\t"            /* fdivs s0, s0, s1  */
+	  "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr)  /* fmrx %0, fpscr  */
+			                : "m" (fp_min), "m" (fp_three)
+					: "s0", "s1");
+
+      /* Last: inexact.  */
+      if (FE_INEXACT & excepts)
+	__asm__ __volatile__ (
+	  "ldc p10, cr0, %1\n\t"                        /* flds s0, %1  */
+	  "ldcl p10, cr0, %2\n\t"                       /* flds s1, %2  */
+	  "cdp p10, 8, cr0, cr0, cr0, 1\n\t"            /* fdivs s0, s0, s1  */
+	  "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr)  /* fmrx %0, fpscr  */
+			                : "m" (fp_two), "m" (fp_three)
+					: "s0", "s1");
+
+      /* Success.  */
+      return 0;
+    }
+
+  /* Unsupported, so fail unless nothing needs to be done.  */
+  return (excepts != 0);
+}
+
+libm_hidden_def (feraiseexcept)
diff --git a/sysdeps/arm/fsetexcptflg.c b/sysdeps/arm/fsetexcptflg.c
new file mode 100644
index 0000000..bee51a9
--- /dev/null
+++ b/sysdeps/arm/fsetexcptflg.c
@@ -0,0 +1,59 @@
+/* Set floating-point environment exception handling.
+   Copyright (C) 1997,98,99,2000,01,05,08,11 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fenv.h>
+#include <math.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+__fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      fexcept_t temp;
+
+      /* Get the current environment.  */
+      _FPU_GETCW (temp);
+
+      /* Set the desired exception mask.  */
+      temp &= ~(excepts & FE_ALL_EXCEPT);
+      temp |= (*flagp & excepts & FE_ALL_EXCEPT);
+
+      /* Save state back to the FPU.  */
+      _FPU_SETCW (temp);
+
+      /* Success.  */
+      return 0;
+    }
+
+  /* Unsupported, so fail unless nothing needs to be done.  */
+  return (excepts != 0);
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__fesetexceptflag, __old_fesetexceptflag)
+compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2);
diff --git a/sysdeps/arm/ftestexcept.c b/sysdeps/arm/ftestexcept.c
new file mode 100644
index 0000000..06817d2
--- /dev/null
+++ b/sysdeps/arm/ftestexcept.c
@@ -0,0 +1,43 @@
+/* Test exception in current environment.
+   Copyright (C) 1997, 1998, 2005, 2010 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+fetestexcept (int excepts)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      fexcept_t temp;
+
+      /* Get current exceptions.  */
+      _FPU_GETCW(temp);
+
+      return temp & excepts & FE_ALL_EXCEPT;
+    }
+
+  /* Unsupported, return 0.  */
+  return 0;
+}
+libm_hidden_def (fetestexcept)
diff --git a/sysdeps/arm/jmpbuf-offsets.h b/sysdeps/arm/jmpbuf-offsets.h
new file mode 100644
index 0000000..642a965
--- /dev/null
+++ b/sysdeps/arm/jmpbuf-offsets.h
@@ -0,0 +1,19 @@
+/* Private macros for accessing __jmp_buf contents.  ARM EABI version.
+   Copyright (C) 2007 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define __JMP_BUF_SP		8
diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h
new file mode 100644
index 0000000..671d6b1
--- /dev/null
+++ b/sysdeps/arm/machine-gmon.h
@@ -0,0 +1,33 @@
+/* Machine-dependent definitions for profiling support.  ARM EABI version.
+   Copyright (C) 2008, 2009 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+
+/* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0, 
+   so we must use an assembly stub.  */
+
+/* We must not pollute the global namespace.  */
+#define mcount_internal __mcount_internal
+
+extern void mcount_internal (u_long frompc, u_long selfpc) internal_function;
+#define _MCOUNT_DECL(frompc, selfpc) \
+  void internal_function mcount_internal (u_long frompc, u_long selfpc)
+
+
+/* Define MCOUNT as empty since we have the implementation in another file.  */
+#define MCOUNT
diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure
index a496700..d98c167 100644
--- a/sysdeps/arm/preconfigure
+++ b/sysdeps/arm/preconfigure
@@ -7,7 +7,7 @@ arm*)
 		# Unfortunately it doesn't define any flags for implementations
 		# that you might pass to -mcpu or -mtune
 		# Note if you add patterns here you must ensure that
-		# an appropriate directory exists in sysdeps/arm/eabi
+		# an appropriate directory exists in sysdeps/arm
 		archcppflag=`echo "" |
 		$CC $CFLAGS $CPPFLAGS -E -dM - |
 		  grep __ARM_ARCH |
@@ -35,7 +35,7 @@ arm*)
 		  ;;
 		esac
 
-		machine=arm/eabi/$machine
+		machine=arm/$machine
 		if [ "${CFLAGS+set}" != "set" ]; then
 		  CFLAGS="-g -O2"
 		fi
diff --git a/sysdeps/arm/rtld-global-offsets.sym b/sysdeps/arm/rtld-global-offsets.sym
new file mode 100644
index 0000000..ff4e97f
--- /dev/null
+++ b/sysdeps/arm/rtld-global-offsets.sym
@@ -0,0 +1,7 @@
+#define SHARED 1
+
+#include <ldsodefs.h>
+
+#define rtld_global_ro_offsetof(mem) offsetof (struct rtld_global_ro, mem)
+
+RTLD_GLOBAL_RO_DL_HWCAP_OFFSET	rtld_global_ro_offsetof (_dl_hwcap)
diff --git a/sysdeps/arm/setfpucw.c b/sysdeps/arm/setfpucw.c
new file mode 100644
index 0000000..d0cea32
--- /dev/null
+++ b/sysdeps/arm/setfpucw.c
@@ -0,0 +1,46 @@
+/* Set the FPU control word.
+   Copyright (C) 1996, 1997, 1999, 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <math.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+void
+__setfpucw (fpu_control_t set)
+{
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+    {
+      fpu_control_t cw;
+
+      /* Fetch the current control word.  */
+      _FPU_GETCW (cw);
+
+      /* Preserve the reserved bits, and set the rest as the user
+	 specified (or the default, if the user gave zero).  */
+      cw &= _FPU_RESERVED;
+      cw |= set & ~_FPU_RESERVED;
+
+      _FPU_SETCW (cw);
+    }
+
+  /* Do nothing if a VFP unit isn't present.  */
+}
diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S
new file mode 100644
index 0000000..5e3f39c
--- /dev/null
+++ b/sysdeps/arm/setjmp.S
@@ -0,0 +1,98 @@
+/* setjmp for ARM.
+   Copyright (C) 1997, 1998, 2005, 2006, 2008 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+#define _SETJMP_H
+#define _ASM
+#include <bits/setjmp.h>
+#include <rtld-global-offsets.h>
+
+ENTRY (__sigsetjmp)
+	mov	ip, r0
+
+	/* Save registers */
+	stmia	ip!, {v1-v6, sl, fp, sp, lr}
+
+	/* Check if we have a VFP unit.  */
+#ifdef IS_IN_rtld
+	ldr	a3, 1f
+	ldr	a4, Lrtld_local_ro
+0:	add	a3, pc, a3
+	add	a3, a3, a4
+	ldr	a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+#else
+#ifdef PIC
+	ldr	a3, 1f
+	ldr	a4, Lrtld_global_ro
+0:	add	a3, pc, a3
+	ldr	a3, [a3, a4]
+	ldr	a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+#else
+	ldr	a3, Lhwcap
+	ldr	a3, [a3, #0]
+#endif
+#endif
+
+	tst	a3, #HWCAP_ARM_VFP
+	beq	Lno_vfp
+
+	/* Store the VFP registers.
+	   Don't use VFP instructions directly because this code
+	   is used in non-VFP multilibs.  */
+	/* Following instruction is vstmia ip!, {d8-d15}.  */
+	stc	p11, cr8, [ip], #64
+	/* Store the floating-point status register.  */
+	/* Following instruction is vmrs a4, fpscr.  */
+	mrc	p10, 7, a4, cr1, cr0, 0
+	str	a4, [ip], #4
+Lno_vfp:
+
+	tst	a3, #HWCAP_ARM_IWMMXT
+	beq	Lno_iwmmxt
+
+	/* Save the call-preserved iWMMXt registers.  */
+	/* Following instructions are wstrd wr10, [ip], #8 (etc.)  */
+	stcl	p1, cr10, [r12], #8
+	stcl	p1, cr11, [r12], #8
+	stcl	p1, cr12, [r12], #8
+	stcl	p1, cr13, [r12], #8
+	stcl	p1, cr14, [r12], #8
+	stcl	p1, cr15, [r12], #8
+Lno_iwmmxt:
+
+	/* Make a tail call to __sigjmp_save; it takes the same args.  */
+	B	PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
+
+#ifdef IS_IN_rtld
+1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - 8
+Lrtld_local_ro:
+	.long	C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
+#else
+#ifdef PIC
+1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - 8
+Lrtld_global_ro:
+	.long	C_SYMBOL_NAME(_rtld_global_ro)(GOT)
+#else
+Lhwcap:
+	.long	C_SYMBOL_NAME(_dl_hwcap)
+#endif
+#endif
+
+END (__sigsetjmp)
+
+hidden_def (__sigsetjmp)
diff --git a/sysdeps/unix/sysv/linux/arm/getcontext.S b/sysdeps/unix/sysv/linux/arm/getcontext.S
index 435eb12..116d6e8 100644
--- a/sysdeps/unix/sysv/linux/arm/getcontext.S
+++ b/sysdeps/unix/sysv/linux/arm/getcontext.S
@@ -48,7 +48,7 @@ ENTRY(__getcontext)
 	add     r2, r4, #UCONTEXT_SIGMASK
 	bl      PLTJMP(__sigprocmask)
 	
-	/* Store FP regs.  Much of the FP code is copied from arm/eabi/setjmp.S.  */
+	/* Store FP regs.  Much of the FP code is copied from arm/setjmp.S.  */
 
 #ifdef PIC
         ldr     r2, 1f
diff --git a/sysdeps/unix/sysv/linux/arm/setcontext.S b/sysdeps/unix/sysv/linux/arm/setcontext.S
index 78003f5..b472947 100644
--- a/sysdeps/unix/sysv/linux/arm/setcontext.S
+++ b/sysdeps/unix/sysv/linux/arm/setcontext.S
@@ -29,7 +29,7 @@ ENTRY(__setcontext)
 	mov	r4, r0
 	add	r0, r0, #UCONTEXT_REGSPACE
 
-        /* Restore the VFP registers.  Copied from arm/eabi/__longjmp.S.  */
+        /* Restore the VFP registers.  Copied from arm/__longjmp.S.  */
 #ifdef PIC
         ldr     r2, 1f
         ldr     r1, Lrtld_global_ro

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-21 16:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-21 16:34 Merge sysdeps/arm/eabi into sysdeps/arm Joseph S. Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).