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

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

I'll deal separately with merging sysdeps/arm/eabi into sysdeps/arm.

diff --git a/ChangeLog.arm b/ChangeLog.arm
index f16e691..43a595d 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,164 @@
+2012-04-21  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #13556]
+	* sysdeps/unix/sysv/linux/arm/socket.S: Remove.
+	* sysdeps/unix/sysv/linux/arm/syscalls.list (syscall): Remove.
+	(oldgetrlimit): Likewise.
+	(oldsetrlimit): Likewise.
+	(syscall): Likewise.
+	(msgget): Add syscall from eabi/syscalls.list.
+	(msgrcv): Likewise.
+	(msgsnd): Likewise.
+	(shmat): Likewise.
+	(shmdt): Likewise.
+	(shmget): Likewise.
+	(semop): Likewise.
+	(semtimedop): Likewise.
+	(semget): Likewise.
+	(accept): Likewise.
+	(bind): Likewise.
+	(connect): Likewise.
+	(getpeername): Likewise.
+	(getsockname): Likewise.
+	(getsockopt): Likewise.
+	(listen): Likewise.
+	(recv): Likewise.
+	(recvfrom): Likewise.
+	(recvmsg): Likewise.
+	(send): Likewise.
+	(sendmsg): Likewise.
+	(sendto): Likewise.
+	(setsockopt): Likewise.
+	(shutdown): Likewise.
+	(socket): Likewise.
+	(socketpair): Likewise.
+	* sysdeps/unix/sysv/linux/arm/eabi/syscalls.list: Remove.
+	* sysdeps/unix/sysv/linux/arm/Makefile [subdir = csu]
+	(CFLAGS-libc-start.c): Add setting from eabi/Makefile.
+	[subdir = rt] (librt-sysdep_routines): Likewise.
+	[subdir = rt] (librt-shared-only-routines): Likewise.
+	[subdir = nptl] (libpthread-sysdep_routines): Likewise.
+	[subdir = nptl] (libpthread-shared-only-routines): Likewise.
+	[subdir = resolv] (libanl-sysdep_routines): Likewise.
+	[subdir = resolv] (libanl-shared-only-routines): Likewise.
+	[subdir = csu] (sysdep_routines): Likewise.
+	[subdir = nscd] (nscd-modules): Likewise.
+	[subdir = nss] (libnss_db-sysdep_routines): Likewise.
+	[subdir = nss] (libnss_db-shared-only-routines): Likewise.
+	[subdir = posix] (LDFLAGS-tst-rfc3484): Likewise.
+	[subdir = posix] (LDFLAGS-tst-rfc3484-2): Likewise.
+	[subdir = posix] (LDFLAGS-tst-rfc3484-3): Likewise.
+	* sysdeps/unix/sysv/linux/arm/eabi/Makefile: Remove.
+	* sysdeps/unix/sysv/linux/arm/sysdep.h (__NR_SYSCALL_BASE): Add
+	test from eabi/sysdep.h.
+	(__NR_stime): Add #undef from eabi/sysdep.h.
+	(__NR_alarm): Likewise.
+	(DO_CALL): Use definition from eabi/sysdep.h.
+	(DOARGS_0): Likewise.
+	(DOARGS_1): Likewise.
+	(DOARGS_2): Likewise.
+	(DOARGS_3): Likewise.
+	(DOARGS_4): Likewise.
+	(DOARGS_5): Likewise.
+	(DOARGS_6): Likewise.
+	(DOARGS_7): Likewise.
+	(UNDOARGS_0): Likewise.
+	(UNDOARGS_1): Likewise.
+	(UNDOARGS_2): Likewise.
+	(UNDOARGS_3): Likewise.
+	(UNDOARGS_4): Likewise.
+	(UNDOARGS_5): Likewise.
+	(UNDOARGS_6): Likewise.
+	(UNDOARGS_7): Likewise.
+	(INTERNAL_SYSCALL_RAW): Likewise.
+	[__thumb__] (LOAD_ARGS_7): Do not define.
+	[__thumb__] (ASM_ARGS_7): Likewise.
+	(INTERNAL_SYSCALL_NCS): Use definition from eabi/sysdep.h.
+	(INTERNAL_SYSCALL_NCS_0): Remove.
+	(INTERNAL_SYSCALL_NCS_1): Likewise.
+	(INTERNAL_SYSCALL_NCS_2): Likewise.
+	(INTERNAL_SYSCALL_NCS_3): Likewise.
+	(INTERNAL_SYSCALL_NCS_4): Likewise.
+	(INTERNAL_SYSCALL_NCS_5): Likewise.
+	* sysdeps/unix/sysv/linux/arm/eabi/sysdep.h: Remove.
+	* sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S: Move to ...
+	* sysdeps/unix/sysv/linux/arm/____longjmp_chk.S: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/configure.in: Move to ...
+	* sysdeps/unix/sysv/linux/arm/configure.in: ... here.  Update
+	comment.
+	* sysdeps/unix/sysv/linux/arm/eabi/configure: Move to ...
+	* sysdeps/unix/sysv/linux/arm/configure: ... here.  Regenerate.
+	* sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/ftruncate64.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/getcontext.S: Move to ...
+	* sysdeps/unix/sysv/linux/arm/getcontext.S: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S: Move to ...
+	* sysdeps/unix/sysv/linux/arm/internal_accept4.S: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S: Move to ...
+	* sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S: Move to ...
+	* sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S: Move to ...
+	* sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/makecontext.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/makecontext.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/mmap64.S: Move to ...
+	* sysdeps/unix/sysv/linux/arm/mmap64.S: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/msgctl.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/msgctl.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/oldgetrlimit.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/oldsetrlimit.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/pread.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/pread.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/pread64.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/pread64.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/pwrite.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/pwrite.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/pwrite64.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/readahead.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/readahead.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/semctl.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/semctl.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/setcontext.S: Move to ...
+	* sysdeps/unix/sysv/linux/arm/setcontext.S: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/shmctl.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/shmctl.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S: Move to ...
+	* sysdeps/unix/sysv/linux/arm/sigrestorer.S: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S: Move to ...
+	* sysdeps/unix/sysv/linux/arm/swapcontext.S: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/syscall.S: Move to ...
+	* sysdeps/unix/sysv/linux/arm/syscall.S: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/truncate64.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/umount.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/umount.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile: Move to ...
+	* sysdeps/unix/sysv/linux/arm/nptl/Makefile: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in: Move to ...
+	* sysdeps/unix/sysv/linux/arm/nptl/configure.in: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/configure: Move to ...
+	* sysdeps/unix/sysv/linux/arm/nptl/configure: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c:
+	Move to ...
+	* sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c:
+	... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c:
+	Move to ...
+	* sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h: Move to ...
+	* sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c:
+	Move to ...
+	* sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c: Move to ...
+	* sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c: ... here.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h: Move to ...
+	* sysdeps/unix/sysv/linux/arm/nptl/unwind.h: ... here.
+
 2012-04-16  Andreas Jaeger  <aj@suse.de>
 
 	* sysdeps/unix/sysv/linux/arm/ldsodefs.h: Undefine
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 01f51c0..6e0523d 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2012-04-21  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/mips32/readahead.c: Include
+	sysdeps/unix/sysv/linux/arm/readahead.c not
+	sysdeps/unix/sysv/linux/arm/eabi/readahead.c.
+
 2012-03-28  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/mips/bits/mman.h (MAP_STACK): Define.
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index a981736..fb1e3a5 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -1,4 +1,9 @@
 ifeq ($(subdir),csu)
+# In order for unwinding to fail when it falls out of main, we need a
+# cantunwind marker.  There's one in start.S.  To make sure we reach it, add
+# unwind tables for __libc_start_main.
+CFLAGS-libc-start.c += -fexceptions
+
 sysdep_routines += aeabi_read_tp libc-aeabi_read_tp
 static-only-routines += aeabi_read_tp
 shared-only-routines += libc-aeabi_read_tp
@@ -24,3 +29,39 @@ endif
 ifeq ($(subdir),stdlib)
 gen-as-const-headers += ucontext_i.sym
 endif
+
+# Add a syscall function to each library that needs one.
+
+ifeq ($(subdir),rt)
+librt-sysdep_routines += libc-do-syscall
+librt-shared-only-routines += libc-do-syscall
+endif
+
+ifeq ($(subdir),nptl)
+libpthread-sysdep_routines += libc-do-syscall
+libpthread-shared-only-routines += libc-do-syscall
+endif
+
+ifeq ($(subdir),resolv)
+libanl-sysdep_routines += libc-do-syscall
+libanl-shared-only-routines += libc-do-syscall
+endif
+
+ifeq ($(subdir),csu)
+sysdep_routines += libc-do-syscall
+endif
+
+ifeq ($(subdir),nscd)
+nscd-modules += libc-do-syscall
+endif
+
+ifeq ($(subdir),nss)
+libnss_db-sysdep_routines += libc-do-syscall
+libnss_db-shared-only-routines += libc-do-syscall
+endif
+
+ifeq ($(subdir),posix)
+LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o
+LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o
+LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o
+endif
diff --git a/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S
new file mode 100644
index 0000000..8ec4152
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S
@@ -0,0 +1,90 @@
+/* Copyright (C) 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>
+
+	.section .rodata.str1.1,"aMS",%progbits,1
+	.type	longjmp_msg,%object
+longjmp_msg:
+	.string "longjmp causes uninitialized stack frame"
+	.size	longjmp_msg, .-longjmp_msg
+	.text
+
+#define __longjmp ____longjmp_chk
+
+#ifdef PIC
+# define CALL_FAIL						\
+	ldr	sl, .L_GOT;					\
+	cfi_undefined (sl);					\
+.L_GOT_OFF:							\
+	add	sl, pc, sl;					\
+	ldr	r0, .Lstr;					\
+	add	r0, sl, r0;					\
+	B	PLTJMP(HIDDEN_JUMPTARGET(__fortify_fail));	\
+.L_GOT:								\
+	.word	_GLOBAL_OFFSET_TABLE_-(.L_GOT_OFF+8);		\
+.Lstr:								\
+	.word	longjmp_msg(GOTOFF);
+#else
+# define CALL_FAIL					\
+	ldr	r0, .Lstr;				\
+	B	HIDDEN_JUMPTARGET(__fortify_fail);	\
+.Lstr:							\
+	.word	longjmp_msg;
+#endif
+
+#define CHECK_SP(reg)				\
+	cfi_remember_state;			\
+	cmp	sp, reg;			\
+	bls	.Lok;				\
+	str	r7, [sp, #-4]!;			\
+	cfi_adjust_cfa_offset (4);		\
+	cfi_rel_offset (r7, 0);			\
+	mov	r5, r0;				\
+	cfi_undefined (r5);			\
+	mov	r7, #SYS_ify(sigaltstack);	\
+	mov	r0, #0;				\
+	sub	sp, sp, #12; /* == sizeof (stack_t) */ \
+	cfi_adjust_cfa_offset (12);		\
+	cfi_remember_state;			\
+	mov	r1, sp;				\
+	swi	#0;				\
+	cmp	r0, #0;				\
+	bne	.Lok2;				\
+	ldr	r1, [sp, #4];			\
+	tst	r1, #1;				\
+	beq	.Lfail;				\
+	ldr	r2, [sp, #0];			\
+	ldr	r3, [sp, #8];			\
+	add	r2, r2, r3;			\
+	sub	r2, r2, reg;			\
+	cmp	r2, r3;				\
+	bhi	.Lok2;				\
+.Lfail:						\
+	add	sp, sp, #12;			\
+	cfi_adjust_cfa_offset (-12);		\
+	ldr	r7, [sp], #4;			\
+	cfi_adjust_cfa_offset (-4);		\
+	cfi_restore (r7);			\
+	CALL_FAIL				\
+	cfi_restore_state;			\
+.Lok2:						\
+	mov	r0, r5;				\
+	cfi_restore_state;			\
+.Lok:
+
+#include <__longjmp.S>
diff --git a/sysdeps/unix/sysv/linux/arm/configure b/sysdeps/unix/sysv/linux/arm/configure
new file mode 100644
index 0000000..5b5f4c9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/configure
@@ -0,0 +1,6 @@
+# This file is generated from configure.in by Autoconf.  DO NOT EDIT!
+ # Local configure fragment for sysdeps/unix/sysv/linux/arm.
+
+arch_minimum_kernel=2.6.16
+libc_cv_gcc_unwind_find_fde=no
+CFLAGS=${CFLAGS% -fno-unwind-tables}
diff --git a/sysdeps/unix/sysv/linux/arm/configure.in b/sysdeps/unix/sysv/linux/arm/configure.in
new file mode 100644
index 0000000..b57c4e3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/configure.in
@@ -0,0 +1,6 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux/arm.
+
+arch_minimum_kernel=2.6.16
+libc_cv_gcc_unwind_find_fde=no
+CFLAGS=${CFLAGS% -fno-unwind-tables}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/Makefile b/sysdeps/unix/sysv/linux/arm/eabi/Makefile
deleted file mode 100644
index b7baae9..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-ifeq ($(subdir),csu)
-# In order for unwinding to fail when it falls out of main, we need a
-# cantunwind marker.  There's one in start.S.  To make sure we reach it, add
-# unwind tables for __libc_start_main.
-CFLAGS-libc-start.c += -fexceptions
-endif
-
-# Add a syscall function to each library that needs one.
-
-ifeq ($(subdir),rt)
-librt-sysdep_routines += libc-do-syscall
-librt-shared-only-routines += libc-do-syscall
-endif
-
-ifeq ($(subdir),nptl)
-libpthread-sysdep_routines += libc-do-syscall
-libpthread-shared-only-routines += libc-do-syscall
-endif
-
-ifeq ($(subdir),resolv)
-libanl-sysdep_routines += libc-do-syscall
-libanl-shared-only-routines += libc-do-syscall
-endif
-
-ifeq ($(subdir),csu)
-sysdep_routines += libc-do-syscall
-endif
-
-ifeq ($(subdir),nscd)
-nscd-modules += libc-do-syscall
-endif
-
-ifeq ($(subdir),nss)
-libnss_db-sysdep_routines += libc-do-syscall
-libnss_db-shared-only-routines += libc-do-syscall
-endif
-
-ifeq ($(subdir),posix)
-LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o
-LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o
-LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o
-endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
deleted file mode 100644
index 8ec4152..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
+++ /dev/null
@@ -1,90 +0,0 @@
-/* Copyright (C) 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>
-
-	.section .rodata.str1.1,"aMS",%progbits,1
-	.type	longjmp_msg,%object
-longjmp_msg:
-	.string "longjmp causes uninitialized stack frame"
-	.size	longjmp_msg, .-longjmp_msg
-	.text
-
-#define __longjmp ____longjmp_chk
-
-#ifdef PIC
-# define CALL_FAIL						\
-	ldr	sl, .L_GOT;					\
-	cfi_undefined (sl);					\
-.L_GOT_OFF:							\
-	add	sl, pc, sl;					\
-	ldr	r0, .Lstr;					\
-	add	r0, sl, r0;					\
-	B	PLTJMP(HIDDEN_JUMPTARGET(__fortify_fail));	\
-.L_GOT:								\
-	.word	_GLOBAL_OFFSET_TABLE_-(.L_GOT_OFF+8);		\
-.Lstr:								\
-	.word	longjmp_msg(GOTOFF);
-#else
-# define CALL_FAIL					\
-	ldr	r0, .Lstr;				\
-	B	HIDDEN_JUMPTARGET(__fortify_fail);	\
-.Lstr:							\
-	.word	longjmp_msg;
-#endif
-
-#define CHECK_SP(reg)				\
-	cfi_remember_state;			\
-	cmp	sp, reg;			\
-	bls	.Lok;				\
-	str	r7, [sp, #-4]!;			\
-	cfi_adjust_cfa_offset (4);		\
-	cfi_rel_offset (r7, 0);			\
-	mov	r5, r0;				\
-	cfi_undefined (r5);			\
-	mov	r7, #SYS_ify(sigaltstack);	\
-	mov	r0, #0;				\
-	sub	sp, sp, #12; /* == sizeof (stack_t) */ \
-	cfi_adjust_cfa_offset (12);		\
-	cfi_remember_state;			\
-	mov	r1, sp;				\
-	swi	#0;				\
-	cmp	r0, #0;				\
-	bne	.Lok2;				\
-	ldr	r1, [sp, #4];			\
-	tst	r1, #1;				\
-	beq	.Lfail;				\
-	ldr	r2, [sp, #0];			\
-	ldr	r3, [sp, #8];			\
-	add	r2, r2, r3;			\
-	sub	r2, r2, reg;			\
-	cmp	r2, r3;				\
-	bhi	.Lok2;				\
-.Lfail:						\
-	add	sp, sp, #12;			\
-	cfi_adjust_cfa_offset (-12);		\
-	ldr	r7, [sp], #4;			\
-	cfi_adjust_cfa_offset (-4);		\
-	cfi_restore (r7);			\
-	CALL_FAIL				\
-	cfi_restore_state;			\
-.Lok2:						\
-	mov	r0, r5;				\
-	cfi_restore_state;			\
-.Lok:
-
-#include <__longjmp.S>
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure b/sysdeps/unix/sysv/linux/arm/eabi/configure
deleted file mode 100644
index c7e20cf..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/configure
+++ /dev/null
@@ -1,6 +0,0 @@
-# This file is generated from configure.in by Autoconf.  DO NOT EDIT!
- # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
-
-arch_minimum_kernel=2.6.16
-libc_cv_gcc_unwind_find_fde=no
-CFLAGS=${CFLAGS% -fno-unwind-tables}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure.in b/sysdeps/unix/sysv/linux/arm/eabi/configure.in
deleted file mode 100644
index cc0e9b5..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/configure.in
+++ /dev/null
@@ -1,6 +0,0 @@
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
-
-arch_minimum_kernel=2.6.16
-libc_cv_gcc_unwind_find_fde=no
-CFLAGS=${CFLAGS% -fno-unwind-tables}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c b/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c
deleted file mode 100644
index ad5eb18..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright (C) 1997,1998,1999,2000,2001,2003, 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 <sys/types.h>
-#include <errno.h>
-#include <endian.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-#include "kernel-features.h"
-
-#ifdef __NR_ftruncate64
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-/* The variable is shared between all wrappers around *truncate64 calls.  */
-extern int __have_no_truncate64;
-#endif
-
-
-/* Truncate the file FD refers to to LENGTH bytes.  */
-int
-__ftruncate64 (int fd, off64_t length)
-{
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if (! __have_no_truncate64)
-#endif
-    {
-      unsigned int low = length & 0xffffffff;
-      unsigned int high = length >> 32;
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      int saved_errno = errno;
-#endif
-      int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0,
-				   __LONG_LONG_PAIR (high, low));
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      if (result != -1 || errno != ENOSYS)
-#endif
-	return result;
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      __set_errno (saved_errno);
-      __have_no_truncate64 = 1;
-#endif
-    }
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if ((off_t) length != length)
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-  return __ftruncate (fd, (off_t) length);
-#endif
-}
-weak_alias (__ftruncate64, ftruncate64)
-
-#else
-/* Use the generic implementation.  */
-# include <misc/ftruncate64.c>
-#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/getcontext.S b/sysdeps/unix/sysv/linux/arm/eabi/getcontext.S
deleted file mode 100644
index 435eb12..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/getcontext.S
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Copyright (C) 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/>.  */
-
-#include <sysdep.h>
-#include <rtld-global-offsets.h>
-
-#include "ucontext_i.h"
-
-	.syntax unified
-	.text
-
-/* int getcontext (ucontext_t *ucp) */
-
-ENTRY(__getcontext)
-	/* No need to save r0-r3, d0-d7, or d16-d31.  */
-	add	r1, r0, #MCONTEXT_ARM_R4
-	stmia   r1, {r4-r11}
-
-	/* Save R13 separately as Thumb can't STM it.  */
-	str     r13, [r0, #MCONTEXT_ARM_SP]
-	str     r14, [r0, #MCONTEXT_ARM_LR]
-	/* Return to LR */
-	str     r14, [r0, #MCONTEXT_ARM_PC]
-	/* Return zero */
-	mov     r2, #0
-	str     r2, [r0, #MCONTEXT_ARM_R0]
-
-	/* Save ucontext_t * across the next call.  */
-	mov	r4, r0
-	
-	/* __sigprocmask(SIG_BLOCK, NULL, &(ucontext->uc_sigmask)) */
-	mov     r0, #SIG_BLOCK
-	mov     r1, #0
-	add     r2, r4, #UCONTEXT_SIGMASK
-	bl      PLTJMP(__sigprocmask)
-	
-	/* Store FP regs.  Much of the FP code is copied from arm/eabi/setjmp.S.  */
-
-#ifdef PIC
-        ldr     r2, 1f
-        ldr     r1, Lrtld_global_ro
-0:      add     r2, pc, r2
-        ldr     r2, [r2, r1]
-        ldr     r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
-        ldr     r2, Lhwcap
-        ldr     r2, [r2, #0]
-#endif
-
-	add	r0, r4, #UCONTEXT_REGSPACE
-
-        tst     r2, #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 r0!, {d8-d15}.  */
-        stc     p11, cr8, [r0], #64
-        /* Store the floating-point status register.  */
-        /* Following instruction is vmrs r1, fpscr.  */
-        mrc     p10, 7, r1, cr1, cr0, 0
-        str     r1, [r0], #4
-Lno_vfp:
-
-        tst     r2, #HWCAP_ARM_IWMMXT
-        beq     Lno_iwmmxt
-
-        /* Save the call-preserved iWMMXt registers.  */
-        /* Following instructions are wstrd wr10, [r0], #8 (etc.)  */
-        stcl    p1, cr10, [r0], #8
-        stcl    p1, cr11, [r0], #8
-        stcl    p1, cr12, [r0], #8
-        stcl    p1, cr13, [r0], #8
-        stcl    p1, cr14, [r0], #8
-        stcl    p1, cr15, [r0], #8
-Lno_iwmmxt:
-
-	/* Restore the clobbered R4 and LR.  */
-	ldr	r14, [r4, #MCONTEXT_ARM_LR]
-	ldr	r4, [r4, #MCONTEXT_ARM_R4]
-
-	mov	r0, #0
-
-	DO_RET(r14)
-
-END(__getcontext)
-
-#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
-
-
-weak_alias(__getcontext, getcontext)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S b/sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S
deleted file mode 100644
index eeb5f50..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S
+++ /dev/null
@@ -1,6 +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
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S b/sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S
deleted file mode 100644
index eeb5f50..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S
+++ /dev/null
@@ -1,6 +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
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S b/sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S
deleted file mode 100644
index eeb5f50..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S
+++ /dev/null
@@ -1,6 +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
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S b/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S
deleted file mode 100644
index 0ec8173..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright (C) 2010-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/>.  */
-
-#include <sysdep.h>
-
-/* Out-of-line syscall stub.  We expect the system call number in ip
-   and return the raw result in r0.  No registers are clobbered.
-   We could avoid using the stack for this, but the goal is accurate
-   unwind information - and while there is a reserved prefix in the
-   ARM unwind tables for register to register moves, the actual opcodes
-   are not defined.  */
-
-#if defined(__thumb__)
-	.thumb
-	.syntax unified
-	.hidden __libc_do_syscall
-
-#undef CALL_MCOUNT
-#define CALL_MCOUNT
-
-ENTRY (__libc_do_syscall)
-	.fnstart
-	push	{r7, lr}
-	.save	{r7, lr}
-	cfi_adjust_cfa_offset (8)
-	cfi_rel_offset (r7, 0)
-	cfi_rel_offset (lr, 4)
-	mov	r7, ip
-	swi	0x0
-	pop	{r7, pc}
-	.fnend
-END (__libc_do_syscall)
-
-#endif /* __thumb__ */
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/makecontext.c b/sysdeps/unix/sysv/linux/arm/eabi/makecontext.c
deleted file mode 100644
index d6ae6f0..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/makecontext.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright (C) 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/>.  */
-
-#include <stdarg.h>
-#include <ucontext.h>
-
-/* Number of arguments that go in registers.  */
-#define NREG_ARGS  4
-
-/* Take a context previously prepared via getcontext() and set to
-   call func() with the given int only args.  */
-void
-__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
-{
-  extern void __startcontext (void);
-  unsigned long *funcstack;
-  va_list vl;
-  unsigned long *regptr;
-  unsigned int reg;
-  int misaligned;
-
-  /* Start at the top of stack.  */
-  funcstack = (unsigned long *) (ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
-
-  /* Ensure the stack stays eight byte aligned.  */
-  misaligned = ((unsigned long) funcstack & 4) != 0;
-
-  if ((argc > NREG_ARGS) && (argc & 1) != 0)
-    misaligned = !misaligned;
-
-  if (misaligned)
-    funcstack -= 1;
-
-  va_start (vl, argc);
-
-  /* Reserve space for the on-stack arguments.  */
-  if (argc > NREG_ARGS)
-    funcstack -= (argc - NREG_ARGS);
-
-  ucp->uc_mcontext.arm_sp = (unsigned long) funcstack;
-  ucp->uc_mcontext.arm_pc = (unsigned long) func;
-
-  /* Exit to startcontext() with the next context in R4 */
-  ucp->uc_mcontext.arm_r4 = (unsigned long) ucp->uc_link;
-  ucp->uc_mcontext.arm_lr = (unsigned long) __startcontext;
-
-  /* The first four arguments go into registers.  */
-  regptr = &(ucp->uc_mcontext.arm_r0);
-
-  for (reg = 0; (reg < argc) && (reg < NREG_ARGS); reg++)
-    *regptr++ = va_arg (vl, unsigned long);
-
-  /* And the remainder on the stack.  */
-  for (; reg < argc; reg++)
-    *funcstack++ = va_arg (vl, unsigned long);
-
-  va_end (vl);
-}
-weak_alias (__makecontext, makecontext)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S b/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S
deleted file mode 100644
index be4dd52..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Copyright (C) 2000, 2003, 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/>.  */
-
-#include <sysdep.h>
-
-#define	EINVAL		22
-
-#ifdef __ARMEB__
-# define LOW_OFFSET      8 + 4
-/* The initial + 4 is for the stack postdecrement.  */
-# define HIGH_OFFSET 4 + 8 + 0
-#else
-# define LOW_OFFSET      8 + 0
-# define HIGH_OFFSET 4 + 8 + 4
-#endif
-
-	/* The mmap2 system call takes six arguments, all in registers.  */
-	.text
-ENTRY (__mmap64)
-	ldr	ip, [sp, $LOW_OFFSET]
-	str	r5, [sp, #-4]!
-	cfi_adjust_cfa_offset (4)
-	cfi_rel_offset (r5, 0)
-	ldr	r5, [sp, $HIGH_OFFSET]
-	str	r4, [sp, #-4]!
-	cfi_adjust_cfa_offset (4)
-	cfi_rel_offset (r4, 0)
-	cfi_remember_state
-	movs	r4, ip, lsl $20		@ check that offset is page-aligned
-	mov	ip, ip, lsr $12
-	moveqs	r4, r5, lsr $12		@ check for overflow
-	bne	.Linval
-	ldr	r4, [sp, $8]		@ load fd
-	orr	r5, ip, r5, lsl $20	@ compose page offset
-	DO_CALL (mmap2, 0)
-	cmn	r0, $4096
-	ldmfd	sp!, {r4, r5}
-	cfi_adjust_cfa_offset (-8)
-	cfi_restore (r4)
-	cfi_restore (r5)
-	RETINSTR(cc, lr)
-	b	PLTJMP(syscall_error)
-
-	cfi_restore_state
-.Linval:
-	mov	r0, $-EINVAL
-	ldmfd	sp!, {r4, r5}
-	cfi_adjust_cfa_offset (-8)
-	cfi_restore (r4)
-	cfi_restore (r5)
-	b	PLTJMP(syscall_error)
-PSEUDO_END (__mmap64)
-
-weak_alias (__mmap64, mmap64)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c b/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c
deleted file mode 100644
index 38aedad..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/alpha/msgctl.c>
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile b/sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile
deleted file mode 100644
index ef8076c..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-ifeq ($(subdir),rt)
-librt-sysdep_routines += rt-aeabi_unwind_cpp_pr1
-librt-shared-only-routines += rt-aeabi_unwind_cpp_pr1
-endif
-
-ifeq ($(subdir),nptl)
-libpthread-sysdep_routines += nptl-aeabi_unwind_cpp_pr1
-libpthread-shared-only-routines += nptl-aeabi_unwind_cpp_pr1
-
-# This test relies on compiling part of the binary with EH information,
-# part without, and unwinding through.  The .ARM.exidx tables have
-# start addresses for EH regions, but no end addresses.  Every
-# region an exception needs to propogate through must have unwind
-# information, or a previous function's unwind table may be used
-# by mistake.
-tests := $(filter-out tst-cleanupx4,$(tests))
-endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure b/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure
deleted file mode 100644
index 5182699..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure
+++ /dev/null
@@ -1,4 +0,0 @@
-# This file is generated from configure.in by Autoconf.  DO NOT EDIT!
-
-libc_cv_gcc_exceptions=yes
-exceptions=-fexceptions
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in b/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in
deleted file mode 100644
index 22f6f4b..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in
+++ /dev/null
@@ -1,8 +0,0 @@
-dnl configure fragment for NPTL and ARM/Linux EABI.
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-
-dnl The normal configure check for gcc -fexecptions fails because it can't
-dnl find __aeabi_unwind_cpp_pr0.  Work around this here; our GCC definitely
-dnl has -fexceptions.
-libc_cv_gcc_exceptions=yes
-exceptions=-fexceptions
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c
deleted file mode 100644
index 7b83522..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <aeabi_unwind_cpp_pr1.c>
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c
deleted file mode 100644
index 7b83522..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <aeabi_unwind_cpp_pr1.c>
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
deleted file mode 100644
index c26bec3..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
+++ /dev/null
@@ -1,251 +0,0 @@
-/* Copyright (C) 2003, 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/>.  */
-
-#include <sysdep.h>
-#include <tls.h>
-#ifndef __ASSEMBLER__
-# include <nptl/pthreadP.h>
-#endif
-
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
-
-/* NOTE: We do mark syscalls with unwind annotations, for the benefit of
-   cancellation; but they're really only accurate at the point of the
-   syscall.  The ARM unwind directives are not rich enough without adding
-   a custom personality function.  */
-
-# undef PSEUDO
-# define PSEUDO(name, syscall_name, args)				\
-  .section ".text";							\
-    PSEUDO_PROLOGUE;							\
-  .type __##syscall_name##_nocancel,%function;				\
-  .globl __##syscall_name##_nocancel;					\
-  __##syscall_name##_nocancel:						\
-    .cfi_sections .debug_frame;						\
-    cfi_startproc;							\
-    DO_CALL (syscall_name, args);					\
-    cmn r0, $4096;							\
-    PSEUDO_RET;								\
-    cfi_endproc;							\
-  .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel;	\
-  ENTRY (name);								\
-    SINGLE_THREAD_P;							\
-    DOARGS_##args;							\
-    bne .Lpseudo_cancel;						\
-    cfi_remember_state;							\
-    ldr r7, =SYS_ify (syscall_name);					\
-    swi 0x0;								\
-    UNDOARGS_##args;							\
-    cmn r0, $4096;							\
-    PSEUDO_RET;								\
-    cfi_restore_state;							\
-  .Lpseudo_cancel:							\
-    .fnstart;		/* matched by the .fnend in UNDOARGS below.  */	\
-    DOCARGS_##args;	/* save syscall args etc. around CENABLE.  */	\
-    CENABLE;								\
-    mov ip, r0;		/* put mask in safe place.  */			\
-    UNDOCARGS_##args;	/* restore syscall args.  */			\
-    ldr r7, =SYS_ify (syscall_name);					\
-    swi 0x0;		/* do the call.  */				\
-    mov r7, r0;		/* save syscall return value.  */		\
-    mov r0, ip;		/* get mask back.  */				\
-    CDISABLE;								\
-    mov r0, r7;		/* retrieve return value.  */			\
-    RESTORE_LR_##args;							\
-    UNDOARGS_##args;							\
-    cmn r0, $4096
-
-/* DOARGS pushes eight bytes on the stack for five arguments, twelve bytes for
-   six arguments, and four bytes for fewer.  In order to preserve doubleword
-   alignment, sometimes we must save an extra register.  */
-
-# define RESTART_UNWIND \
-  .fnend; \
-  .fnstart; \
-  .save {r7}; \
-  .save {lr}
-
-# define DOCARGS_0 \
-  .save {r7}; \
-  str lr, [sp, #-4]!; \
-  cfi_adjust_cfa_offset (4); \
-  cfi_rel_offset (lr, 0); \
-  .save {lr}
-# define UNDOCARGS_0
-# define RESTORE_LR_0 \
-  ldr lr, [sp], #4; \
-  cfi_adjust_cfa_offset (-4); \
-  cfi_restore (lr)
-
-# define DOCARGS_1 \
-  .save {r7}; \
-  stmfd sp!, {r0, r1, lr}; \
-  cfi_adjust_cfa_offset (12); \
-  cfi_rel_offset (lr, 8); \
-  .save {lr}; \
-  .pad #8
-# define UNDOCARGS_1 \
-  ldr r0, [sp], #8; \
-  cfi_adjust_cfa_offset (-8); \
-  RESTART_UNWIND
-# define RESTORE_LR_1 \
-  RESTORE_LR_0
-
-# define DOCARGS_2 \
-  .save {r7}; \
-  stmfd sp!, {r0, r1, lr}; \
-  cfi_adjust_cfa_offset (12); \
-  cfi_rel_offset (lr, 8); \
-  .save {lr}; \
-  .pad #8
-# define UNDOCARGS_2 \
-  ldmfd sp!, {r0, r1}; \
-  cfi_adjust_cfa_offset (-8); \
-  RESTART_UNWIND
-# define RESTORE_LR_2 \
-  RESTORE_LR_0
-
-# define DOCARGS_3 \
-  .save {r7}; \
-  stmfd sp!, {r0, r1, r2, r3, lr}; \
-  cfi_adjust_cfa_offset (20); \
-  cfi_rel_offset (lr, 16); \
-  .save {lr}; \
-  .pad #16
-# define UNDOCARGS_3 \
-  ldmfd sp!, {r0, r1, r2, r3}; \
-  cfi_adjust_cfa_offset (-16); \
-  RESTART_UNWIND
-# define RESTORE_LR_3 \
-  RESTORE_LR_0
-
-# define DOCARGS_4 \
-  .save {r7}; \
-  stmfd sp!, {r0, r1, r2, r3, lr}; \
-  cfi_adjust_cfa_offset (20); \
-  cfi_rel_offset (lr, 16); \
-  .save {lr}; \
-  .pad #16
-# define UNDOCARGS_4 \
-  ldmfd sp!, {r0, r1, r2, r3}; \
-  cfi_adjust_cfa_offset (-16); \
-  RESTART_UNWIND
-# define RESTORE_LR_4 \
-  RESTORE_LR_0
-
-/* r4 is only stmfd'ed for correct stack alignment.  */
-# define DOCARGS_5 \
-  .save {r4, r7}; \
-  stmfd sp!, {r0, r1, r2, r3, r4, lr}; \
-  cfi_adjust_cfa_offset (24); \
-  cfi_rel_offset (lr, 20); \
-  .save {lr}; \
-  .pad #20
-# define UNDOCARGS_5 \
-  ldmfd sp!, {r0, r1, r2, r3}; \
-  cfi_adjust_cfa_offset (-16); \
-  .fnend; \
-  .fnstart; \
-  .save {r4, r7}; \
-  .save {lr}; \
-  .pad #4
-# define RESTORE_LR_5 \
-  ldmfd sp!, {r4, lr}; \
-  cfi_adjust_cfa_offset (-8); \
-  /* r4 will be marked as restored later.  */ \
-  cfi_restore (lr)
-
-# define DOCARGS_6 \
-  .save {r4, r5, r7}; \
-  stmfd sp!, {r0, r1, r2, r3, lr}; \
-  cfi_adjust_cfa_offset (20); \
-  cfi_rel_offset (lr, 16); \
-  .save {lr}; \
-  .pad #16
-# define UNDOCARGS_6 \
-  ldmfd sp!, {r0, r1, r2, r3}; \
-  cfi_adjust_cfa_offset (-16); \
-  .fnend; \
-  .fnstart; \
-  .save {r4, r5, r7}; \
-  .save {lr};
-# define RESTORE_LR_6 \
-  RESTORE_LR_0
-
-# ifdef IS_IN_libpthread
-#  define CENABLE	bl PLTJMP(__pthread_enable_asynccancel)
-#  define CDISABLE	bl PLTJMP(__pthread_disable_asynccancel)
-#  define __local_multiple_threads __pthread_multiple_threads
-# elif !defined NOT_IN_libc
-#  define CENABLE	bl PLTJMP(__libc_enable_asynccancel)
-#  define CDISABLE	bl PLTJMP(__libc_disable_asynccancel)
-#  define __local_multiple_threads __libc_multiple_threads
-# elif defined IS_IN_librt
-#  define CENABLE	bl PLTJMP(__librt_enable_asynccancel)
-#  define CDISABLE	bl PLTJMP(__librt_disable_asynccancel)
-# else
-#  error Unsupported library
-# endif
-
-# if defined IS_IN_libpthread || !defined NOT_IN_libc
-#  ifndef __ASSEMBLER__
-extern int __local_multiple_threads attribute_hidden;
-#   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
-#  else
-#   define SINGLE_THREAD_P						\
-  ldr ip, 1b;								\
-2:									\
-  ldr ip, [pc, ip];							\
-  teq ip, #0;
-#   define PSEUDO_PROLOGUE						\
-  1:  .word __local_multiple_threads - 2f - 8;
-#  endif
-# else
-/*  There is no __local_multiple_threads for librt, so use the TCB.  */
-#  ifndef __ASSEMBLER__
-#   define SINGLE_THREAD_P						\
-  __builtin_expect (THREAD_GETMEM (THREAD_SELF,				\
-				   header.multiple_threads) == 0, 1)
-#  else
-#   define PSEUDO_PROLOGUE
-#   define SINGLE_THREAD_P						\
-  stmfd	sp!, {r0, lr};							\
-  cfi_adjust_cfa_offset (8);						\
-  cfi_rel_offset (lr, 4);						\
-  bl	__aeabi_read_tp;						\
-  ldr	ip, [r0, #MULTIPLE_THREADS_OFFSET];				\
-  ldmfd	sp!, {r0, lr};							\
-  cfi_adjust_cfa_offset (-8);						\
-  cfi_restore (lr);							\
-  teq	ip, #0
-#   define SINGLE_THREAD_P_PIC(x) SINGLE_THREAD_P
-#  endif
-# endif
-
-#elif !defined __ASSEMBLER__
-
-/* For rtld, et cetera.  */
-# define SINGLE_THREAD_P 1
-# define NO_CANCELLATION 1
-
-#endif
-
-#ifndef __ASSEMBLER__
-# define RTLD_SINGLE_THREAD_P \
-  __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
-				   header.multiple_threads) == 0, 1)
-#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
deleted file mode 100644
index 29e2c2b..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/* Copyright (C) 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Jakub Jelinek <jakub@redhat.com>.
-
-   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 <dlfcn.h>
-#include <stdio.h>
-#include <unwind.h>
-#include <pthreadP.h>
-
-static void *libgcc_s_handle;
-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
-static _Unwind_Reason_Code (*libgcc_s_personality)
-  (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
-static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
-  (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
-static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *);
-
-void
-__attribute_noinline__
-pthread_cancel_init (void)
-{
-  void *resume, *personality, *forcedunwind, *getcfa;
-  void *handle;
-
-  if (__builtin_expect (libgcc_s_handle != NULL, 1))
-    {
-      /* Force gcc to reload all values.  */
-      asm volatile ("" ::: "memory");
-      return;
-    }
-
-  handle = __libc_dlopen ("libgcc_s.so.1");
-
-  if (handle == NULL
-      || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
-      || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL
-      || (forcedunwind = __libc_dlsym (handle, "_Unwind_ForcedUnwind"))
-	 == NULL
-      || (getcfa = __libc_dlsym (handle, "_Unwind_GetCFA")) == NULL
-#ifdef ARCH_CANCEL_INIT
-      || ARCH_CANCEL_INIT (handle)
-#endif
-      )
-    __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n");
-
-  libgcc_s_resume = resume;
-  libgcc_s_personality = personality;
-  libgcc_s_forcedunwind = forcedunwind;
-  libgcc_s_getcfa = getcfa;
-  /* Make sure libgcc_s_getcfa is written last.  Otherwise,
-     pthread_cancel_init might return early even when the pointer the
-     caller is interested in is not initialized yet.  */
-  atomic_write_barrier ();
-  libgcc_s_handle = handle;
-}
-
-void
-__libc_freeres_fn_section
-__unwind_freeres (void)
-{
-  void *handle = libgcc_s_handle;
-  if (handle != NULL)
-    {
-      libgcc_s_handle = NULL;
-      __libc_dlclose (handle);
-    }
-}
-
-/* It's vitally important that _Unwind_Resume not have a stack frame; the
-   ARM unwinder relies on register state at entrance.  So we write this in
-   assembly.  */
-
-asm (
-"	.globl	_Unwind_Resume\n"
-"	.type	_Unwind_Resume, %function\n"
-"_Unwind_Resume:\n"
-"	.cfi_sections .debug_frame\n"
-"	" CFI_STARTPROC "\n"
-"	stmfd	sp!, {r4, r5, r6, lr}\n"
-"	" CFI_ADJUST_CFA_OFFSET (16)" \n"
-"	" CFI_REL_OFFSET (r4, 0) "\n"
-"	" CFI_REL_OFFSET (r5, 4) "\n"
-"	" CFI_REL_OFFSET (r6, 8) "\n"
-"	" CFI_REL_OFFSET (lr, 12) "\n"
-"	" CFI_REMEMBER_STATE "\n"
-"	ldr	r4, 1f\n"
-"	ldr	r5, 2f\n"
-"3:	add	r4, pc, r4\n"
-"	ldr	r3, [r4, r5]\n"
-"	mov	r6, r0\n"
-"	cmp	r3, #0\n"
-"	beq	4f\n"
-"5:	mov	r0, r6\n"
-"	ldmfd	sp!, {r4, r5, r6, lr}\n"
-"	" CFI_ADJUST_CFA_OFFSET (-16) "\n"
-"	" CFI_RESTORE (r4) "\n"
-"	" CFI_RESTORE (r5) "\n"
-"	" CFI_RESTORE (r6) "\n"
-"	" CFI_RESTORE (lr) "\n"
-"	bx	r3\n"
-"	" CFI_RESTORE_STATE "\n"
-"4:	bl	pthread_cancel_init\n"
-"	ldr	r3, [r4, r5]\n"
-"	b	5b\n"
-"	" CFI_ENDPROC "\n"
-"	.align 2\n"
-#ifdef __thumb2__
-"1:	.word	_GLOBAL_OFFSET_TABLE_ - 3b - 4\n"
-#else
-"1:	.word	_GLOBAL_OFFSET_TABLE_ - 3b - 8\n"
-#endif
-"2:	.word	libgcc_s_resume(GOTOFF)\n"
-"	.size	_Unwind_Resume, .-_Unwind_Resume\n"
-);
-
-_Unwind_Reason_Code
-__gcc_personality_v0 (_Unwind_State state,
-		      struct _Unwind_Exception *ue_header,
-		      struct _Unwind_Context *context)
-{
-  if (__builtin_expect (libgcc_s_personality == NULL, 0))
-    pthread_cancel_init ();
-
-  return libgcc_s_personality (state, ue_header, context);
-}
-
-_Unwind_Reason_Code
-_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop,
-		      void *stop_argument)
-{
-  if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0))
-    pthread_cancel_init ();
-
-  return libgcc_s_forcedunwind (exc, stop, stop_argument);
-}
-
-_Unwind_Word
-_Unwind_GetCFA (struct _Unwind_Context *context)
-{
-  if (__builtin_expect (libgcc_s_getcfa == NULL, 0))
-    pthread_cancel_init ();
-
-  return libgcc_s_getcfa (context);
-}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
deleted file mode 100644
index 285b99b..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Copyright (C) 2003, 2005, 2010 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Jakub Jelinek <jakub@redhat.com>.
-
-   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 <dlfcn.h>
-#include <stdio.h>
-#include <unwind.h>
-
-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
-static _Unwind_Reason_Code (*libgcc_s_personality)
-  (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
-
-static void init (void) __attribute_used__;
-
-static void
-init (void)
-{
-  void *resume, *personality;
-  void *handle;
-
-  handle = __libc_dlopen ("libgcc_s.so.1");
-
-  if (handle == NULL
-      || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
-      || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL)
-    __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n");
-
-  libgcc_s_resume = resume;
-  libgcc_s_personality = personality;
-}
-
-/* It's vitally important that _Unwind_Resume not have a stack frame; the
-   ARM unwinder relies on register state at entrance.  So we write this in
-   assembly.  */
-
-asm (
-"	.globl	_Unwind_Resume\n"
-"	.type	_Unwind_Resume, %function\n"
-"_Unwind_Resume:\n"
-"	.cfi_sections .debug_frame\n"
-"	" CFI_STARTPROC "\n"
-"	stmfd	sp!, {r4, r5, r6, lr}\n"
-"	" CFI_ADJUST_CFA_OFFSET (16)" \n"
-"	" CFI_REL_OFFSET (r4, 0) "\n"
-"	" CFI_REL_OFFSET (r5, 4) "\n"
-"	" CFI_REL_OFFSET (r6, 8) "\n"
-"	" CFI_REL_OFFSET (lr, 12) "\n"
-"	" CFI_REMEMBER_STATE "\n"
-"	ldr	r4, 1f\n"
-"	ldr	r5, 2f\n"
-"3:	add	r4, pc, r4\n"
-"	ldr	r3, [r4, r5]\n"
-"	mov	r6, r0\n"
-"	cmp	r3, #0\n"
-"	beq	4f\n"
-"5:	mov	r0, r6\n"
-"	ldmfd	sp!, {r4, r5, r6, lr}\n"
-"	" CFI_ADJUST_CFA_OFFSET (-16) "\n"
-"	" CFI_RESTORE (r4) "\n"
-"	" CFI_RESTORE (r5) "\n"
-"	" CFI_RESTORE (r6) "\n"
-"	" CFI_RESTORE (lr) "\n"
-"	bx	r3\n"
-"	" CFI_RESTORE_STATE "\n"
-"4:	bl	init\n"
-"	ldr	r3, [r4, r5]\n"
-"	b	5b\n"
-"	" CFI_ENDPROC "\n"
-"	.align 2\n"
-#ifdef __thumb2__
-"1:	.word	_GLOBAL_OFFSET_TABLE_ - 3b - 4\n"
-#else
-"1:	.word	_GLOBAL_OFFSET_TABLE_ - 3b - 8\n"
-#endif
-"2:	.word	libgcc_s_resume(GOTOFF)\n"
-"	.size	_Unwind_Resume, .-_Unwind_Resume\n"
-);
-
-_Unwind_Reason_Code
-__gcc_personality_v0 (_Unwind_State state,
-		      struct _Unwind_Exception *ue_header,
-		      struct _Unwind_Context *context)
-{
-  if (__builtin_expect (libgcc_s_personality == NULL, 0))
-    init ();
-  return libgcc_s_personality (state, ue_header, context);
-}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h
deleted file mode 100644
index 9b6bed8..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h
+++ /dev/null
@@ -1,278 +0,0 @@
-/* Header file for the ARM EABI unwinder
-   Copyright (C) 2003, 2004, 2005, 2009  Free Software Foundation, Inc.
-   Contributed by Paul Brook
-
-   This file is free software; you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 2, or (at your option) any
-   later version.
-
-   In addition to the permissions in the GNU General Public License, the
-   Free Software Foundation gives you unlimited permission to link the
-   compiled version of this file into combinations with other programs,
-   and to distribute those combinations without any restriction coming
-   from the use of this file.  (The General Public License restrictions
-   do apply in other respects; for example, they cover modification of
-   the file, and distribution when not linked into a combine
-   executable.)
-
-   This file 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
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* Language-independent unwinder header public defines.  This contains both
-   ABI defined objects, and GNU support routines.  */
-
-#ifndef UNWIND_ARM_H
-#define UNWIND_ARM_H
-
-#define __ARM_EABI_UNWINDER__ 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-  typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));
-  typedef signed _Unwind_Sword __attribute__((__mode__(__word__)));
-  typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__)));
-  typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__)));
-  typedef _Unwind_Word _uw;
-  typedef unsigned _uw64 __attribute__((mode(__DI__)));
-  typedef unsigned _uw16 __attribute__((mode(__HI__)));
-  typedef unsigned _uw8 __attribute__((mode(__QI__)));
-
-  typedef enum
-    {
-      _URC_OK = 0,       /* operation completed successfully */
-      _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
-      _URC_END_OF_STACK = 5,
-      _URC_HANDLER_FOUND = 6,
-      _URC_INSTALL_CONTEXT = 7,
-      _URC_CONTINUE_UNWIND = 8,
-      _URC_FAILURE = 9   /* unspecified failure of some kind */
-    }
-  _Unwind_Reason_Code;
-
-  typedef enum
-    {
-      _US_VIRTUAL_UNWIND_FRAME = 0,
-      _US_UNWIND_FRAME_STARTING = 1,
-      _US_UNWIND_FRAME_RESUME = 2,
-      _US_ACTION_MASK = 3,
-      _US_FORCE_UNWIND = 8,
-      _US_END_OF_STACK = 16
-    }
-  _Unwind_State;
-
-  /* Provided only for for compatibility with existing code.  */
-  typedef int _Unwind_Action;
-#define _UA_SEARCH_PHASE	1
-#define _UA_CLEANUP_PHASE	2
-#define _UA_HANDLER_FRAME	4
-#define _UA_FORCE_UNWIND	8
-#define _UA_END_OF_STACK	16
-#define _URC_NO_REASON 	_URC_OK
-
-  typedef struct _Unwind_Control_Block _Unwind_Control_Block;
-  typedef struct _Unwind_Context _Unwind_Context;
-  typedef _uw _Unwind_EHT_Header;
-
-
-  /* UCB: */
-
-  struct _Unwind_Control_Block
-    {
-#ifdef _LIBC
-      /* For the benefit of code which assumes this is a scalar.  All
-	 glibc ever does is clear it.  */
-      _uw64 exception_class;
-#else
-      char exception_class[8];
-#endif
-      void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
-      /* Unwinder cache, private fields for the unwinder's use */
-      struct
-	{
-	  _uw reserved1;  /* Forced unwind stop fn, 0 if not forced */
-	  _uw reserved2;  /* Personality routine address */
-	  _uw reserved3;  /* Saved callsite address */
-	  _uw reserved4;  /* Forced unwind stop arg */
-	  _uw reserved5;
-	}
-      unwinder_cache;
-      /* Propagation barrier cache (valid after phase 1): */
-      struct
-	{
-	  _uw sp;
-	  _uw bitpattern[5];
-	}
-      barrier_cache;
-      /* Cleanup cache (preserved over cleanup): */
-      struct
-	{
-	  _uw bitpattern[4];
-	}
-      cleanup_cache;
-      /* Pr cache (for pr's benefit): */
-      struct
-	{
-	  _uw fnstart;			/* function start address */
-	  _Unwind_EHT_Header *ehtp;	/* pointer to EHT entry header word */
-	  _uw additional;		/* additional data */
-	  _uw reserved1;
-	}
-      pr_cache;
-      long long int :0;	/* Force alignment to 8-byte boundary */
-    };
-
-  /* Virtual Register Set*/
-
-  typedef enum
-    {
-      _UVRSC_CORE = 0,      /* integer register */
-      _UVRSC_VFP = 1,       /* vfp */
-      _UVRSC_FPA = 2,       /* fpa */
-      _UVRSC_WMMXD = 3,     /* Intel WMMX data register */
-      _UVRSC_WMMXC = 4      /* Intel WMMX control register */
-    }
-  _Unwind_VRS_RegClass;
-
-  typedef enum
-    {
-      _UVRSD_UINT32 = 0,
-      _UVRSD_VFPX = 1,
-      _UVRSD_FPAX = 2,
-      _UVRSD_UINT64 = 3,
-      _UVRSD_FLOAT = 4,
-      _UVRSD_DOUBLE = 5
-    }
-  _Unwind_VRS_DataRepresentation;
-
-  typedef enum
-    {
-      _UVRSR_OK = 0,
-      _UVRSR_NOT_IMPLEMENTED = 1,
-      _UVRSR_FAILED = 2
-    }
-  _Unwind_VRS_Result;
-
-  /* Frame unwinding state.  */
-  typedef struct
-    {
-      /* The current word (bytes packed msb first).  */
-      _uw data;
-      /* Pointer to the next word of data.  */
-      _uw *next;
-      /* The number of bytes left in this word.  */
-      _uw8 bytes_left;
-      /* The number of words pointed to by ptr.  */
-      _uw8 words_left;
-    }
-  __gnu_unwind_state;
-
-  typedef _Unwind_Reason_Code (*personality_routine) (_Unwind_State,
-      _Unwind_Control_Block *, _Unwind_Context *);
-
-  _Unwind_VRS_Result _Unwind_VRS_Set(_Unwind_Context *, _Unwind_VRS_RegClass,
-                                     _uw, _Unwind_VRS_DataRepresentation,
-                                     void *);
-
-  _Unwind_VRS_Result _Unwind_VRS_Get(_Unwind_Context *, _Unwind_VRS_RegClass,
-                                     _uw, _Unwind_VRS_DataRepresentation,
-                                     void *);
-
-  _Unwind_VRS_Result _Unwind_VRS_Pop(_Unwind_Context *, _Unwind_VRS_RegClass,
-                                     _uw, _Unwind_VRS_DataRepresentation);
-
-
-  /* Support functions for the PR.  */
-#define _Unwind_Exception _Unwind_Control_Block
-  typedef char _Unwind_Exception_Class[8];
-
-  void * _Unwind_GetLanguageSpecificData (_Unwind_Context *);
-  _Unwind_Ptr _Unwind_GetRegionStart (_Unwind_Context *);
-
-  /* These two should never be used.  */
-  _Unwind_Ptr _Unwind_GetDataRelBase (_Unwind_Context *);
-  _Unwind_Ptr _Unwind_GetTextRelBase (_Unwind_Context *);
-
-  /* Interface functions: */
-  _Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Control_Block *ucbp);
-  void __attribute__((noreturn)) _Unwind_Resume(_Unwind_Control_Block *ucbp);
-  _Unwind_Reason_Code _Unwind_Resume_or_Rethrow (_Unwind_Control_Block *ucbp);
-
-  typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)
-       (int, _Unwind_Action, _Unwind_Exception_Class,
-	_Unwind_Control_Block *, struct _Unwind_Context *, void *);
-  _Unwind_Reason_Code _Unwind_ForcedUnwind (_Unwind_Control_Block *,
-					    _Unwind_Stop_Fn, void *);
-  _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *);
-  void _Unwind_Complete(_Unwind_Control_Block *ucbp);
-  void _Unwind_DeleteException (_Unwind_Exception *);
-
-  _Unwind_Reason_Code __gnu_unwind_frame (_Unwind_Control_Block *,
-					  _Unwind_Context *);
-  _Unwind_Reason_Code __gnu_unwind_execute (_Unwind_Context *,
-					    __gnu_unwind_state *);
-
-  /* Decode an R_ARM_TARGET2 relocation.  */
-  static inline _Unwind_Word
-  _Unwind_decode_target2 (_Unwind_Word ptr)
-    {
-      _Unwind_Word tmp;
-
-      tmp = *(_Unwind_Word *) ptr;
-      /* Zero values are always NULL.  */
-      if (!tmp)
-	return 0;
-
-#if defined(linux) || defined(__NetBSD__)
-      /* Pc-relative indirect.  */
-      tmp += ptr;
-      tmp = *(_Unwind_Word *) tmp;
-#elif defined(__symbian__)
-      /* Absolute pointer.  Nothing more to do.  */
-#else
-      /* Pc-relative pointer.  */
-      tmp += ptr;
-#endif
-      return tmp;
-    }
-
-  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;
-    }
-
-  /* Return the address of the instruction, not the actual IP value.  */
-#define _Unwind_GetIP(context) \
-  (_Unwind_GetGR (context, 15) & ~(_Unwind_Word)1)
-
-  static inline void
-  _Unwind_SetGR (_Unwind_Context *context, int regno, _Unwind_Word val)
-    {
-      _Unwind_VRS_Set (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val);
-    }
-
-  /* The dwarf unwinder doesn't understand arm/thumb state.  We assume the
-     landing pad uses the same instruction set as the call site.  */
-#define _Unwind_SetIP(context, val) \
-  _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1))
-
-typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)
-     (struct _Unwind_Context *, void *);
-
-extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *);
-
-#ifdef __cplusplus
-}   /* extern "C" */
-#endif
-
-#endif /* defined UNWIND_ARM_H */
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c b/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c
deleted file mode 100644
index 6e25b02..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Empty.  */
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c b/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c
deleted file mode 100644
index 6e25b02..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Empty.  */
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pread.c b/sysdeps/unix/sysv/linux/arm/eabi/pread.c
deleted file mode 100644
index 4efe349..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/pread.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
-   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 <errno.h>
-#include <endian.h>
-#include <unistd.h>
-
-#include <sysdep-cancel.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-ssize_t
-__libc_pread (fd, buf, count, offset)
-     int fd;
-     void *buf;
-     size_t count;
-     off_t offset;
-{
-  ssize_t result;
-
-  if (SINGLE_THREAD_P)
-    {
-      /* In the ARM EABI, 64-bit values are aligned to even/odd register
-	 pairs for syscalls.  */
-      result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
-			       __LONG_LONG_PAIR (offset >> 31, offset));
-
-      return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  /* In the ARM EABI, 64-bit values are aligned to even/odd register
-     pairs for syscalls.  */
-  result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
-			   __LONG_LONG_PAIR (offset >> 31, offset));
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
-}
-
-strong_alias (__libc_pread, __pread)
-weak_alias (__libc_pread, pread)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pread64.c b/sysdeps/unix/sysv/linux/arm/eabi/pread64.c
deleted file mode 100644
index 59bd9cf..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/pread64.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
-   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 <errno.h>
-#include <endian.h>
-#include <unistd.h>
-
-#include <sysdep-cancel.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-ssize_t
-__libc_pread64 (fd, buf, count, offset)
-     int fd;
-     void *buf;
-     size_t count;
-     off64_t offset;
-{
-  ssize_t result;
-
-  if (SINGLE_THREAD_P)
-    {
-      /* In the ARM EABI, 64-bit values are aligned to even/odd register
-	 pairs for syscalls.  */
-      result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
-			       __LONG_LONG_PAIR ((off_t) (offset >> 32),
-						 (off_t) (offset & 0xffffffff)));
-
-      return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  /* In the ARM EABI, 64-bit values are aligned to even/odd register
-     pairs for syscalls.  */
-  result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
-			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
-					     (off_t) (offset & 0xffffffff)));
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
-}
-
-weak_alias (__libc_pread64, __pread64)
-weak_alias (__libc_pread64, pread64)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c b/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c
deleted file mode 100644
index 43788e5..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
-   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 <errno.h>
-#include <endian.h>
-#include <unistd.h>
-
-#include <sysdep-cancel.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-ssize_t
-__libc_pwrite (fd, buf, count, offset)
-     int fd;
-     const void *buf;
-     size_t count;
-     off_t offset;
-{
-  ssize_t result;
-
-  if (SINGLE_THREAD_P)
-    {
-      /* In the ARM EABI, 64-bit values are aligned to even/odd register
-	 pairs for syscalls.  */
-      result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
-			       __LONG_LONG_PAIR (offset >> 31, offset));
-
-      return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  /* In the ARM EABI, 64-bit values are aligned to even/odd register
-     pairs for syscalls.  */
-  result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
-			   __LONG_LONG_PAIR (offset >> 31, offset));
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
-}
-
-strong_alias (__libc_pwrite, __pwrite)
-weak_alias (__libc_pwrite, pwrite)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c b/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c
deleted file mode 100644
index c7bfdaf..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
-   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 <errno.h>
-#include <endian.h>
-#include <unistd.h>
-
-#include <sysdep-cancel.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-ssize_t
-__libc_pwrite64 (fd, buf, count, offset)
-     int fd;
-     const void *buf;
-     size_t count;
-     off64_t offset;
-{
-  ssize_t result;
-
-  if (SINGLE_THREAD_P)
-    {
-      /* In the ARM EABI, 64-bit values are aligned to even/odd register
-	 pairs for syscalls.  */
-      result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
-			       __LONG_LONG_PAIR ((off_t) (offset >> 32),
-						 (off_t) (offset & 0xffffffff)));
-
-      return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  /* In the ARM EABI, 64-bit values are aligned to even/odd register
-     pairs for syscalls.  */
-  result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
-			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
-					     (off_t) (offset & 0xffffffff)));
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
-}
-
-weak_alias (__libc_pwrite64, __pwrite64)
-libc_hidden_weak (__pwrite64)
-weak_alias (__libc_pwrite64, pwrite64)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/readahead.c b/sysdeps/unix/sysv/linux/arm/eabi/readahead.c
deleted file mode 100644
index 2d15b09..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/readahead.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Provide kernel hint to read ahead.
-   Copyright (C) 2002, 2003, 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>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <endian.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-
-#ifdef __NR_readahead
-
-ssize_t
-__readahead (int fd, off64_t offset, size_t count)
-{
-  return INLINE_SYSCALL (readahead, 5, fd, 0,
-			 __LONG_LONG_PAIR ((off_t) (offset >> 32),
-					   (off_t) (offset & 0xffffffff)),
-			 count);
-}
-#else
-ssize_t
-__readahead (int fd, off64_t offset, size_t count)
-{
-  __set_errno (ENOSYS);
-  return -1;
-}
-stub_warning (readahead)
-
-# include <stub-tag.h>
-#endif
-
-weak_alias (__readahead, readahead)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/semctl.c b/sysdeps/unix/sysv/linux/arm/eabi/semctl.c
deleted file mode 100644
index 1451629..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/semctl.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/alpha/semctl.c>
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/setcontext.S b/sysdeps/unix/sysv/linux/arm/eabi/setcontext.S
deleted file mode 100644
index 78003f5..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/setcontext.S
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Copyright (C) 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/>.  */
-
-#include <sysdep.h>
-#include <rtld-global-offsets.h>
-
-#include "ucontext_i.h"
-
-	.syntax unified
-	.text
-
-/* int setcontext (const ucontext_t *ucp) */
-
-ENTRY(__setcontext)
-	mov	r4, r0
-	add	r0, r0, #UCONTEXT_REGSPACE
-
-        /* Restore the VFP registers.  Copied from arm/eabi/__longjmp.S.  */
-#ifdef PIC
-        ldr     r2, 1f
-        ldr     r1, Lrtld_global_ro
-0:      add     r2, pc, r2
-        ldr     r2, [r2, r1]
-        ldr     r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
-        ldr     r2, Lhwcap
-        ldr     r2, [r2, #0]
-#endif
-
-        tst     r2, #HWCAP_ARM_VFP
-        beq     Lno_vfp_sc
-
-        /* Following instruction is vldmia r0!, {d8-d15}.  */
-        ldc     p11, cr8, [r0], #64
-        /* Restore the floating-point status register.  */
-        ldr     r1, [r0], #4
-        /* Following instruction is fmxr fpscr, r1.  */
-        mcr     p10, 7, r1, cr1, cr0, 0
-Lno_vfp_sc:
-        tst     r2, #HWCAP_ARM_IWMMXT
-        beq     Lno_iwmmxt_sc
-
-        /* Restore the call-preserved iWMMXt registers.  */
-        /* Following instructions are wldrd wr10, [r0], #8 (etc.)  */
-        ldcl    p1, cr10, [r0], #8
-        ldcl    p1, cr11, [r0], #8
-        ldcl    p1, cr12, [r0], #8
-        ldcl    p1, cr13, [r0], #8
-        ldcl    p1, cr14, [r0], #8
-        ldcl    p1, cr15, [r0], #8
-Lno_iwmmxt_sc:
-
-	/* Now bring back the signal status.  */
-	mov	r0, #SIG_SETMASK
-	add	r1, r4, #UCONTEXT_SIGMASK
-	mov	r2, #0
-	bl	PLTJMP(__sigprocmask)
-
-        /* Loading r0-r3 makes makecontext easier.  */
-        add     r14, r4, #MCONTEXT_ARM_R0
-        ldmia   r14, {r0-r12}
-        ldr     r13, [r14, #(MCONTEXT_ARM_SP - MCONTEXT_ARM_R0)]
-        add     r14, r14, #(MCONTEXT_ARM_LR - MCONTEXT_ARM_R0)
-        ldmia   r14, {r14, pc}
-
-END(setcontext)
-weak_alias(__setcontext, setcontext)
-
-	/* Called when a makecontext() context returns.  Start the
-	   context in R4 or fall through to exit().  */
-ENTRY(__startcontext)
-        movs    r0, r4
-        bne     PLTJMP(__setcontext)
-
-        @ New context was 0 - exit
-        b       PLTJMP(_exit)
-END(__startcontext)
-
-#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
-
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c b/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c
deleted file mode 100644
index c121e99..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/alpha/shmctl.c>
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
deleted file mode 100644
index b8ae839..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+++ /dev/null
@@ -1,121 +0,0 @@
-/* Copyright (C) 1999, 2005, 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>
-
-/* If no SA_RESTORER function was specified by the application we use
-   one of these.  This avoids the need for the kernel to synthesise a return
-   instruction on the stack, which would involve expensive cache flushes.
-
-   Nowadays (2.6 series, and somewhat earlier) the kernel uses a high page
-   for signal trampolines, so the cache flushes are not an issue.  But since
-   we do not have a vDSO, continue to use these so that we can provide
-   unwind information.
-
-   Start the unwind tables at least one instruction before the signal
-   trampoline, because the unwinder will assume we are returning after
-   a call site.
-
-   Because the signal frame layout changed in 2.6.18, we provide two
-   copies of these functions with different unwind information.  */
-
-/* Used in ENTRY.  */
-#undef cfi_startproc
-#define cfi_startproc \
-	.cfi_startproc simple; \
-	.cfi_signal_frame
-
-/* The CFA is not computed / used correctly here; this is neither trivial to
-   do, nor is it needed.  */
-#define CFI \
-	cfi_def_cfa (sp, 0); \
-	cfi_offset (r0, OFFSET + 0 * 4); \
-	cfi_offset (r1, OFFSET + 1 * 4); \
-	cfi_offset (r2, OFFSET + 2 * 4); \
-	cfi_offset (r3, OFFSET + 3 * 4); \
-	cfi_offset (r4, OFFSET + 4 * 4); \
-	cfi_offset (r5, OFFSET + 5 * 4); \
-	cfi_offset (r6, OFFSET + 6 * 4); \
-	cfi_offset (r7, OFFSET + 7 * 4); \
-	cfi_offset (r8, OFFSET + 8 * 4); \
-	cfi_offset (r9, OFFSET + 9 * 4); \
-	cfi_offset (r10, OFFSET + 10 * 4); \
-	cfi_offset (r11, OFFSET + 11 * 4); \
-	cfi_offset (r12, OFFSET + 12 * 4); \
-	cfi_offset (r13, OFFSET + 13 * 4); \
-	cfi_offset (r14, OFFSET + 14 * 4); \
-	cfi_offset (r15, OFFSET + 15 * 4)
-
-#ifndef __ASSUME_SIGFRAME_V2
-#define OFFSET 12
-	.fnstart
-	.save {r0-r15}
-	.pad #OFFSET
-	nop
-ENTRY(__default_sa_restorer_v1)
-	CFI
-	mov	r7, $SYS_ify(sigreturn)
-	swi	0x0
-	.fnend
-END(__default_sa_restorer_v1)
-#undef OFFSET
-#endif /* __ASSUME_SIGFRAME_V2 */
-
-#define OFFSET 32
-	.fnstart
-	.save {r0-r15}
-	.pad #OFFSET
-	nop
-ENTRY(__default_sa_restorer_v2)
-	CFI
-	mov	r7, $SYS_ify(sigreturn)
-	swi	0x0
-	.fnend
-END(__default_sa_restorer_v2)
-#undef OFFSET
-
-#ifdef __NR_rt_sigreturn
-
-#ifndef __ASSUME_SIGFRAME_V2
-#define OFFSET 168
-	.fnstart
-	.save {r0-r15}
-	.pad #OFFSET
-	nop
-ENTRY(__default_rt_sa_restorer_v1)
-	CFI
-	mov	r7, $SYS_ify(rt_sigreturn)
-	swi	0x0
-	.fnend
-END(__default_rt_sa_restorer_v1)
-#undef OFFSET
-#endif /* __ASSUME_SIGFRAME_V2 */
-
-#define OFFSET 160
-	.fnstart
-	.save {r0-r15}
-	.pad #OFFSET
-	nop
-ENTRY(__default_rt_sa_restorer_v2)
-	CFI
-	mov	r7, $SYS_ify(rt_sigreturn)
-	swi	0x0
-	.fnend
-END(__default_rt_sa_restorer_v2)
-#undef OFFSET
-
-#endif /* __NR_rt_sigreturn */
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S b/sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S
deleted file mode 100644
index 09492d0..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright (C) 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/>.  */
-
-#include <sysdep.h>
-
-#include "ucontext_i.h"
-
-	.syntax unified
-	.text
-
-/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */
-
-ENTRY(swapcontext)
-
-	/* Have getcontext() do most of the work then fix up
-	   LR afterwards.  Save R3 to keep the stack aligned.  */
-	push	{r0,r1,r3,r14}
-	cfi_adjust_cfa_offset (16)
-	cfi_rel_offset (r0,0)
-	cfi_rel_offset (r1,4)
-	cfi_rel_offset (r3,8)
-	cfi_rel_offset (r14,12)
-
-	bl	__getcontext
-	mov	r4, r0
-
-	pop	{r0,r1,r3,r14}
-	cfi_adjust_cfa_offset (-16)
-	cfi_restore (r0)
-	cfi_restore (r1)
-	cfi_restore (r3)
-	cfi_restore (r14)
-
-	/* Exit if getcontext() failed.  */
-	cmp 	r4, #0
-	itt	ne
-	movne	r0, r4
-	RETINSTR(ne, r14)
-	
-	/* Fix up LR and the PC.  */
-	str	r13,[r0, #MCONTEXT_ARM_SP]
-	str	r14,[r0, #MCONTEXT_ARM_LR]
-	str	r14,[r0, #MCONTEXT_ARM_PC]
-
-	/* And swap using swapcontext().  */
-	mov	r0, r1
-	b	__setcontext
-
-END(swapcontext)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscall.S b/sysdeps/unix/sysv/linux/arm/eabi/syscall.S
deleted file mode 100644
index 3faf919..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/syscall.S
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (C) 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/>.  */
-
-#include <sysdep.h>
-
-/* In the EABI syscall interface, we don't need a special syscall to
-   implement syscall().  It won't work reliably with 64-bit arguments
-   (but that is true on many modern platforms).  */
-
-ENTRY (syscall)
-	mov	ip, sp
-	stmfd	sp!, {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)
-	mov	r7, r0
-	mov	r0, r1
-	mov	r1, r2
-	mov	r2, r3
-	ldmfd	ip, {r3, r4, r5, r6}
-	swi	0x0
-	ldmfd	sp!, {r4, r5, r6, r7}
-	cfi_adjust_cfa_offset (-16)
-	cfi_restore (r4)
-	cfi_restore (r5)
-	cfi_restore (r6)
-	cfi_restore (r7)
-	cmn	r0, #4096
-	RETINSTR(cc, lr)
-	b	PLTJMP(syscall_error)
-PSEUDO_END (syscall)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
deleted file mode 100644
index e896902..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
+++ /dev/null
@@ -1,32 +0,0 @@
-# File name	Caller	Syscall name	# args	Strong name	Weak names
-
-# Semaphore and shm system calls.  msgctl, shmctl, and semctl have C
-# wrappers (to set __IPC_64).
-msgget		-	msgget		i:ii	__msgget	msgget
-msgrcv		-	msgrcv		Ci:ibnii __msgrcv	msgrcv
-msgsnd		-	msgsnd		Ci:ibni	__msgsnd	msgsnd
-shmat		-	shmat		i:ipi	__shmat		shmat
-shmdt		-	shmdt		i:s	__shmdt		shmdt
-shmget		-	shmget		i:iii	__shmget	shmget
-semop		-	semop		i:ipi	__semop		semop
-semtimedop	-	semtimedop	i:ipip	semtimedop
-semget		-	semget		i:iii	__semget	semget
-
-# proper socket implementations:
-accept		-	accept		Ci:iBN	__libc_accept	__accept accept
-bind		-	bind		i:ipi	__bind		bind
-connect		-	connect		Ci:ipi	__libc_connect	__connect_internal __connect connect
-getpeername	-	getpeername	i:ipp	__getpeername	getpeername
-getsockname	-	getsockname	i:ipp	__getsockname	getsockname
-getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
-listen		-	listen		i:ii	__listen	listen
-recv		-	recv		Ci:ibni	__libc_recv	__recv recv
-recvfrom	-	recvfrom	Ci:ibniBN	__libc_recvfrom	__recvfrom recvfrom
-recvmsg		-	recvmsg		Ci:ipi	__libc_recvmsg	__recvmsg recvmsg
-send		-	send		Ci:ibni	__libc_send	__send send
-sendmsg		-	sendmsg		Ci:ipi	__libc_sendmsg	__sendmsg sendmsg
-sendto		-	sendto		Ci:ibnibn	__libc_sendto	__sendto sendto
-setsockopt	-	setsockopt	i:iiibn	__setsockopt	setsockopt
-shutdown	-	shutdown	i:ii	__shutdown	shutdown
-socket		-	socket		i:iii	__socket	socket
-socketpair	-	socketpair	i:iiif	__socketpair	socketpair
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
deleted file mode 100644
index 408142c..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/* Copyright (C) 2005, 2006, 2007, 2009
-   Free Software Foundation, Inc.
-
-   This file is part of the GNU C Library.
-
-   Contributed by Daniel Jacobowitz <dan@codesourcery.com>, Oct 2005.
-
-   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 _LINUX_ARM_EABI_SYSDEP_H
-#define _LINUX_ARM_EABI_SYSDEP_H 1
-
-#include <arm/sysdep.h>
-
-#include <tls.h>
-
-#if __NR_SYSCALL_BASE != 0
-# error Kernel headers are too old
-#endif
-
-/* Don't use stime, even if the kernel headers define it.  We have
-   settimeofday, and some EABI kernels have removed stime.  Similarly
-   use setitimer to implement alarm.  */
-#undef __NR_stime
-#undef __NR_alarm
-
-/* The ARM EABI user interface passes the syscall number in r7, instead
-   of in the swi.  This is more efficient, because the kernel does not need
-   to fetch the swi from memory to find out the number; which can be painful
-   with separate I-cache and D-cache.  Make sure to use 0 for the SWI
-   argument; otherwise the (optional) compatibility code for APCS binaries
-   may be invoked.  */
-
-#if defined(__thumb__)
-/* We can not expose the use of r7 to the compiler.  GCC (as
-   of 4.5) uses r7 as the hard frame pointer for Thumb - although
-   for Thumb-2 it isn't obviously a better choice than r11.
-   And GCC does not support asms that conflict with the frame
-   pointer.
-
-   This would be easier if syscall numbers never exceeded 255,
-   but they do.  For the moment the LOAD_ARGS_7 is sacrificed.
-   We can't use push/pop inside the asm because that breaks
-   unwinding (i.e. thread cancellation) for this frame.  We can't
-   locally save and restore r7, because we do not know if this
-   function uses r7 or if it is our caller's r7; if it is our caller's,
-   then unwinding will fail higher up the stack.  So we move the
-   syscall out of line and provide its own unwind information.  */
-#undef LOAD_ARGS_7
-#undef INTERNAL_SYSCALL_RAW
-#define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\
-  ({								\
-      register int _a1 asm ("a1");				\
-      int _nametmp = name;					\
-      LOAD_ARGS_##nr (args)					\
-      register int _name asm ("ip") = _nametmp;			\
-      asm volatile ("bl      __libc_do_syscall"			\
-                    : "=r" (_a1)				\
-                    : "r" (_name) ASM_ARGS_##nr			\
-                    : "memory", "lr");				\
-      _a1; })
-#else /* ARM */
-#undef INTERNAL_SYSCALL_RAW
-#define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\
-  ({								\
-       register int _a1 asm ("r0"), _nr asm ("r7");		\
-       LOAD_ARGS_##nr (args)					\
-       _nr = name;						\
-       asm volatile ("swi	0x0	@ syscall " #name	\
-		     : "=r" (_a1)				\
-		     : "r" (_nr) ASM_ARGS_##nr			\
-		     : "memory");				\
-       _a1; })
-#endif
-
-/* For EABI, non-constant syscalls are actually pretty easy...  */
-#undef INTERNAL_SYSCALL_NCS
-#define INTERNAL_SYSCALL_NCS(number, err, nr, args...)          \
-  INTERNAL_SYSCALL_RAW (number, err, nr, args)
-
-/* We must save and restore r7 (call-saved) for the syscall number.
-   We never make function calls from inside here (only potentially
-   signal handlers), so we do not bother with doubleword alignment.
-
-   Just like the APCS syscall convention, the EABI syscall convention uses
-   r0 through r6 for up to seven syscall arguments.  None are ever passed to
-   the kernel on the stack, although incoming arguments are on the stack for
-   syscalls with five or more arguments.
-
-   The assembler will convert the literal pool load to a move for most
-   syscalls.  */
-
-#undef	DO_CALL
-#define DO_CALL(syscall_name, args)		\
-    DOARGS_##args;				\
-    ldr r7, =SYS_ify (syscall_name);		\
-    swi 0x0;					\
-    UNDOARGS_##args
-
-#undef  DOARGS_0
-#define DOARGS_0 \
-  .fnstart; \
-  str r7, [sp, #-4]!; \
-  cfi_adjust_cfa_offset (4); \
-  cfi_rel_offset (r7, 0); \
-  .save { r7 }
-#undef  DOARGS_1
-#define DOARGS_1 DOARGS_0
-#undef  DOARGS_2
-#define DOARGS_2 DOARGS_0
-#undef  DOARGS_3
-#define DOARGS_3 DOARGS_0
-#undef  DOARGS_4
-#define DOARGS_4 DOARGS_0
-#undef  DOARGS_5
-#define DOARGS_5 \
-  .fnstart; \
-  stmfd sp!, {r4, r7}; \
-  cfi_adjust_cfa_offset (8); \
-  cfi_rel_offset (r4, 0); \
-  cfi_rel_offset (r7, 4); \
-  .save { r4, r7 }; \
-  ldr r4, [sp, #8]
-#undef  DOARGS_6
-#define DOARGS_6 \
-  .fnstart; \
-  mov ip, sp; \
-  stmfd sp!, {r4, r5, r7}; \
-  cfi_adjust_cfa_offset (12); \
-  cfi_rel_offset (r4, 0); \
-  cfi_rel_offset (r5, 4); \
-  cfi_rel_offset (r7, 8); \
-  .save { r4, r5, r7 }; \
-  ldmia ip, {r4, r5}
-#undef  DOARGS_7
-#define DOARGS_7 \
-  .fnstart; \
-  mov ip, sp; \
-  stmfd sp!, {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); \
-  .save { r4, r5, r6, r7 }; \
-  ldmia ip, {r4, r5, r6}
-
-#undef  UNDOARGS_0
-#define UNDOARGS_0 \
-  ldr r7, [sp], #4; \
-  cfi_adjust_cfa_offset (-4); \
-  cfi_restore (r7); \
-  .fnend
-#undef  UNDOARGS_1
-#define UNDOARGS_1 UNDOARGS_0
-#undef  UNDOARGS_2
-#define UNDOARGS_2 UNDOARGS_0
-#undef  UNDOARGS_3
-#define UNDOARGS_3 UNDOARGS_0
-#undef  UNDOARGS_4
-#define UNDOARGS_4 UNDOARGS_0
-#undef  UNDOARGS_5
-#define UNDOARGS_5 \
-  ldmfd sp!, {r4, r7}; \
-  cfi_adjust_cfa_offset (-8); \
-  cfi_restore (r4); \
-  cfi_restore (r7); \
-  .fnend
-#undef  UNDOARGS_6
-#define UNDOARGS_6 \
-  ldmfd sp!, {r4, r5, r7}; \
-  cfi_adjust_cfa_offset (-12); \
-  cfi_restore (r4); \
-  cfi_restore (r5); \
-  cfi_restore (r7); \
-  .fnend
-#undef  UNDOARGS_7
-#define UNDOARGS_7 \
-  ldmfd sp!, {r4, r5, r6, r7}; \
-  cfi_adjust_cfa_offset (-16); \
-  cfi_restore (r4); \
-  cfi_restore (r5); \
-  cfi_restore (r6); \
-  cfi_restore (r7); \
-  .fnend
-
-#endif /* _LINUX_ARM_EABI_SYSDEP_H */
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c b/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c
deleted file mode 100644
index 409bf19..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Copyright (C) 1997-2000, 2003, 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 <sys/types.h>
-#include <endian.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-#include "kernel-features.h"
-
-#ifdef __NR_truncate64
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-/* The variable is shared between all wrappers around *truncate64 calls.  */
-int __have_no_truncate64;
-#endif
-
-/* Truncate the file FD refers to to LENGTH bytes.  */
-int
-truncate64 (const char *path, off64_t length)
-{
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if (! __have_no_truncate64)
-#endif
-    {
-      unsigned int low = length & 0xffffffff;
-      unsigned int high = length >> 32;
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      int saved_errno = errno;
-#endif
-      int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0,
-				   __LONG_LONG_PAIR (high, low));
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      if (result != -1 || errno != ENOSYS)
-#endif
-	return result;
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-      __set_errno (saved_errno);
-      __have_no_truncate64 = 1;
-#endif
-    }
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-  if ((off_t) length != length)
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-  return __truncate (path, (off_t) length);
-#endif
-}
-
-#else
-/* Use the generic implementation.  */
-# include <misc/truncate64.c>
-#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/umount.c b/sysdeps/unix/sysv/linux/arm/eabi/umount.c
deleted file mode 100644
index d9d671f..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/umount.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David Huggins-Daines <dhd@debian.org>, 2000.
-
-   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/>.  */
-
-/* Since we don't have an oldumount system call, do what the kernel
-   does down here.  */
-
-extern long int __umount2 (const char *name, int flags);
-
-long int
-__umount (const char *name)
-{
-  return __umount2 (name, 0);
-}
-
-weak_alias (__umount, umount);
diff --git a/sysdeps/unix/sysv/linux/arm/ftruncate64.c b/sysdeps/unix/sysv/linux/arm/ftruncate64.c
new file mode 100644
index 0000000..ad5eb18
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/ftruncate64.c
@@ -0,0 +1,76 @@
+/* Copyright (C) 1997,1998,1999,2000,2001,2003, 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 <sys/types.h>
+#include <errno.h>
+#include <endian.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include "kernel-features.h"
+
+#ifdef __NR_ftruncate64
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+/* The variable is shared between all wrappers around *truncate64 calls.  */
+extern int __have_no_truncate64;
+#endif
+
+
+/* Truncate the file FD refers to to LENGTH bytes.  */
+int
+__ftruncate64 (int fd, off64_t length)
+{
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+  if (! __have_no_truncate64)
+#endif
+    {
+      unsigned int low = length & 0xffffffff;
+      unsigned int high = length >> 32;
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+      int saved_errno = errno;
+#endif
+      int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0,
+				   __LONG_LONG_PAIR (high, low));
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+      if (result != -1 || errno != ENOSYS)
+#endif
+	return result;
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+      __set_errno (saved_errno);
+      __have_no_truncate64 = 1;
+#endif
+    }
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+  if ((off_t) length != length)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+  return __ftruncate (fd, (off_t) length);
+#endif
+}
+weak_alias (__ftruncate64, ftruncate64)
+
+#else
+/* Use the generic implementation.  */
+# include <misc/ftruncate64.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/getcontext.S b/sysdeps/unix/sysv/linux/arm/getcontext.S
new file mode 100644
index 0000000..435eb12
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/getcontext.S
@@ -0,0 +1,113 @@
+/* Copyright (C) 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/>.  */
+
+#include <sysdep.h>
+#include <rtld-global-offsets.h>
+
+#include "ucontext_i.h"
+
+	.syntax unified
+	.text
+
+/* int getcontext (ucontext_t *ucp) */
+
+ENTRY(__getcontext)
+	/* No need to save r0-r3, d0-d7, or d16-d31.  */
+	add	r1, r0, #MCONTEXT_ARM_R4
+	stmia   r1, {r4-r11}
+
+	/* Save R13 separately as Thumb can't STM it.  */
+	str     r13, [r0, #MCONTEXT_ARM_SP]
+	str     r14, [r0, #MCONTEXT_ARM_LR]
+	/* Return to LR */
+	str     r14, [r0, #MCONTEXT_ARM_PC]
+	/* Return zero */
+	mov     r2, #0
+	str     r2, [r0, #MCONTEXT_ARM_R0]
+
+	/* Save ucontext_t * across the next call.  */
+	mov	r4, r0
+	
+	/* __sigprocmask(SIG_BLOCK, NULL, &(ucontext->uc_sigmask)) */
+	mov     r0, #SIG_BLOCK
+	mov     r1, #0
+	add     r2, r4, #UCONTEXT_SIGMASK
+	bl      PLTJMP(__sigprocmask)
+	
+	/* Store FP regs.  Much of the FP code is copied from arm/eabi/setjmp.S.  */
+
+#ifdef PIC
+        ldr     r2, 1f
+        ldr     r1, Lrtld_global_ro
+0:      add     r2, pc, r2
+        ldr     r2, [r2, r1]
+        ldr     r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+#else
+        ldr     r2, Lhwcap
+        ldr     r2, [r2, #0]
+#endif
+
+	add	r0, r4, #UCONTEXT_REGSPACE
+
+        tst     r2, #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 r0!, {d8-d15}.  */
+        stc     p11, cr8, [r0], #64
+        /* Store the floating-point status register.  */
+        /* Following instruction is vmrs r1, fpscr.  */
+        mrc     p10, 7, r1, cr1, cr0, 0
+        str     r1, [r0], #4
+Lno_vfp:
+
+        tst     r2, #HWCAP_ARM_IWMMXT
+        beq     Lno_iwmmxt
+
+        /* Save the call-preserved iWMMXt registers.  */
+        /* Following instructions are wstrd wr10, [r0], #8 (etc.)  */
+        stcl    p1, cr10, [r0], #8
+        stcl    p1, cr11, [r0], #8
+        stcl    p1, cr12, [r0], #8
+        stcl    p1, cr13, [r0], #8
+        stcl    p1, cr14, [r0], #8
+        stcl    p1, cr15, [r0], #8
+Lno_iwmmxt:
+
+	/* Restore the clobbered R4 and LR.  */
+	ldr	r14, [r4, #MCONTEXT_ARM_LR]
+	ldr	r4, [r4, #MCONTEXT_ARM_R4]
+
+	mov	r0, #0
+
+	DO_RET(r14)
+
+END(__getcontext)
+
+#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
+
+
+weak_alias(__getcontext, getcontext)
diff --git a/sysdeps/unix/sysv/linux/arm/internal_accept4.S b/sysdeps/unix/sysv/linux/arm/internal_accept4.S
new file mode 100644
index 0000000..eeb5f50
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/internal_accept4.S
@@ -0,0 +1,6 @@
+/* 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
diff --git a/sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S b/sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S
new file mode 100644
index 0000000..eeb5f50
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S
@@ -0,0 +1,6 @@
+/* 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
diff --git a/sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S b/sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S
new file mode 100644
index 0000000..eeb5f50
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S
@@ -0,0 +1,6 @@
+/* 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
diff --git a/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S b/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
new file mode 100644
index 0000000..0ec8173
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
@@ -0,0 +1,48 @@
+/* Copyright (C) 2010-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/>.  */
+
+#include <sysdep.h>
+
+/* Out-of-line syscall stub.  We expect the system call number in ip
+   and return the raw result in r0.  No registers are clobbered.
+   We could avoid using the stack for this, but the goal is accurate
+   unwind information - and while there is a reserved prefix in the
+   ARM unwind tables for register to register moves, the actual opcodes
+   are not defined.  */
+
+#if defined(__thumb__)
+	.thumb
+	.syntax unified
+	.hidden __libc_do_syscall
+
+#undef CALL_MCOUNT
+#define CALL_MCOUNT
+
+ENTRY (__libc_do_syscall)
+	.fnstart
+	push	{r7, lr}
+	.save	{r7, lr}
+	cfi_adjust_cfa_offset (8)
+	cfi_rel_offset (r7, 0)
+	cfi_rel_offset (lr, 4)
+	mov	r7, ip
+	swi	0x0
+	pop	{r7, pc}
+	.fnend
+END (__libc_do_syscall)
+
+#endif /* __thumb__ */
diff --git a/sysdeps/unix/sysv/linux/arm/makecontext.c b/sysdeps/unix/sysv/linux/arm/makecontext.c
new file mode 100644
index 0000000..d6ae6f0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/makecontext.c
@@ -0,0 +1,73 @@
+/* Copyright (C) 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/>.  */
+
+#include <stdarg.h>
+#include <ucontext.h>
+
+/* Number of arguments that go in registers.  */
+#define NREG_ARGS  4
+
+/* Take a context previously prepared via getcontext() and set to
+   call func() with the given int only args.  */
+void
+__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
+{
+  extern void __startcontext (void);
+  unsigned long *funcstack;
+  va_list vl;
+  unsigned long *regptr;
+  unsigned int reg;
+  int misaligned;
+
+  /* Start at the top of stack.  */
+  funcstack = (unsigned long *) (ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
+
+  /* Ensure the stack stays eight byte aligned.  */
+  misaligned = ((unsigned long) funcstack & 4) != 0;
+
+  if ((argc > NREG_ARGS) && (argc & 1) != 0)
+    misaligned = !misaligned;
+
+  if (misaligned)
+    funcstack -= 1;
+
+  va_start (vl, argc);
+
+  /* Reserve space for the on-stack arguments.  */
+  if (argc > NREG_ARGS)
+    funcstack -= (argc - NREG_ARGS);
+
+  ucp->uc_mcontext.arm_sp = (unsigned long) funcstack;
+  ucp->uc_mcontext.arm_pc = (unsigned long) func;
+
+  /* Exit to startcontext() with the next context in R4 */
+  ucp->uc_mcontext.arm_r4 = (unsigned long) ucp->uc_link;
+  ucp->uc_mcontext.arm_lr = (unsigned long) __startcontext;
+
+  /* The first four arguments go into registers.  */
+  regptr = &(ucp->uc_mcontext.arm_r0);
+
+  for (reg = 0; (reg < argc) && (reg < NREG_ARGS); reg++)
+    *regptr++ = va_arg (vl, unsigned long);
+
+  /* And the remainder on the stack.  */
+  for (; reg < argc; reg++)
+    *funcstack++ = va_arg (vl, unsigned long);
+
+  va_end (vl);
+}
+weak_alias (__makecontext, makecontext)
diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S
new file mode 100644
index 0000000..be4dd52
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/mmap64.S
@@ -0,0 +1,68 @@
+/* Copyright (C) 2000, 2003, 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/>.  */
+
+#include <sysdep.h>
+
+#define	EINVAL		22
+
+#ifdef __ARMEB__
+# define LOW_OFFSET      8 + 4
+/* The initial + 4 is for the stack postdecrement.  */
+# define HIGH_OFFSET 4 + 8 + 0
+#else
+# define LOW_OFFSET      8 + 0
+# define HIGH_OFFSET 4 + 8 + 4
+#endif
+
+	/* The mmap2 system call takes six arguments, all in registers.  */
+	.text
+ENTRY (__mmap64)
+	ldr	ip, [sp, $LOW_OFFSET]
+	str	r5, [sp, #-4]!
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (r5, 0)
+	ldr	r5, [sp, $HIGH_OFFSET]
+	str	r4, [sp, #-4]!
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (r4, 0)
+	cfi_remember_state
+	movs	r4, ip, lsl $20		@ check that offset is page-aligned
+	mov	ip, ip, lsr $12
+	moveqs	r4, r5, lsr $12		@ check for overflow
+	bne	.Linval
+	ldr	r4, [sp, $8]		@ load fd
+	orr	r5, ip, r5, lsl $20	@ compose page offset
+	DO_CALL (mmap2, 0)
+	cmn	r0, $4096
+	ldmfd	sp!, {r4, r5}
+	cfi_adjust_cfa_offset (-8)
+	cfi_restore (r4)
+	cfi_restore (r5)
+	RETINSTR(cc, lr)
+	b	PLTJMP(syscall_error)
+
+	cfi_restore_state
+.Linval:
+	mov	r0, $-EINVAL
+	ldmfd	sp!, {r4, r5}
+	cfi_adjust_cfa_offset (-8)
+	cfi_restore (r4)
+	cfi_restore (r5)
+	b	PLTJMP(syscall_error)
+PSEUDO_END (__mmap64)
+
+weak_alias (__mmap64, mmap64)
diff --git a/sysdeps/unix/sysv/linux/arm/msgctl.c b/sysdeps/unix/sysv/linux/arm/msgctl.c
new file mode 100644
index 0000000..38aedad
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/msgctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/alpha/msgctl.c>
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/Makefile b/sysdeps/unix/sysv/linux/arm/nptl/Makefile
new file mode 100644
index 0000000..ef8076c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/Makefile
@@ -0,0 +1,17 @@
+ifeq ($(subdir),rt)
+librt-sysdep_routines += rt-aeabi_unwind_cpp_pr1
+librt-shared-only-routines += rt-aeabi_unwind_cpp_pr1
+endif
+
+ifeq ($(subdir),nptl)
+libpthread-sysdep_routines += nptl-aeabi_unwind_cpp_pr1
+libpthread-shared-only-routines += nptl-aeabi_unwind_cpp_pr1
+
+# This test relies on compiling part of the binary with EH information,
+# part without, and unwinding through.  The .ARM.exidx tables have
+# start addresses for EH regions, but no end addresses.  Every
+# region an exception needs to propogate through must have unwind
+# information, or a previous function's unwind table may be used
+# by mistake.
+tests := $(filter-out tst-cleanupx4,$(tests))
+endif
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/configure b/sysdeps/unix/sysv/linux/arm/nptl/configure
new file mode 100644
index 0000000..5182699
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/configure
@@ -0,0 +1,4 @@
+# This file is generated from configure.in by Autoconf.  DO NOT EDIT!
+
+libc_cv_gcc_exceptions=yes
+exceptions=-fexceptions
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/configure.in b/sysdeps/unix/sysv/linux/arm/nptl/configure.in
new file mode 100644
index 0000000..22f6f4b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/configure.in
@@ -0,0 +1,8 @@
+dnl configure fragment for NPTL and ARM/Linux EABI.
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+
+dnl The normal configure check for gcc -fexecptions fails because it can't
+dnl find __aeabi_unwind_cpp_pr0.  Work around this here; our GCC definitely
+dnl has -fexceptions.
+libc_cv_gcc_exceptions=yes
+exceptions=-fexceptions
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c b/sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c
new file mode 100644
index 0000000..7b83522
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c
@@ -0,0 +1 @@
+#include <aeabi_unwind_cpp_pr1.c>
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c b/sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c
new file mode 100644
index 0000000..7b83522
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c
@@ -0,0 +1 @@
+#include <aeabi_unwind_cpp_pr1.c>
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
new file mode 100644
index 0000000..c26bec3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
@@ -0,0 +1,251 @@
+/* Copyright (C) 2003, 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/>.  */
+
+#include <sysdep.h>
+#include <tls.h>
+#ifndef __ASSEMBLER__
+# include <nptl/pthreadP.h>
+#endif
+
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+
+/* NOTE: We do mark syscalls with unwind annotations, for the benefit of
+   cancellation; but they're really only accurate at the point of the
+   syscall.  The ARM unwind directives are not rich enough without adding
+   a custom personality function.  */
+
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args)				\
+  .section ".text";							\
+    PSEUDO_PROLOGUE;							\
+  .type __##syscall_name##_nocancel,%function;				\
+  .globl __##syscall_name##_nocancel;					\
+  __##syscall_name##_nocancel:						\
+    .cfi_sections .debug_frame;						\
+    cfi_startproc;							\
+    DO_CALL (syscall_name, args);					\
+    cmn r0, $4096;							\
+    PSEUDO_RET;								\
+    cfi_endproc;							\
+  .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel;	\
+  ENTRY (name);								\
+    SINGLE_THREAD_P;							\
+    DOARGS_##args;							\
+    bne .Lpseudo_cancel;						\
+    cfi_remember_state;							\
+    ldr r7, =SYS_ify (syscall_name);					\
+    swi 0x0;								\
+    UNDOARGS_##args;							\
+    cmn r0, $4096;							\
+    PSEUDO_RET;								\
+    cfi_restore_state;							\
+  .Lpseudo_cancel:							\
+    .fnstart;		/* matched by the .fnend in UNDOARGS below.  */	\
+    DOCARGS_##args;	/* save syscall args etc. around CENABLE.  */	\
+    CENABLE;								\
+    mov ip, r0;		/* put mask in safe place.  */			\
+    UNDOCARGS_##args;	/* restore syscall args.  */			\
+    ldr r7, =SYS_ify (syscall_name);					\
+    swi 0x0;		/* do the call.  */				\
+    mov r7, r0;		/* save syscall return value.  */		\
+    mov r0, ip;		/* get mask back.  */				\
+    CDISABLE;								\
+    mov r0, r7;		/* retrieve return value.  */			\
+    RESTORE_LR_##args;							\
+    UNDOARGS_##args;							\
+    cmn r0, $4096
+
+/* DOARGS pushes eight bytes on the stack for five arguments, twelve bytes for
+   six arguments, and four bytes for fewer.  In order to preserve doubleword
+   alignment, sometimes we must save an extra register.  */
+
+# define RESTART_UNWIND \
+  .fnend; \
+  .fnstart; \
+  .save {r7}; \
+  .save {lr}
+
+# define DOCARGS_0 \
+  .save {r7}; \
+  str lr, [sp, #-4]!; \
+  cfi_adjust_cfa_offset (4); \
+  cfi_rel_offset (lr, 0); \
+  .save {lr}
+# define UNDOCARGS_0
+# define RESTORE_LR_0 \
+  ldr lr, [sp], #4; \
+  cfi_adjust_cfa_offset (-4); \
+  cfi_restore (lr)
+
+# define DOCARGS_1 \
+  .save {r7}; \
+  stmfd sp!, {r0, r1, lr}; \
+  cfi_adjust_cfa_offset (12); \
+  cfi_rel_offset (lr, 8); \
+  .save {lr}; \
+  .pad #8
+# define UNDOCARGS_1 \
+  ldr r0, [sp], #8; \
+  cfi_adjust_cfa_offset (-8); \
+  RESTART_UNWIND
+# define RESTORE_LR_1 \
+  RESTORE_LR_0
+
+# define DOCARGS_2 \
+  .save {r7}; \
+  stmfd sp!, {r0, r1, lr}; \
+  cfi_adjust_cfa_offset (12); \
+  cfi_rel_offset (lr, 8); \
+  .save {lr}; \
+  .pad #8
+# define UNDOCARGS_2 \
+  ldmfd sp!, {r0, r1}; \
+  cfi_adjust_cfa_offset (-8); \
+  RESTART_UNWIND
+# define RESTORE_LR_2 \
+  RESTORE_LR_0
+
+# define DOCARGS_3 \
+  .save {r7}; \
+  stmfd sp!, {r0, r1, r2, r3, lr}; \
+  cfi_adjust_cfa_offset (20); \
+  cfi_rel_offset (lr, 16); \
+  .save {lr}; \
+  .pad #16
+# define UNDOCARGS_3 \
+  ldmfd sp!, {r0, r1, r2, r3}; \
+  cfi_adjust_cfa_offset (-16); \
+  RESTART_UNWIND
+# define RESTORE_LR_3 \
+  RESTORE_LR_0
+
+# define DOCARGS_4 \
+  .save {r7}; \
+  stmfd sp!, {r0, r1, r2, r3, lr}; \
+  cfi_adjust_cfa_offset (20); \
+  cfi_rel_offset (lr, 16); \
+  .save {lr}; \
+  .pad #16
+# define UNDOCARGS_4 \
+  ldmfd sp!, {r0, r1, r2, r3}; \
+  cfi_adjust_cfa_offset (-16); \
+  RESTART_UNWIND
+# define RESTORE_LR_4 \
+  RESTORE_LR_0
+
+/* r4 is only stmfd'ed for correct stack alignment.  */
+# define DOCARGS_5 \
+  .save {r4, r7}; \
+  stmfd sp!, {r0, r1, r2, r3, r4, lr}; \
+  cfi_adjust_cfa_offset (24); \
+  cfi_rel_offset (lr, 20); \
+  .save {lr}; \
+  .pad #20
+# define UNDOCARGS_5 \
+  ldmfd sp!, {r0, r1, r2, r3}; \
+  cfi_adjust_cfa_offset (-16); \
+  .fnend; \
+  .fnstart; \
+  .save {r4, r7}; \
+  .save {lr}; \
+  .pad #4
+# define RESTORE_LR_5 \
+  ldmfd sp!, {r4, lr}; \
+  cfi_adjust_cfa_offset (-8); \
+  /* r4 will be marked as restored later.  */ \
+  cfi_restore (lr)
+
+# define DOCARGS_6 \
+  .save {r4, r5, r7}; \
+  stmfd sp!, {r0, r1, r2, r3, lr}; \
+  cfi_adjust_cfa_offset (20); \
+  cfi_rel_offset (lr, 16); \
+  .save {lr}; \
+  .pad #16
+# define UNDOCARGS_6 \
+  ldmfd sp!, {r0, r1, r2, r3}; \
+  cfi_adjust_cfa_offset (-16); \
+  .fnend; \
+  .fnstart; \
+  .save {r4, r5, r7}; \
+  .save {lr};
+# define RESTORE_LR_6 \
+  RESTORE_LR_0
+
+# ifdef IS_IN_libpthread
+#  define CENABLE	bl PLTJMP(__pthread_enable_asynccancel)
+#  define CDISABLE	bl PLTJMP(__pthread_disable_asynccancel)
+#  define __local_multiple_threads __pthread_multiple_threads
+# elif !defined NOT_IN_libc
+#  define CENABLE	bl PLTJMP(__libc_enable_asynccancel)
+#  define CDISABLE	bl PLTJMP(__libc_disable_asynccancel)
+#  define __local_multiple_threads __libc_multiple_threads
+# elif defined IS_IN_librt
+#  define CENABLE	bl PLTJMP(__librt_enable_asynccancel)
+#  define CDISABLE	bl PLTJMP(__librt_disable_asynccancel)
+# else
+#  error Unsupported library
+# endif
+
+# if defined IS_IN_libpthread || !defined NOT_IN_libc
+#  ifndef __ASSEMBLER__
+extern int __local_multiple_threads attribute_hidden;
+#   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
+#  else
+#   define SINGLE_THREAD_P						\
+  ldr ip, 1b;								\
+2:									\
+  ldr ip, [pc, ip];							\
+  teq ip, #0;
+#   define PSEUDO_PROLOGUE						\
+  1:  .word __local_multiple_threads - 2f - 8;
+#  endif
+# else
+/*  There is no __local_multiple_threads for librt, so use the TCB.  */
+#  ifndef __ASSEMBLER__
+#   define SINGLE_THREAD_P						\
+  __builtin_expect (THREAD_GETMEM (THREAD_SELF,				\
+				   header.multiple_threads) == 0, 1)
+#  else
+#   define PSEUDO_PROLOGUE
+#   define SINGLE_THREAD_P						\
+  stmfd	sp!, {r0, lr};							\
+  cfi_adjust_cfa_offset (8);						\
+  cfi_rel_offset (lr, 4);						\
+  bl	__aeabi_read_tp;						\
+  ldr	ip, [r0, #MULTIPLE_THREADS_OFFSET];				\
+  ldmfd	sp!, {r0, lr};							\
+  cfi_adjust_cfa_offset (-8);						\
+  cfi_restore (lr);							\
+  teq	ip, #0
+#   define SINGLE_THREAD_P_PIC(x) SINGLE_THREAD_P
+#  endif
+# endif
+
+#elif !defined __ASSEMBLER__
+
+/* For rtld, et cetera.  */
+# define SINGLE_THREAD_P 1
+# define NO_CANCELLATION 1
+
+#endif
+
+#ifndef __ASSEMBLER__
+# define RTLD_SINGLE_THREAD_P \
+  __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+				   header.multiple_threads) == 0, 1)
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
new file mode 100644
index 0000000..29e2c2b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
@@ -0,0 +1,158 @@
+/* Copyright (C) 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Jakub Jelinek <jakub@redhat.com>.
+
+   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 <dlfcn.h>
+#include <stdio.h>
+#include <unwind.h>
+#include <pthreadP.h>
+
+static void *libgcc_s_handle;
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
+static _Unwind_Reason_Code (*libgcc_s_personality)
+  (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
+static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
+  (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
+static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *);
+
+void
+__attribute_noinline__
+pthread_cancel_init (void)
+{
+  void *resume, *personality, *forcedunwind, *getcfa;
+  void *handle;
+
+  if (__builtin_expect (libgcc_s_handle != NULL, 1))
+    {
+      /* Force gcc to reload all values.  */
+      asm volatile ("" ::: "memory");
+      return;
+    }
+
+  handle = __libc_dlopen ("libgcc_s.so.1");
+
+  if (handle == NULL
+      || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
+      || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL
+      || (forcedunwind = __libc_dlsym (handle, "_Unwind_ForcedUnwind"))
+	 == NULL
+      || (getcfa = __libc_dlsym (handle, "_Unwind_GetCFA")) == NULL
+#ifdef ARCH_CANCEL_INIT
+      || ARCH_CANCEL_INIT (handle)
+#endif
+      )
+    __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n");
+
+  libgcc_s_resume = resume;
+  libgcc_s_personality = personality;
+  libgcc_s_forcedunwind = forcedunwind;
+  libgcc_s_getcfa = getcfa;
+  /* Make sure libgcc_s_getcfa is written last.  Otherwise,
+     pthread_cancel_init might return early even when the pointer the
+     caller is interested in is not initialized yet.  */
+  atomic_write_barrier ();
+  libgcc_s_handle = handle;
+}
+
+void
+__libc_freeres_fn_section
+__unwind_freeres (void)
+{
+  void *handle = libgcc_s_handle;
+  if (handle != NULL)
+    {
+      libgcc_s_handle = NULL;
+      __libc_dlclose (handle);
+    }
+}
+
+/* It's vitally important that _Unwind_Resume not have a stack frame; the
+   ARM unwinder relies on register state at entrance.  So we write this in
+   assembly.  */
+
+asm (
+"	.globl	_Unwind_Resume\n"
+"	.type	_Unwind_Resume, %function\n"
+"_Unwind_Resume:\n"
+"	.cfi_sections .debug_frame\n"
+"	" CFI_STARTPROC "\n"
+"	stmfd	sp!, {r4, r5, r6, lr}\n"
+"	" CFI_ADJUST_CFA_OFFSET (16)" \n"
+"	" CFI_REL_OFFSET (r4, 0) "\n"
+"	" CFI_REL_OFFSET (r5, 4) "\n"
+"	" CFI_REL_OFFSET (r6, 8) "\n"
+"	" CFI_REL_OFFSET (lr, 12) "\n"
+"	" CFI_REMEMBER_STATE "\n"
+"	ldr	r4, 1f\n"
+"	ldr	r5, 2f\n"
+"3:	add	r4, pc, r4\n"
+"	ldr	r3, [r4, r5]\n"
+"	mov	r6, r0\n"
+"	cmp	r3, #0\n"
+"	beq	4f\n"
+"5:	mov	r0, r6\n"
+"	ldmfd	sp!, {r4, r5, r6, lr}\n"
+"	" CFI_ADJUST_CFA_OFFSET (-16) "\n"
+"	" CFI_RESTORE (r4) "\n"
+"	" CFI_RESTORE (r5) "\n"
+"	" CFI_RESTORE (r6) "\n"
+"	" CFI_RESTORE (lr) "\n"
+"	bx	r3\n"
+"	" CFI_RESTORE_STATE "\n"
+"4:	bl	pthread_cancel_init\n"
+"	ldr	r3, [r4, r5]\n"
+"	b	5b\n"
+"	" CFI_ENDPROC "\n"
+"	.align 2\n"
+#ifdef __thumb2__
+"1:	.word	_GLOBAL_OFFSET_TABLE_ - 3b - 4\n"
+#else
+"1:	.word	_GLOBAL_OFFSET_TABLE_ - 3b - 8\n"
+#endif
+"2:	.word	libgcc_s_resume(GOTOFF)\n"
+"	.size	_Unwind_Resume, .-_Unwind_Resume\n"
+);
+
+_Unwind_Reason_Code
+__gcc_personality_v0 (_Unwind_State state,
+		      struct _Unwind_Exception *ue_header,
+		      struct _Unwind_Context *context)
+{
+  if (__builtin_expect (libgcc_s_personality == NULL, 0))
+    pthread_cancel_init ();
+
+  return libgcc_s_personality (state, ue_header, context);
+}
+
+_Unwind_Reason_Code
+_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop,
+		      void *stop_argument)
+{
+  if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0))
+    pthread_cancel_init ();
+
+  return libgcc_s_forcedunwind (exc, stop, stop_argument);
+}
+
+_Unwind_Word
+_Unwind_GetCFA (struct _Unwind_Context *context)
+{
+  if (__builtin_expect (libgcc_s_getcfa == NULL, 0))
+    pthread_cancel_init ();
+
+  return libgcc_s_getcfa (context);
+}
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
new file mode 100644
index 0000000..285b99b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
@@ -0,0 +1,101 @@
+/* Copyright (C) 2003, 2005, 2010 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Jakub Jelinek <jakub@redhat.com>.
+
+   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 <dlfcn.h>
+#include <stdio.h>
+#include <unwind.h>
+
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
+static _Unwind_Reason_Code (*libgcc_s_personality)
+  (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
+
+static void init (void) __attribute_used__;
+
+static void
+init (void)
+{
+  void *resume, *personality;
+  void *handle;
+
+  handle = __libc_dlopen ("libgcc_s.so.1");
+
+  if (handle == NULL
+      || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
+      || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL)
+    __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n");
+
+  libgcc_s_resume = resume;
+  libgcc_s_personality = personality;
+}
+
+/* It's vitally important that _Unwind_Resume not have a stack frame; the
+   ARM unwinder relies on register state at entrance.  So we write this in
+   assembly.  */
+
+asm (
+"	.globl	_Unwind_Resume\n"
+"	.type	_Unwind_Resume, %function\n"
+"_Unwind_Resume:\n"
+"	.cfi_sections .debug_frame\n"
+"	" CFI_STARTPROC "\n"
+"	stmfd	sp!, {r4, r5, r6, lr}\n"
+"	" CFI_ADJUST_CFA_OFFSET (16)" \n"
+"	" CFI_REL_OFFSET (r4, 0) "\n"
+"	" CFI_REL_OFFSET (r5, 4) "\n"
+"	" CFI_REL_OFFSET (r6, 8) "\n"
+"	" CFI_REL_OFFSET (lr, 12) "\n"
+"	" CFI_REMEMBER_STATE "\n"
+"	ldr	r4, 1f\n"
+"	ldr	r5, 2f\n"
+"3:	add	r4, pc, r4\n"
+"	ldr	r3, [r4, r5]\n"
+"	mov	r6, r0\n"
+"	cmp	r3, #0\n"
+"	beq	4f\n"
+"5:	mov	r0, r6\n"
+"	ldmfd	sp!, {r4, r5, r6, lr}\n"
+"	" CFI_ADJUST_CFA_OFFSET (-16) "\n"
+"	" CFI_RESTORE (r4) "\n"
+"	" CFI_RESTORE (r5) "\n"
+"	" CFI_RESTORE (r6) "\n"
+"	" CFI_RESTORE (lr) "\n"
+"	bx	r3\n"
+"	" CFI_RESTORE_STATE "\n"
+"4:	bl	init\n"
+"	ldr	r3, [r4, r5]\n"
+"	b	5b\n"
+"	" CFI_ENDPROC "\n"
+"	.align 2\n"
+#ifdef __thumb2__
+"1:	.word	_GLOBAL_OFFSET_TABLE_ - 3b - 4\n"
+#else
+"1:	.word	_GLOBAL_OFFSET_TABLE_ - 3b - 8\n"
+#endif
+"2:	.word	libgcc_s_resume(GOTOFF)\n"
+"	.size	_Unwind_Resume, .-_Unwind_Resume\n"
+);
+
+_Unwind_Reason_Code
+__gcc_personality_v0 (_Unwind_State state,
+		      struct _Unwind_Exception *ue_header,
+		      struct _Unwind_Context *context)
+{
+  if (__builtin_expect (libgcc_s_personality == NULL, 0))
+    init ();
+  return libgcc_s_personality (state, ue_header, context);
+}
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind.h b/sysdeps/unix/sysv/linux/arm/nptl/unwind.h
new file mode 100644
index 0000000..9b6bed8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind.h
@@ -0,0 +1,278 @@
+/* Header file for the ARM EABI unwinder
+   Copyright (C) 2003, 2004, 2005, 2009  Free Software Foundation, Inc.
+   Contributed by Paul Brook
+
+   This file is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by the
+   Free Software Foundation; either version 2, or (at your option) any
+   later version.
+
+   In addition to the permissions in the GNU General Public License, the
+   Free Software Foundation gives you unlimited permission to link the
+   compiled version of this file into combinations with other programs,
+   and to distribute those combinations without any restriction coming
+   from the use of this file.  (The General Public License restrictions
+   do apply in other respects; for example, they cover modification of
+   the file, and distribution when not linked into a combine
+   executable.)
+
+   This file 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
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* Language-independent unwinder header public defines.  This contains both
+   ABI defined objects, and GNU support routines.  */
+
+#ifndef UNWIND_ARM_H
+#define UNWIND_ARM_H
+
+#define __ARM_EABI_UNWINDER__ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+  typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));
+  typedef signed _Unwind_Sword __attribute__((__mode__(__word__)));
+  typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__)));
+  typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__)));
+  typedef _Unwind_Word _uw;
+  typedef unsigned _uw64 __attribute__((mode(__DI__)));
+  typedef unsigned _uw16 __attribute__((mode(__HI__)));
+  typedef unsigned _uw8 __attribute__((mode(__QI__)));
+
+  typedef enum
+    {
+      _URC_OK = 0,       /* operation completed successfully */
+      _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
+      _URC_END_OF_STACK = 5,
+      _URC_HANDLER_FOUND = 6,
+      _URC_INSTALL_CONTEXT = 7,
+      _URC_CONTINUE_UNWIND = 8,
+      _URC_FAILURE = 9   /* unspecified failure of some kind */
+    }
+  _Unwind_Reason_Code;
+
+  typedef enum
+    {
+      _US_VIRTUAL_UNWIND_FRAME = 0,
+      _US_UNWIND_FRAME_STARTING = 1,
+      _US_UNWIND_FRAME_RESUME = 2,
+      _US_ACTION_MASK = 3,
+      _US_FORCE_UNWIND = 8,
+      _US_END_OF_STACK = 16
+    }
+  _Unwind_State;
+
+  /* Provided only for for compatibility with existing code.  */
+  typedef int _Unwind_Action;
+#define _UA_SEARCH_PHASE	1
+#define _UA_CLEANUP_PHASE	2
+#define _UA_HANDLER_FRAME	4
+#define _UA_FORCE_UNWIND	8
+#define _UA_END_OF_STACK	16
+#define _URC_NO_REASON 	_URC_OK
+
+  typedef struct _Unwind_Control_Block _Unwind_Control_Block;
+  typedef struct _Unwind_Context _Unwind_Context;
+  typedef _uw _Unwind_EHT_Header;
+
+
+  /* UCB: */
+
+  struct _Unwind_Control_Block
+    {
+#ifdef _LIBC
+      /* For the benefit of code which assumes this is a scalar.  All
+	 glibc ever does is clear it.  */
+      _uw64 exception_class;
+#else
+      char exception_class[8];
+#endif
+      void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
+      /* Unwinder cache, private fields for the unwinder's use */
+      struct
+	{
+	  _uw reserved1;  /* Forced unwind stop fn, 0 if not forced */
+	  _uw reserved2;  /* Personality routine address */
+	  _uw reserved3;  /* Saved callsite address */
+	  _uw reserved4;  /* Forced unwind stop arg */
+	  _uw reserved5;
+	}
+      unwinder_cache;
+      /* Propagation barrier cache (valid after phase 1): */
+      struct
+	{
+	  _uw sp;
+	  _uw bitpattern[5];
+	}
+      barrier_cache;
+      /* Cleanup cache (preserved over cleanup): */
+      struct
+	{
+	  _uw bitpattern[4];
+	}
+      cleanup_cache;
+      /* Pr cache (for pr's benefit): */
+      struct
+	{
+	  _uw fnstart;			/* function start address */
+	  _Unwind_EHT_Header *ehtp;	/* pointer to EHT entry header word */
+	  _uw additional;		/* additional data */
+	  _uw reserved1;
+	}
+      pr_cache;
+      long long int :0;	/* Force alignment to 8-byte boundary */
+    };
+
+  /* Virtual Register Set*/
+
+  typedef enum
+    {
+      _UVRSC_CORE = 0,      /* integer register */
+      _UVRSC_VFP = 1,       /* vfp */
+      _UVRSC_FPA = 2,       /* fpa */
+      _UVRSC_WMMXD = 3,     /* Intel WMMX data register */
+      _UVRSC_WMMXC = 4      /* Intel WMMX control register */
+    }
+  _Unwind_VRS_RegClass;
+
+  typedef enum
+    {
+      _UVRSD_UINT32 = 0,
+      _UVRSD_VFPX = 1,
+      _UVRSD_FPAX = 2,
+      _UVRSD_UINT64 = 3,
+      _UVRSD_FLOAT = 4,
+      _UVRSD_DOUBLE = 5
+    }
+  _Unwind_VRS_DataRepresentation;
+
+  typedef enum
+    {
+      _UVRSR_OK = 0,
+      _UVRSR_NOT_IMPLEMENTED = 1,
+      _UVRSR_FAILED = 2
+    }
+  _Unwind_VRS_Result;
+
+  /* Frame unwinding state.  */
+  typedef struct
+    {
+      /* The current word (bytes packed msb first).  */
+      _uw data;
+      /* Pointer to the next word of data.  */
+      _uw *next;
+      /* The number of bytes left in this word.  */
+      _uw8 bytes_left;
+      /* The number of words pointed to by ptr.  */
+      _uw8 words_left;
+    }
+  __gnu_unwind_state;
+
+  typedef _Unwind_Reason_Code (*personality_routine) (_Unwind_State,
+      _Unwind_Control_Block *, _Unwind_Context *);
+
+  _Unwind_VRS_Result _Unwind_VRS_Set(_Unwind_Context *, _Unwind_VRS_RegClass,
+                                     _uw, _Unwind_VRS_DataRepresentation,
+                                     void *);
+
+  _Unwind_VRS_Result _Unwind_VRS_Get(_Unwind_Context *, _Unwind_VRS_RegClass,
+                                     _uw, _Unwind_VRS_DataRepresentation,
+                                     void *);
+
+  _Unwind_VRS_Result _Unwind_VRS_Pop(_Unwind_Context *, _Unwind_VRS_RegClass,
+                                     _uw, _Unwind_VRS_DataRepresentation);
+
+
+  /* Support functions for the PR.  */
+#define _Unwind_Exception _Unwind_Control_Block
+  typedef char _Unwind_Exception_Class[8];
+
+  void * _Unwind_GetLanguageSpecificData (_Unwind_Context *);
+  _Unwind_Ptr _Unwind_GetRegionStart (_Unwind_Context *);
+
+  /* These two should never be used.  */
+  _Unwind_Ptr _Unwind_GetDataRelBase (_Unwind_Context *);
+  _Unwind_Ptr _Unwind_GetTextRelBase (_Unwind_Context *);
+
+  /* Interface functions: */
+  _Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Control_Block *ucbp);
+  void __attribute__((noreturn)) _Unwind_Resume(_Unwind_Control_Block *ucbp);
+  _Unwind_Reason_Code _Unwind_Resume_or_Rethrow (_Unwind_Control_Block *ucbp);
+
+  typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)
+       (int, _Unwind_Action, _Unwind_Exception_Class,
+	_Unwind_Control_Block *, struct _Unwind_Context *, void *);
+  _Unwind_Reason_Code _Unwind_ForcedUnwind (_Unwind_Control_Block *,
+					    _Unwind_Stop_Fn, void *);
+  _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *);
+  void _Unwind_Complete(_Unwind_Control_Block *ucbp);
+  void _Unwind_DeleteException (_Unwind_Exception *);
+
+  _Unwind_Reason_Code __gnu_unwind_frame (_Unwind_Control_Block *,
+					  _Unwind_Context *);
+  _Unwind_Reason_Code __gnu_unwind_execute (_Unwind_Context *,
+					    __gnu_unwind_state *);
+
+  /* Decode an R_ARM_TARGET2 relocation.  */
+  static inline _Unwind_Word
+  _Unwind_decode_target2 (_Unwind_Word ptr)
+    {
+      _Unwind_Word tmp;
+
+      tmp = *(_Unwind_Word *) ptr;
+      /* Zero values are always NULL.  */
+      if (!tmp)
+	return 0;
+
+#if defined(linux) || defined(__NetBSD__)
+      /* Pc-relative indirect.  */
+      tmp += ptr;
+      tmp = *(_Unwind_Word *) tmp;
+#elif defined(__symbian__)
+      /* Absolute pointer.  Nothing more to do.  */
+#else
+      /* Pc-relative pointer.  */
+      tmp += ptr;
+#endif
+      return tmp;
+    }
+
+  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;
+    }
+
+  /* Return the address of the instruction, not the actual IP value.  */
+#define _Unwind_GetIP(context) \
+  (_Unwind_GetGR (context, 15) & ~(_Unwind_Word)1)
+
+  static inline void
+  _Unwind_SetGR (_Unwind_Context *context, int regno, _Unwind_Word val)
+    {
+      _Unwind_VRS_Set (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val);
+    }
+
+  /* The dwarf unwinder doesn't understand arm/thumb state.  We assume the
+     landing pad uses the same instruction set as the call site.  */
+#define _Unwind_SetIP(context, val) \
+  _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1))
+
+typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)
+     (struct _Unwind_Context *, void *);
+
+extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *);
+
+#ifdef __cplusplus
+}   /* extern "C" */
+#endif
+
+#endif /* defined UNWIND_ARM_H */
diff --git a/sysdeps/unix/sysv/linux/arm/oldgetrlimit.c b/sysdeps/unix/sysv/linux/arm/oldgetrlimit.c
new file mode 100644
index 0000000..6e25b02
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/oldgetrlimit.c
@@ -0,0 +1 @@
+/* Empty.  */
diff --git a/sysdeps/unix/sysv/linux/arm/oldsetrlimit.c b/sysdeps/unix/sysv/linux/arm/oldsetrlimit.c
new file mode 100644
index 0000000..6e25b02
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/oldsetrlimit.c
@@ -0,0 +1 @@
+/* Empty.  */
diff --git a/sysdeps/unix/sysv/linux/arm/pread.c b/sysdeps/unix/sysv/linux/arm/pread.c
new file mode 100644
index 0000000..4efe349
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/pread.c
@@ -0,0 +1,60 @@
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
+   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 <errno.h>
+#include <endian.h>
+#include <unistd.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+ssize_t
+__libc_pread (fd, buf, count, offset)
+     int fd;
+     void *buf;
+     size_t count;
+     off_t offset;
+{
+  ssize_t result;
+
+  if (SINGLE_THREAD_P)
+    {
+      /* In the ARM EABI, 64-bit values are aligned to even/odd register
+	 pairs for syscalls.  */
+      result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
+			       __LONG_LONG_PAIR (offset >> 31, offset));
+
+      return result;
+    }
+
+  int oldtype = LIBC_CANCEL_ASYNC ();
+
+  /* In the ARM EABI, 64-bit values are aligned to even/odd register
+     pairs for syscalls.  */
+  result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
+			   __LONG_LONG_PAIR (offset >> 31, offset));
+
+  LIBC_CANCEL_RESET (oldtype);
+
+  return result;
+}
+
+strong_alias (__libc_pread, __pread)
+weak_alias (__libc_pread, pread)
diff --git a/sysdeps/unix/sysv/linux/arm/pread64.c b/sysdeps/unix/sysv/linux/arm/pread64.c
new file mode 100644
index 0000000..59bd9cf
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/pread64.c
@@ -0,0 +1,62 @@
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
+   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 <errno.h>
+#include <endian.h>
+#include <unistd.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+ssize_t
+__libc_pread64 (fd, buf, count, offset)
+     int fd;
+     void *buf;
+     size_t count;
+     off64_t offset;
+{
+  ssize_t result;
+
+  if (SINGLE_THREAD_P)
+    {
+      /* In the ARM EABI, 64-bit values are aligned to even/odd register
+	 pairs for syscalls.  */
+      result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
+			       __LONG_LONG_PAIR ((off_t) (offset >> 32),
+						 (off_t) (offset & 0xffffffff)));
+
+      return result;
+    }
+
+  int oldtype = LIBC_CANCEL_ASYNC ();
+
+  /* In the ARM EABI, 64-bit values are aligned to even/odd register
+     pairs for syscalls.  */
+  result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
+			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
+					     (off_t) (offset & 0xffffffff)));
+
+  LIBC_CANCEL_RESET (oldtype);
+
+  return result;
+}
+
+weak_alias (__libc_pread64, __pread64)
+weak_alias (__libc_pread64, pread64)
diff --git a/sysdeps/unix/sysv/linux/arm/pwrite.c b/sysdeps/unix/sysv/linux/arm/pwrite.c
new file mode 100644
index 0000000..43788e5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/pwrite.c
@@ -0,0 +1,60 @@
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
+   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 <errno.h>
+#include <endian.h>
+#include <unistd.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+ssize_t
+__libc_pwrite (fd, buf, count, offset)
+     int fd;
+     const void *buf;
+     size_t count;
+     off_t offset;
+{
+  ssize_t result;
+
+  if (SINGLE_THREAD_P)
+    {
+      /* In the ARM EABI, 64-bit values are aligned to even/odd register
+	 pairs for syscalls.  */
+      result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
+			       __LONG_LONG_PAIR (offset >> 31, offset));
+
+      return result;
+    }
+
+  int oldtype = LIBC_CANCEL_ASYNC ();
+
+  /* In the ARM EABI, 64-bit values are aligned to even/odd register
+     pairs for syscalls.  */
+  result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
+			   __LONG_LONG_PAIR (offset >> 31, offset));
+
+  LIBC_CANCEL_RESET (oldtype);
+
+  return result;
+}
+
+strong_alias (__libc_pwrite, __pwrite)
+weak_alias (__libc_pwrite, pwrite)
diff --git a/sysdeps/unix/sysv/linux/arm/pwrite64.c b/sysdeps/unix/sysv/linux/arm/pwrite64.c
new file mode 100644
index 0000000..c7bfdaf
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/pwrite64.c
@@ -0,0 +1,63 @@
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
+   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 <errno.h>
+#include <endian.h>
+#include <unistd.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+ssize_t
+__libc_pwrite64 (fd, buf, count, offset)
+     int fd;
+     const void *buf;
+     size_t count;
+     off64_t offset;
+{
+  ssize_t result;
+
+  if (SINGLE_THREAD_P)
+    {
+      /* In the ARM EABI, 64-bit values are aligned to even/odd register
+	 pairs for syscalls.  */
+      result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
+			       __LONG_LONG_PAIR ((off_t) (offset >> 32),
+						 (off_t) (offset & 0xffffffff)));
+
+      return result;
+    }
+
+  int oldtype = LIBC_CANCEL_ASYNC ();
+
+  /* In the ARM EABI, 64-bit values are aligned to even/odd register
+     pairs for syscalls.  */
+  result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
+			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
+					     (off_t) (offset & 0xffffffff)));
+
+  LIBC_CANCEL_RESET (oldtype);
+
+  return result;
+}
+
+weak_alias (__libc_pwrite64, __pwrite64)
+libc_hidden_weak (__pwrite64)
+weak_alias (__libc_pwrite64, pwrite64)
diff --git a/sysdeps/unix/sysv/linux/arm/readahead.c b/sysdeps/unix/sysv/linux/arm/readahead.c
new file mode 100644
index 0000000..2d15b09
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/readahead.c
@@ -0,0 +1,50 @@
+/* Provide kernel hint to read ahead.
+   Copyright (C) 2002, 2003, 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>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <endian.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+
+#ifdef __NR_readahead
+
+ssize_t
+__readahead (int fd, off64_t offset, size_t count)
+{
+  return INLINE_SYSCALL (readahead, 5, fd, 0,
+			 __LONG_LONG_PAIR ((off_t) (offset >> 32),
+					   (off_t) (offset & 0xffffffff)),
+			 count);
+}
+#else
+ssize_t
+__readahead (int fd, off64_t offset, size_t count)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (readahead)
+
+# include <stub-tag.h>
+#endif
+
+weak_alias (__readahead, readahead)
diff --git a/sysdeps/unix/sysv/linux/arm/semctl.c b/sysdeps/unix/sysv/linux/arm/semctl.c
new file mode 100644
index 0000000..1451629
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/semctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/alpha/semctl.c>
diff --git a/sysdeps/unix/sysv/linux/arm/setcontext.S b/sysdeps/unix/sysv/linux/arm/setcontext.S
new file mode 100644
index 0000000..78003f5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/setcontext.S
@@ -0,0 +1,101 @@
+/* Copyright (C) 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/>.  */
+
+#include <sysdep.h>
+#include <rtld-global-offsets.h>
+
+#include "ucontext_i.h"
+
+	.syntax unified
+	.text
+
+/* int setcontext (const ucontext_t *ucp) */
+
+ENTRY(__setcontext)
+	mov	r4, r0
+	add	r0, r0, #UCONTEXT_REGSPACE
+
+        /* Restore the VFP registers.  Copied from arm/eabi/__longjmp.S.  */
+#ifdef PIC
+        ldr     r2, 1f
+        ldr     r1, Lrtld_global_ro
+0:      add     r2, pc, r2
+        ldr     r2, [r2, r1]
+        ldr     r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+#else
+        ldr     r2, Lhwcap
+        ldr     r2, [r2, #0]
+#endif
+
+        tst     r2, #HWCAP_ARM_VFP
+        beq     Lno_vfp_sc
+
+        /* Following instruction is vldmia r0!, {d8-d15}.  */
+        ldc     p11, cr8, [r0], #64
+        /* Restore the floating-point status register.  */
+        ldr     r1, [r0], #4
+        /* Following instruction is fmxr fpscr, r1.  */
+        mcr     p10, 7, r1, cr1, cr0, 0
+Lno_vfp_sc:
+        tst     r2, #HWCAP_ARM_IWMMXT
+        beq     Lno_iwmmxt_sc
+
+        /* Restore the call-preserved iWMMXt registers.  */
+        /* Following instructions are wldrd wr10, [r0], #8 (etc.)  */
+        ldcl    p1, cr10, [r0], #8
+        ldcl    p1, cr11, [r0], #8
+        ldcl    p1, cr12, [r0], #8
+        ldcl    p1, cr13, [r0], #8
+        ldcl    p1, cr14, [r0], #8
+        ldcl    p1, cr15, [r0], #8
+Lno_iwmmxt_sc:
+
+	/* Now bring back the signal status.  */
+	mov	r0, #SIG_SETMASK
+	add	r1, r4, #UCONTEXT_SIGMASK
+	mov	r2, #0
+	bl	PLTJMP(__sigprocmask)
+
+        /* Loading r0-r3 makes makecontext easier.  */
+        add     r14, r4, #MCONTEXT_ARM_R0
+        ldmia   r14, {r0-r12}
+        ldr     r13, [r14, #(MCONTEXT_ARM_SP - MCONTEXT_ARM_R0)]
+        add     r14, r14, #(MCONTEXT_ARM_LR - MCONTEXT_ARM_R0)
+        ldmia   r14, {r14, pc}
+
+END(setcontext)
+weak_alias(__setcontext, setcontext)
+
+	/* Called when a makecontext() context returns.  Start the
+	   context in R4 or fall through to exit().  */
+ENTRY(__startcontext)
+        movs    r0, r4
+        bne     PLTJMP(__setcontext)
+
+        @ New context was 0 - exit
+        b       PLTJMP(_exit)
+END(__startcontext)
+
+#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
+
diff --git a/sysdeps/unix/sysv/linux/arm/shmctl.c b/sysdeps/unix/sysv/linux/arm/shmctl.c
new file mode 100644
index 0000000..c121e99
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/shmctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/alpha/shmctl.c>
diff --git a/sysdeps/unix/sysv/linux/arm/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/sigrestorer.S
new file mode 100644
index 0000000..b8ae839
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/sigrestorer.S
@@ -0,0 +1,121 @@
+/* Copyright (C) 1999, 2005, 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>
+
+/* If no SA_RESTORER function was specified by the application we use
+   one of these.  This avoids the need for the kernel to synthesise a return
+   instruction on the stack, which would involve expensive cache flushes.
+
+   Nowadays (2.6 series, and somewhat earlier) the kernel uses a high page
+   for signal trampolines, so the cache flushes are not an issue.  But since
+   we do not have a vDSO, continue to use these so that we can provide
+   unwind information.
+
+   Start the unwind tables at least one instruction before the signal
+   trampoline, because the unwinder will assume we are returning after
+   a call site.
+
+   Because the signal frame layout changed in 2.6.18, we provide two
+   copies of these functions with different unwind information.  */
+
+/* Used in ENTRY.  */
+#undef cfi_startproc
+#define cfi_startproc \
+	.cfi_startproc simple; \
+	.cfi_signal_frame
+
+/* The CFA is not computed / used correctly here; this is neither trivial to
+   do, nor is it needed.  */
+#define CFI \
+	cfi_def_cfa (sp, 0); \
+	cfi_offset (r0, OFFSET + 0 * 4); \
+	cfi_offset (r1, OFFSET + 1 * 4); \
+	cfi_offset (r2, OFFSET + 2 * 4); \
+	cfi_offset (r3, OFFSET + 3 * 4); \
+	cfi_offset (r4, OFFSET + 4 * 4); \
+	cfi_offset (r5, OFFSET + 5 * 4); \
+	cfi_offset (r6, OFFSET + 6 * 4); \
+	cfi_offset (r7, OFFSET + 7 * 4); \
+	cfi_offset (r8, OFFSET + 8 * 4); \
+	cfi_offset (r9, OFFSET + 9 * 4); \
+	cfi_offset (r10, OFFSET + 10 * 4); \
+	cfi_offset (r11, OFFSET + 11 * 4); \
+	cfi_offset (r12, OFFSET + 12 * 4); \
+	cfi_offset (r13, OFFSET + 13 * 4); \
+	cfi_offset (r14, OFFSET + 14 * 4); \
+	cfi_offset (r15, OFFSET + 15 * 4)
+
+#ifndef __ASSUME_SIGFRAME_V2
+#define OFFSET 12
+	.fnstart
+	.save {r0-r15}
+	.pad #OFFSET
+	nop
+ENTRY(__default_sa_restorer_v1)
+	CFI
+	mov	r7, $SYS_ify(sigreturn)
+	swi	0x0
+	.fnend
+END(__default_sa_restorer_v1)
+#undef OFFSET
+#endif /* __ASSUME_SIGFRAME_V2 */
+
+#define OFFSET 32
+	.fnstart
+	.save {r0-r15}
+	.pad #OFFSET
+	nop
+ENTRY(__default_sa_restorer_v2)
+	CFI
+	mov	r7, $SYS_ify(sigreturn)
+	swi	0x0
+	.fnend
+END(__default_sa_restorer_v2)
+#undef OFFSET
+
+#ifdef __NR_rt_sigreturn
+
+#ifndef __ASSUME_SIGFRAME_V2
+#define OFFSET 168
+	.fnstart
+	.save {r0-r15}
+	.pad #OFFSET
+	nop
+ENTRY(__default_rt_sa_restorer_v1)
+	CFI
+	mov	r7, $SYS_ify(rt_sigreturn)
+	swi	0x0
+	.fnend
+END(__default_rt_sa_restorer_v1)
+#undef OFFSET
+#endif /* __ASSUME_SIGFRAME_V2 */
+
+#define OFFSET 160
+	.fnstart
+	.save {r0-r15}
+	.pad #OFFSET
+	nop
+ENTRY(__default_rt_sa_restorer_v2)
+	CFI
+	mov	r7, $SYS_ify(rt_sigreturn)
+	swi	0x0
+	.fnend
+END(__default_rt_sa_restorer_v2)
+#undef OFFSET
+
+#endif /* __NR_rt_sigreturn */
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
deleted file mode 100644
index 5d238d3..0000000
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 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 <sysdep-cancel.h>
-#include <socketcall.h>
-
-#define P(a, b) P2(a, b)
-#define P2(a, b) a##b
-
-	.text
-/* The socket-oriented system calls are handled unusally in Linux.
-   They are all gated through the single `socketcall' system call number.
-   `socketcall' takes two arguments: the first is the subcode, specifying
-   which socket function is being called; and the second is a pointer to
-   the arguments to the specific function.
-
-   The .S files for the other calls just #define socket and #include this.  */
-
-#ifndef __socket
-# ifndef NO_WEAK_ALIAS
-#  define __socket P(__,socket)
-# else
-#  define __socket socket
-# endif
-#endif
-
-#define PUSHARGS_1	str a1, [sp, $-4]!
-#define PUSHARGS_2	stmfd sp!, {a1, a2}
-#define PUSHARGS_3	stmfd sp!, {a1, a2, a3}
-#define PUSHARGS_4	stmfd sp!, {a1, a2, a3, a4}
-#define PUSHARGS_5	stmfd sp!, {a1, a2, a3, a4}	/* Caller has already pushed arg 5 */
-#define PUSHARGS_6	stmfd sp!, {a1, a2, a3, a4}
-
-#define POPARGS_1	add sp, sp, #4
-#define POPARGS_2	add sp, sp, #8
-#define POPARGS_3	add sp, sp, #12
-#define POPARGS_4	add sp, sp, #16
-#define POPARGS_5	add sp, sp, #16
-#define POPARGS_6	add sp, sp, #16
-
-#ifndef NARGS
-#define NARGS 3			/* If we were called with no wrapper, this is really socket() */
-#endif
-
-#if defined NEED_CANCELLATION && defined CENABLE
-	PSEUDO_PROLOGUE
-#endif
-
-.globl __socket
-ENTRY (__socket)
-	/* This code previously moved sp into ip and stored the args using
-	   stmdb ip!, {a1-a4}.  It did not modify sp, so the stack never had
-	   to be restored after the syscall completed.  It saved an
-	   instruction and meant no stack cleanup work was required.
-
-	   This will not work in the case of a socket call being interrupted
-	   by a signal.  If the signal handler uses any stack the arguments
-	   to socket will be trashed.  The results of a restart of any
-	   socket call are then unpredictable. */
-
-	/* Push args onto the stack.  */
-	P(PUSHARGS_,NARGS)
-
-#if defined NEED_CANCELLATION && defined CENABLE
-	SINGLE_THREAD_P
-	bne 1f
-#endif
-
-        /* Do the system call trap.  */
-	mov a1, $P(SOCKOP_,socket)
-	mov a2, sp
-	swi SYS_ify(socketcall)
-
-	/* Pop args off the stack */
-	P(POPARGS_,NARGS)
-
-	/* r0 is < 0 if there was an error.  */
-	cmn r0, $124
-	RETINSTR(cc, r14)
-	b PLTJMP(SYSCALL_ERROR)
-
-#if defined NEED_CANCELLATION && defined CENABLE
-1:
-	str lr, [sp, #-4]!
-	CENABLE
-	mov ip, r0
-
-	mov r0, #P(SOCKOP_,socket)
-	add r1, sp, #4
-	swi SYS_ify(socketcall)
-
-	str r0, [sp, #-4]!
-	mov r0, ip
-	CDISABLE
-	ldr r0, [sp], #4
-	ldr lr, [sp], #4
-
-	P(POPARGS_,NARGS)
-
-	/* r0 is < 0 if there was an error.  */
-	cmn r0, $124
-	RETINSTR(cc, r14)
-	b PLTJMP(SYSCALL_ERROR)
-#endif
-
-PSEUDO_END (__socket)
-
-#ifndef NO_WEAK_ALIAS
-weak_alias (__socket, socket)
-#endif
diff --git a/sysdeps/unix/sysv/linux/arm/swapcontext.S b/sysdeps/unix/sysv/linux/arm/swapcontext.S
new file mode 100644
index 0000000..09492d0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/swapcontext.S
@@ -0,0 +1,63 @@
+/* Copyright (C) 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/>.  */
+
+#include <sysdep.h>
+
+#include "ucontext_i.h"
+
+	.syntax unified
+	.text
+
+/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */
+
+ENTRY(swapcontext)
+
+	/* Have getcontext() do most of the work then fix up
+	   LR afterwards.  Save R3 to keep the stack aligned.  */
+	push	{r0,r1,r3,r14}
+	cfi_adjust_cfa_offset (16)
+	cfi_rel_offset (r0,0)
+	cfi_rel_offset (r1,4)
+	cfi_rel_offset (r3,8)
+	cfi_rel_offset (r14,12)
+
+	bl	__getcontext
+	mov	r4, r0
+
+	pop	{r0,r1,r3,r14}
+	cfi_adjust_cfa_offset (-16)
+	cfi_restore (r0)
+	cfi_restore (r1)
+	cfi_restore (r3)
+	cfi_restore (r14)
+
+	/* Exit if getcontext() failed.  */
+	cmp 	r4, #0
+	itt	ne
+	movne	r0, r4
+	RETINSTR(ne, r14)
+	
+	/* Fix up LR and the PC.  */
+	str	r13,[r0, #MCONTEXT_ARM_SP]
+	str	r14,[r0, #MCONTEXT_ARM_LR]
+	str	r14,[r0, #MCONTEXT_ARM_PC]
+
+	/* And swap using swapcontext().  */
+	mov	r0, r1
+	b	__setcontext
+
+END(swapcontext)
diff --git a/sysdeps/unix/sysv/linux/arm/syscall.S b/sysdeps/unix/sysv/linux/arm/syscall.S
new file mode 100644
index 0000000..3faf919
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/syscall.S
@@ -0,0 +1,47 @@
+/* Copyright (C) 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/>.  */
+
+#include <sysdep.h>
+
+/* In the EABI syscall interface, we don't need a special syscall to
+   implement syscall().  It won't work reliably with 64-bit arguments
+   (but that is true on many modern platforms).  */
+
+ENTRY (syscall)
+	mov	ip, sp
+	stmfd	sp!, {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)
+	mov	r7, r0
+	mov	r0, r1
+	mov	r1, r2
+	mov	r2, r3
+	ldmfd	ip, {r3, r4, r5, r6}
+	swi	0x0
+	ldmfd	sp!, {r4, r5, r6, r7}
+	cfi_adjust_cfa_offset (-16)
+	cfi_restore (r4)
+	cfi_restore (r5)
+	cfi_restore (r6)
+	cfi_restore (r7)
+	cmn	r0, #4096
+	RETINSTR(cc, lr)
+	b	PLTJMP(syscall_error)
+PSEUDO_END (syscall)
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index 820602b..b8852d9 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -1,9 +1,36 @@
 # File name	Caller	Syscall name	# args	Strong name	Weak names
 
-syscall		-	syscall		7	syscall
-oldgetrlimit	EXTRA	getrlimit	i:ip	__old_getrlimit	getrlimit@GLIBC_2.0
-oldsetrlimit	EXTRA	setrlimit	i:ip	__old_setrlimit	setrlimit@GLIBC_2.0
-
 prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
 
 fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	fanotify_mark
+
+# Semaphore and shm system calls.  msgctl, shmctl, and semctl have C
+# wrappers (to set __IPC_64).
+msgget		-	msgget		i:ii	__msgget	msgget
+msgrcv		-	msgrcv		Ci:ibnii __msgrcv	msgrcv
+msgsnd		-	msgsnd		Ci:ibni	__msgsnd	msgsnd
+shmat		-	shmat		i:ipi	__shmat		shmat
+shmdt		-	shmdt		i:s	__shmdt		shmdt
+shmget		-	shmget		i:iii	__shmget	shmget
+semop		-	semop		i:ipi	__semop		semop
+semtimedop	-	semtimedop	i:ipip	semtimedop
+semget		-	semget		i:iii	__semget	semget
+
+# proper socket implementations:
+accept		-	accept		Ci:iBN	__libc_accept	__accept accept
+bind		-	bind		i:ipi	__bind		bind
+connect		-	connect		Ci:ipi	__libc_connect	__connect_internal __connect connect
+getpeername	-	getpeername	i:ipp	__getpeername	getpeername
+getsockname	-	getsockname	i:ipp	__getsockname	getsockname
+getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
+listen		-	listen		i:ii	__listen	listen
+recv		-	recv		Ci:ibni	__libc_recv	__recv recv
+recvfrom	-	recvfrom	Ci:ibniBN	__libc_recvfrom	__recvfrom recvfrom
+recvmsg		-	recvmsg		Ci:ipi	__libc_recvmsg	__recvmsg recvmsg
+send		-	send		Ci:ibni	__libc_send	__send send
+sendmsg		-	sendmsg		Ci:ipi	__libc_sendmsg	__sendmsg sendmsg
+sendto		-	sendto		Ci:ibnibn	__libc_sendto	__sendto sendto
+setsockopt	-	setsockopt	i:iiibn	__setsockopt	setsockopt
+shutdown	-	shutdown	i:ii	__shutdown	shutdown
+socket		-	socket		i:iii	__socket	socket
+socketpair	-	socketpair	i:iiif	__socketpair	socketpair
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 4d08ea9..be67c21 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -1,5 +1,4 @@
-/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005, 2006, 2009
-   Free Software Foundation, Inc.
+/* Copyright (C) 1992-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
    ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
@@ -29,6 +28,16 @@
 
 #include <tls.h>
 
+#if __NR_SYSCALL_BASE != 0
+# error Kernel headers are too old
+#endif
+
+/* Don't use stime, even if the kernel headers define it.  We have
+   settimeofday, and some EABI kernels have removed stime.  Similarly
+   use setitimer to implement alarm.  */
+#undef __NR_stime
+#undef __NR_alarm
+
 /* In order to get __set_errno() definition in INLINE_SYSCALL.  */
 #ifndef __ASSEMBLER__
 #include <errno.h>
@@ -163,8 +172,14 @@ __local_syscall_error:						\
 # define SYSCALL_ERROR __syscall_error
 #endif
 
+/* The ARM EABI user interface passes the syscall number in r7, instead
+   of in the swi.  This is more efficient, because the kernel does not need
+   to fetch the swi from memory to find out the number; which can be painful
+   with separate I-cache and D-cache.  Make sure to use 0 for the SWI
+   argument; otherwise the (optional) compatibility code for APCS binaries
+   may be invoked.  */
+
 /* Linux takes system call args in registers:
-	syscall number	in the SWI instruction
 	arg 1		r0
 	arg 2		r1
 	arg 3		r2
@@ -190,58 +205,111 @@ __local_syscall_error:						\
 
 */
 
+/* We must save and restore r7 (call-saved) for the syscall number.
+   We never make function calls from inside here (only potentially
+   signal handlers), so we do not bother with doubleword alignment.
+
+   Just like the APCS syscall convention, the EABI syscall convention uses
+   r0 through r6 for up to seven syscall arguments.  None are ever passed to
+   the kernel on the stack, although incoming arguments are on the stack for
+   syscalls with five or more arguments.
+
+   The assembler will convert the literal pool load to a move for most
+   syscalls.  */
+
 #undef	DO_CALL
 #define DO_CALL(syscall_name, args)		\
     DOARGS_##args;				\
-    swi SYS_ify (syscall_name); 		\
+    ldr r7, =SYS_ify (syscall_name);		\
+    swi 0x0;					\
     UNDOARGS_##args
 
-#define DOARGS_0 /* nothing */
-#define DOARGS_1 /* nothing */
-#define DOARGS_2 /* nothing */
-#define DOARGS_3 /* nothing */
-#define DOARGS_4 /* nothing */
-#define DOARGS_5 \
-  str r4, [sp, $-4]!; \
+#undef  DOARGS_0
+#define DOARGS_0 \
+  .fnstart; \
+  str r7, [sp, #-4]!; \
   cfi_adjust_cfa_offset (4); \
+  cfi_rel_offset (r7, 0); \
+  .save { r7 }
+#undef  DOARGS_1
+#define DOARGS_1 DOARGS_0
+#undef  DOARGS_2
+#define DOARGS_2 DOARGS_0
+#undef  DOARGS_3
+#define DOARGS_3 DOARGS_0
+#undef  DOARGS_4
+#define DOARGS_4 DOARGS_0
+#undef  DOARGS_5
+#define DOARGS_5 \
+  .fnstart; \
+  stmfd sp!, {r4, r7}; \
+  cfi_adjust_cfa_offset (8); \
   cfi_rel_offset (r4, 0); \
-  ldr r4, [sp, $4]
+  cfi_rel_offset (r7, 4); \
+  .save { r4, r7 }; \
+  ldr r4, [sp, #8]
+#undef  DOARGS_6
 #define DOARGS_6 \
+  .fnstart; \
   mov ip, sp; \
-  stmfd sp!, {r4, r5}; \
-  cfi_adjust_cfa_offset (8); \
+  stmfd sp!, {r4, r5, r7}; \
+  cfi_adjust_cfa_offset (12); \
   cfi_rel_offset (r4, 0); \
   cfi_rel_offset (r5, 4); \
+  cfi_rel_offset (r7, 8); \
+  .save { r4, r5, r7 }; \
   ldmia ip, {r4, r5}
+#undef  DOARGS_7
 #define DOARGS_7 \
+  .fnstart; \
   mov ip, sp; \
-  stmfd sp!, {r4, r5, r6}; \
-  cfi_adjust_cfa_offset (12); \
+  stmfd sp!, {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); \
+  .save { r4, r5, r6, r7 }; \
   ldmia ip, {r4, r5, r6}
 
-#define UNDOARGS_0 /* nothing */
-#define UNDOARGS_1 /* nothing */
-#define UNDOARGS_2 /* nothing */
-#define UNDOARGS_3 /* nothing */
-#define UNDOARGS_4 /* nothing */
-#define UNDOARGS_5 \
-  ldr r4, [sp], $4; \
+#undef  UNDOARGS_0
+#define UNDOARGS_0 \
+  ldr r7, [sp], #4; \
   cfi_adjust_cfa_offset (-4); \
-  cfi_restore (r4)
-#define UNDOARGS_6 \
-  ldmfd sp!, {r4, r5}; \
+  cfi_restore (r7); \
+  .fnend
+#undef  UNDOARGS_1
+#define UNDOARGS_1 UNDOARGS_0
+#undef  UNDOARGS_2
+#define UNDOARGS_2 UNDOARGS_0
+#undef  UNDOARGS_3
+#define UNDOARGS_3 UNDOARGS_0
+#undef  UNDOARGS_4
+#define UNDOARGS_4 UNDOARGS_0
+#undef  UNDOARGS_5
+#define UNDOARGS_5 \
+  ldmfd sp!, {r4, r7}; \
   cfi_adjust_cfa_offset (-8); \
   cfi_restore (r4); \
-  cfi_restore (r5)
-#define UNDOARGS_7 \
-  ldmfd sp!, {r4, r5, r6}; \
+  cfi_restore (r7); \
+  .fnend
+#undef  UNDOARGS_6
+#define UNDOARGS_6 \
+  ldmfd sp!, {r4, r5, r7}; \
   cfi_adjust_cfa_offset (-12); \
   cfi_restore (r4); \
   cfi_restore (r5); \
-  cfi_restore (r6)
+  cfi_restore (r7); \
+  .fnend
+#undef  UNDOARGS_7
+#define UNDOARGS_7 \
+  ldmfd sp!, {r4, r5, r6, r7}; \
+  cfi_adjust_cfa_offset (-16); \
+  cfi_restore (r4); \
+  cfi_restore (r5); \
+  cfi_restore (r6); \
+  cfi_restore (r7); \
+  .fnend
 
 #else /* not __ASSEMBLER__ */
 
@@ -260,19 +328,46 @@ __local_syscall_error:						\
 #undef INTERNAL_SYSCALL_DECL
 #define INTERNAL_SYSCALL_DECL(err) do { } while (0)
 
-#undef INTERNAL_SYSCALL_RAW
-#define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\
-  ({ unsigned int _sys_result;					\
-     {								\
-       register int _a1 asm ("a1");				\
+#if defined(__thumb__)
+/* We can not expose the use of r7 to the compiler.  GCC (as
+   of 4.5) uses r7 as the hard frame pointer for Thumb - although
+   for Thumb-2 it isn't obviously a better choice than r11.
+   And GCC does not support asms that conflict with the frame
+   pointer.
+
+   This would be easier if syscall numbers never exceeded 255,
+   but they do.  For the moment the LOAD_ARGS_7 is sacrificed.
+   We can't use push/pop inside the asm because that breaks
+   unwinding (i.e. thread cancellation) for this frame.  We can't
+   locally save and restore r7, because we do not know if this
+   function uses r7 or if it is our caller's r7; if it is our caller's,
+   then unwinding will fail higher up the stack.  So we move the
+   syscall out of line and provide its own unwind information.  */
+# undef INTERNAL_SYSCALL_RAW
+# define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\
+  ({								\
+      register int _a1 asm ("a1");				\
+      int _nametmp = name;					\
+      LOAD_ARGS_##nr (args)					\
+      register int _name asm ("ip") = _nametmp;			\
+      asm volatile ("bl      __libc_do_syscall"			\
+                    : "=r" (_a1)				\
+                    : "r" (_name) ASM_ARGS_##nr			\
+                    : "memory", "lr");				\
+      _a1; })
+#else /* ARM */
+# undef INTERNAL_SYSCALL_RAW
+# define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\
+  ({								\
+       register int _a1 asm ("r0"), _nr asm ("r7");		\
        LOAD_ARGS_##nr (args)					\
-       asm volatile ("swi	%1	@ syscall " #name	\
+       _nr = name;						\
+       asm volatile ("swi	0x0	@ syscall " #name	\
 		     : "=r" (_a1)				\
-		     : "i" (name) ASM_ARGS_##nr			\
+		     : "r" (_nr) ASM_ARGS_##nr			\
 		     : "memory");				\
-       _sys_result = _a1;					\
-     }								\
-     (int) _sys_result; })
+       _a1; })
+#endif
 
 #undef INTERNAL_SYSCALL
 #define INTERNAL_SYSCALL(name, err, nr, args...)		\
@@ -321,29 +416,18 @@ __local_syscall_error:						\
   LOAD_ARGS_5 (a1, a2, a3, a4, a5)		\
   register int _v2 asm ("v2") = _v2tmp;
 #define ASM_ARGS_6	ASM_ARGS_5, "r" (_v2)
-#define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7)	\
-  int _v3tmp = (int) (a7);			\
-  LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6)		\
+#ifndef __thumb__
+# define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7)	\
+  int _v3tmp = (int) (a7);				\
+  LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6)			\
   register int _v3 asm ("v3") = _v3tmp;
-#define ASM_ARGS_7	ASM_ARGS_6, "r" (_v3)
-
-/* We can't implement non-constant syscalls directly since the syscall
-   number is normally encoded in the instruction.  So use SYS_syscall.  */
-#define INTERNAL_SYSCALL_NCS(number, err, nr, args...)		\
-	INTERNAL_SYSCALL_NCS_##nr (number, err, args)
-
-#define INTERNAL_SYSCALL_NCS_0(number, err, args...)		\
-	INTERNAL_SYSCALL (syscall, err, 1, number, args)
-#define INTERNAL_SYSCALL_NCS_1(number, err, args...)		\
-	INTERNAL_SYSCALL (syscall, err, 2, number, args)
-#define INTERNAL_SYSCALL_NCS_2(number, err, args...)		\
-	INTERNAL_SYSCALL (syscall, err, 3, number, args)
-#define INTERNAL_SYSCALL_NCS_3(number, err, args...)		\
-	INTERNAL_SYSCALL (syscall, err, 4, number, args)
-#define INTERNAL_SYSCALL_NCS_4(number, err, args...)		\
-	INTERNAL_SYSCALL (syscall, err, 5, number, args)
-#define INTERNAL_SYSCALL_NCS_5(number, err, args...)		\
-	INTERNAL_SYSCALL (syscall, err, 6, number, args)
+# define ASM_ARGS_7	ASM_ARGS_6, "r" (_v3)
+#endif
+
+/* For EABI, non-constant syscalls are actually pretty easy...  */
+#undef INTERNAL_SYSCALL_NCS
+#define INTERNAL_SYSCALL_NCS(number, err, nr, args...)          \
+  INTERNAL_SYSCALL_RAW (number, err, nr, args)
 
 #endif	/* __ASSEMBLER__ */
 
diff --git a/sysdeps/unix/sysv/linux/arm/truncate64.c b/sysdeps/unix/sysv/linux/arm/truncate64.c
new file mode 100644
index 0000000..409bf19
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/truncate64.c
@@ -0,0 +1,74 @@
+/* Copyright (C) 1997-2000, 2003, 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 <sys/types.h>
+#include <endian.h>
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include "kernel-features.h"
+
+#ifdef __NR_truncate64
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+/* The variable is shared between all wrappers around *truncate64 calls.  */
+int __have_no_truncate64;
+#endif
+
+/* Truncate the file FD refers to to LENGTH bytes.  */
+int
+truncate64 (const char *path, off64_t length)
+{
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+  if (! __have_no_truncate64)
+#endif
+    {
+      unsigned int low = length & 0xffffffff;
+      unsigned int high = length >> 32;
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+      int saved_errno = errno;
+#endif
+      int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0,
+				   __LONG_LONG_PAIR (high, low));
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+      if (result != -1 || errno != ENOSYS)
+#endif
+	return result;
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+      __set_errno (saved_errno);
+      __have_no_truncate64 = 1;
+#endif
+    }
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+  if ((off_t) length != length)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+  return __truncate (path, (off_t) length);
+#endif
+}
+
+#else
+/* Use the generic implementation.  */
+# include <misc/truncate64.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/umount.c b/sysdeps/unix/sysv/linux/arm/umount.c
new file mode 100644
index 0000000..d9d671f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/umount.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David Huggins-Daines <dhd@debian.org>, 2000.
+
+   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/>.  */
+
+/* Since we don't have an oldumount system call, do what the kernel
+   does down here.  */
+
+extern long int __umount2 (const char *name, int flags);
+
+long int
+__umount (const char *name)
+{
+  return __umount2 (name, 0);
+}
+
+weak_alias (__umount, umount);
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/readahead.c b/sysdeps/unix/sysv/linux/mips/mips32/readahead.c
index b5b967c..80170c3 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/readahead.c
+++ b/sysdeps/unix/sysv/linux/mips/mips32/readahead.c
@@ -1 +1 @@
-#include <sysdeps/unix/sysv/linux/arm/eabi/readahead.c>
+#include <sysdeps/unix/sysv/linux/arm/readahead.c>

-- 
Joseph S. Myers
joseph@codesourcery.com

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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-21 15:43 Merge sysdeps/unix/sysv/linux/arm/eabi into sysdeps/unix/sysv/linux/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).