diff mbox

[29/29,AARCH64] Make lp64 and ilp32 directories.

Message ID 1414396793-9005-30-git-send-email-apinski@cavium.com
State New
Headers show

Commit Message

Andrew Pinski Oct. 27, 2014, 7:59 a.m. UTC
The patch makes the ilp32 and lp64 have their own directory under aarch64.
Since ILP32 uses most of the same system calls as LP64 and has a 64bit
off_t, we need make the functions that end in 64 the same as the ones without.
We also need not to special case ioctl or use the already provided mmap.c file.

ChangeLog:
	* sysdeps/aarch64/ilp32/Implies: New file.
	* sysdeps/aarch64/Implies: Rename to
	* sysdeps/aarch64/lp64/Implies: This.
	* sysdeps/unix/sysv/linux/aarch64/shlib-versions: Rename to ...
	* sysdeps/unix/sysv/linux/aarch64/lp64/shlib-versions: This.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/Implies: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/Versions: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/dl-fxstatat64.c: New file
	* sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/fstatfs64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncate64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/fxstat.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/fxstat64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/fxstatat64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/getdents.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/getdents64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/getrlimit64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/llseek.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/lxstat64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/mmap64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fadvise64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fallocate.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fallocate64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/pread64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/preadv64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/pwritev64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/semctl.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/sendfile64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/setrlimit64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/statfs64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/statvfs.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/statvfs64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/syscalls.list: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/truncate64.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/shlib-versions: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/creat.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/glob.c: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/kernel_stat.h: New file.
	* sysdeps/unix/sysv/linux/aarch64/ilp32/xstat.c: New file.
---
 sysdeps/aarch64/Implies                            |    6 --
 sysdeps/aarch64/ilp32/Implies                      |    6 ++
 sysdeps/aarch64/lp64/Implies                       |    7 ++
 sysdeps/unix/sysv/linux/aarch64/ilp32/Implies      |    3 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/Versions     |    5 ++
 sysdeps/unix/sysv/linux/aarch64/ilp32/creat.c      |    2 +
 .../unix/sysv/linux/aarch64/ilp32/dl-fxstatat64.c  |    6 ++
 sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate.c  |    1 +
 .../unix/sysv/linux/aarch64/ilp32/fallocate64.c    |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/fstatfs64.c  |    1 +
 .../unix/sysv/linux/aarch64/ilp32/ftruncate64.c    |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/fxstat.c     |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/fxstat64.c   |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/fxstatat.c   |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/fxstatat64.c |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/getdents.c   |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/getdents64.c |    2 +
 .../unix/sysv/linux/aarch64/ilp32/getrlimit64.c    |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/glob.c       |    1 +
 .../unix/sysv/linux/aarch64/ilp32/kernel_stat.h    |   24 +++++++
 sysdeps/unix/sysv/linux/aarch64/ilp32/llseek.c     |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/lxstat64.c   |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/mmap64.c     |    1 +
 .../sysv/linux/aarch64/ilp32/posix_fadvise64.c     |    1 +
 .../sysv/linux/aarch64/ilp32/posix_fallocate.c     |    1 +
 .../sysv/linux/aarch64/ilp32/posix_fallocate64.c   |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/pread64.c    |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/preadv64.c   |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite64.c   |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/pwritev64.c  |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/semctl.c     |   66 ++++++++++++++++++++
 sysdeps/unix/sysv/linux/aarch64/ilp32/sendfile64.c |    1 +
 .../unix/sysv/linux/aarch64/ilp32/setrlimit64.c    |    1 +
 .../unix/sysv/linux/aarch64/ilp32/shlib-versions   |    7 ++
 sysdeps/unix/sysv/linux/aarch64/ilp32/statfs64.c   |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/statvfs.c    |    5 ++
 sysdeps/unix/sysv/linux/aarch64/ilp32/statvfs64.c  |    1 +
 .../unix/sysv/linux/aarch64/ilp32/syscalls.list    |   21 ++++++
 sysdeps/unix/sysv/linux/aarch64/ilp32/truncate64.c |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/xstat.c      |    1 +
 sysdeps/unix/sysv/linux/aarch64/ilp32/xstat64.c    |    1 +
 sysdeps/unix/sysv/linux/aarch64/ioctl.S            |   31 ---------
 sysdeps/unix/sysv/linux/aarch64/lp64/Implies       |    4 +
 sysdeps/unix/sysv/linux/aarch64/lp64/ioctl.S       |   31 +++++++++
 .../unix/sysv/linux/aarch64/lp64/shlib-versions    |    7 ++
 sysdeps/unix/sysv/linux/aarch64/mmap.c             |   34 ----------
 sysdeps/unix/sysv/linux/aarch64/shlib-versions     |    7 --
 47 files changed, 224 insertions(+), 78 deletions(-)
 delete mode 100644 sysdeps/aarch64/Implies
 create mode 100644 sysdeps/aarch64/ilp32/Implies
 create mode 100644 sysdeps/aarch64/lp64/Implies
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/Implies
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/Versions
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/creat.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/dl-fxstatat64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/fstatfs64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncate64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/fxstat.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/fxstat64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/fxstatat.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/fxstatat64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/getdents.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/getdents64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/getrlimit64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/glob.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/kernel_stat.h
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/llseek.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/lxstat64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/mmap64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fadvise64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fallocate.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fallocate64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/pread64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/preadv64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/pwritev64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/semctl.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/sendfile64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/setrlimit64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/shlib-versions
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/statfs64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/statvfs.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/statvfs64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/syscalls.list
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/truncate64.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/xstat.c
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/xstat64.c
 delete mode 100644 sysdeps/unix/sysv/linux/aarch64/ioctl.S
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/lp64/Implies
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/lp64/ioctl.S
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/lp64/shlib-versions
 delete mode 100644 sysdeps/unix/sysv/linux/aarch64/mmap.c
 delete mode 100644 sysdeps/unix/sysv/linux/aarch64/shlib-versions

Comments

Joseph Myers Oct. 27, 2014, 6:07 p.m. UTC | #1
On Mon, 27 Oct 2014, Andrew Pinski wrote:

> The patch makes the ilp32 and lp64 have their own directory under aarch64.
> Since ILP32 uses most of the same system calls as LP64 and has a 64bit
> off_t, we need make the functions that end in 64 the same as the ones without.
> We also need not to special case ioctl or use the already provided mmap.c file.

I'd expect you to need to move the ABI test baselines to the lp64 
directory, and to add new baselines for ILP32 in the corresponding 
directory, but I don't see that in this patch series.  What do your glibc 
test results look like?  (I don't know if c++-types.data needs to move and 
have an ILP32 version as well, but I'd guess at least some affected types 
are different and so it does.)
diff mbox

Patch

diff --git a/sysdeps/aarch64/Implies b/sysdeps/aarch64/Implies
deleted file mode 100644
index e5adf4d..0000000
--- a/sysdeps/aarch64/Implies
+++ /dev/null
@@ -1,6 +0,0 @@ 
-wordsize-64
-ieee754/ldbl-128
-ieee754/dbl-64/wordsize-64
-ieee754/dbl-64
-ieee754/flt-32
-aarch64/soft-fp
diff --git a/sysdeps/aarch64/ilp32/Implies b/sysdeps/aarch64/ilp32/Implies
new file mode 100644
index 0000000..705bc5b
--- /dev/null
+++ b/sysdeps/aarch64/ilp32/Implies
@@ -0,0 +1,6 @@ 
+aarch64
+wordsize-32
+ieee754/ldbl-128
+ieee754/dbl-64
+ieee754/flt-32
+aarch64/soft-fp
diff --git a/sysdeps/aarch64/lp64/Implies b/sysdeps/aarch64/lp64/Implies
new file mode 100644
index 0000000..d2fbde7
--- /dev/null
+++ b/sysdeps/aarch64/lp64/Implies
@@ -0,0 +1,7 @@ 
+aarch64
+wordsize-64
+ieee754/ldbl-128
+ieee754/dbl-64/wordsize-64
+ieee754/dbl-64
+ieee754/flt-32
+aarch64/soft-fp
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/Implies b/sysdeps/unix/sysv/linux/aarch64/ilp32/Implies
new file mode 100644
index 0000000..a88511b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/Implies
@@ -0,0 +1,3 @@ 
+aarch64/nptl
+unix/sysv/linux/aarch64
+unix/sysv/linux/generic
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/Versions b/sysdeps/unix/sysv/linux/aarch64/ilp32/Versions
new file mode 100644
index 0000000..58b6bfb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/Versions
@@ -0,0 +1,5 @@ 
+libc {
+  GLIBC_2.21 {
+    fallocate64;
+  }
+}
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/creat.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/creat.c
new file mode 100644
index 0000000..05feb3d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/creat.c
@@ -0,0 +1,2 @@ 
+#include <sysdeps/unix/sysv/linux/generic/creat.c>
+weak_alias (__libc_creat, creat64)
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/dl-fxstatat64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/dl-fxstatat64.c
new file mode 100644
index 0000000..339e5f4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/dl-fxstatat64.c
@@ -0,0 +1,6 @@ 
+/* In this implementation we do not really care whether the call fails
+   because of missing kernel support since we do not even call the
+   function in this case.  */
+#undef __ASSUME_ATFCTS
+#define __ASSUME_ATFCTS 1
+#include "fxstatat.c"
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate.c
new file mode 100644
index 0000000..d3b7218
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate.c
@@ -0,0 +1 @@ 
+#include <sysdeps/unix/sysv/linux/wordsize-64/fallocate.c>
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate64.c
new file mode 100644
index 0000000..df33112
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate64.c
@@ -0,0 +1 @@ 
+/* fallocate64 is in posix_fallocate.c */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/fstatfs64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/fstatfs64.c
new file mode 100644
index 0000000..2be4e59
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/fstatfs64.c
@@ -0,0 +1 @@ 
+/* fstatfs64 is the same as fstatfs. */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncate64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncate64.c
new file mode 100644
index 0000000..673a8b5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncate64.c
@@ -0,0 +1 @@ 
+/* ftruncate64 is the same as ftruncate. */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/fxstat.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/fxstat.c
new file mode 100644
index 0000000..272b6be
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/fxstat.c
@@ -0,0 +1 @@ 
+#include <sysdeps/unix/sysv/linux/wordsize-64/fxstat.c>
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/fxstat64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/fxstat64.c
new file mode 100644
index 0000000..9eff9eb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/fxstat64.c
@@ -0,0 +1 @@ 
+/* fxstat64 is in fxstat.c */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/fxstatat.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/fxstatat.c
new file mode 100644
index 0000000..689cd57
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/fxstatat.c
@@ -0,0 +1 @@ 
+#include <sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c>
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/fxstatat64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/fxstatat64.c
new file mode 100644
index 0000000..05e7f41
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/fxstatat64.c
@@ -0,0 +1 @@ 
+/* fxstatat64 is in fxstatat.c */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/getdents.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/getdents.c
new file mode 100644
index 0000000..14dbbc7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/getdents.c
@@ -0,0 +1 @@ 
+/* Defined in getdents64.c */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/getdents64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/getdents64.c
new file mode 100644
index 0000000..08987ea
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/getdents64.c
@@ -0,0 +1,2 @@ 
+#include <sysdeps/unix/sysv/linux/generic/getdents64.c>
+strong_alias (__getdents64, __getdents)
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/getrlimit64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/getrlimit64.c
new file mode 100644
index 0000000..9feab0e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/getrlimit64.c
@@ -0,0 +1 @@ 
+/* getrlimit64 is the same as getrlimit. */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/glob.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/glob.c
new file mode 100644
index 0000000..e542747
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/glob.c
@@ -0,0 +1 @@ 
+#include <sysdeps/wordsize-64/glob.c>
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/kernel_stat.h b/sysdeps/unix/sysv/linux/aarch64/ilp32/kernel_stat.h
new file mode 100644
index 0000000..91e01ba
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/kernel_stat.h
@@ -0,0 +1,24 @@ 
+/* Copyright (C) 2011-2014 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
+
+   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 <sysdeps/unix/sysv/linux/generic/kernel_stat.h>
+
+/* ILP32 has no overflow checks. */
+#ifndef __LP64__
+#define XSTAT_IS_XSTAT64 1
+#endif
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/llseek.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/llseek.c
new file mode 100644
index 0000000..24013a8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/llseek.c
@@ -0,0 +1 @@ 
+/* lseek() is 64-bit capable already.  */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/lxstat64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/lxstat64.c
new file mode 100644
index 0000000..bb5dbd0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/lxstat64.c
@@ -0,0 +1 @@ 
+/* lxstat64 is in lxstat.c */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/mmap64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/mmap64.c
new file mode 100644
index 0000000..8e32bae
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/mmap64.c
@@ -0,0 +1 @@ 
+/* mmap64 is provided by mmap as they are the same. */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fadvise64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fadvise64.c
new file mode 100644
index 0000000..c9f72c4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fadvise64.c
@@ -0,0 +1 @@ 
+/* posix_fadvise64 is in posix_fadvise.c */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fallocate.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fallocate.c
new file mode 100644
index 0000000..b3fe81b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fallocate.c
@@ -0,0 +1 @@ 
+#include <sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c>
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fallocate64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fallocate64.c
new file mode 100644
index 0000000..f466f13
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fallocate64.c
@@ -0,0 +1 @@ 
+/* posix_fallocate64 is in posix_fallocate.c */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/pread64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/pread64.c
new file mode 100644
index 0000000..b7f298d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/pread64.c
@@ -0,0 +1 @@ 
+/* Empty since the pread syscall is equivalent.  */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/preadv64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/preadv64.c
new file mode 100644
index 0000000..0a20301
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/preadv64.c
@@ -0,0 +1 @@ 
+/* preadv64 is the same as preadv. */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite64.c
new file mode 100644
index 0000000..b7f298d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite64.c
@@ -0,0 +1 @@ 
+/* Empty since the pread syscall is equivalent.  */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/pwritev64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/pwritev64.c
new file mode 100644
index 0000000..e96c6f2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/pwritev64.c
@@ -0,0 +1 @@ 
+/* pwritev64 is the same as pwritev. */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/semctl.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/semctl.c
new file mode 100644
index 0000000..0652405
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/semctl.c
@@ -0,0 +1,66 @@ 
+/* Copyright (C) 2007-2014 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 <stdarg.h>
+#include <sys/sem.h>
+#include <ipc_priv.h>
+#include <sysdep.h>
+
+/* Define a `union semun' that is for glibc here.  */
+union semun
+{
+  int val;			/* value for SETVAL */
+  struct semid_ds *buf;		/* buffer for IPC_STAT & IPC_SET */
+  unsigned short int *array;	/* array for GETALL & SETALL */
+  struct seminfo *__buf;	/* buffer for IPC_INFO */
+};
+
+union semun_kernel
+{
+  int val;			/* value for SETVAL */
+  unsigned long long kern_ptr;
+};
+
+int __semctl (int semid, int semnum, int cmd, ...);
+
+int
+__semctl (int semid, int semnum, int cmd, ...)
+{
+  union semun arg;
+  union semun_kernel arg_real;
+  va_list ap;
+
+  va_start (ap, cmd);
+
+  /* Get the argument.  */
+  arg = va_arg (ap, union semun);
+
+  va_end (ap);
+
+  arg_real.kern_ptr = 0;
+  if (cmd == SETVAL)
+    arg_real.val = arg.val;
+  else
+    arg_real.kern_ptr = (unsigned long long)(uintptr_t)arg.array;
+
+  return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd,
+			 arg_real.kern_ptr);
+}
+
+#include <shlib-compat.h>
+versioned_symbol (libc, __semctl, semctl, GLIBC_2_0);
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/sendfile64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/sendfile64.c
new file mode 100644
index 0000000..4c451bd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/sendfile64.c
@@ -0,0 +1 @@ 
+/* sendfile64 is alias of sendfile syscall.  */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/setrlimit64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/setrlimit64.c
new file mode 100644
index 0000000..8edcff0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/setrlimit64.c
@@ -0,0 +1 @@ 
+/* setrlimit64 is the same as setrlimit. */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/shlib-versions b/sysdeps/unix/sysv/linux/aarch64/ilp32/shlib-versions
new file mode 100644
index 0000000..17db764
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/shlib-versions
@@ -0,0 +1,7 @@ 
+DEFAULT			GLIBC_2.21
+
+%ifdef HAVE_AARCH64_BE
+ld=ld-linux-aarch64_be_ilp32.so.1
+%else
+ld=ld-linux-aarch64_ilp32.so.1
+%endif
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/statfs64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/statfs64.c
new file mode 100644
index 0000000..06bc688
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/statfs64.c
@@ -0,0 +1 @@ 
+/* statfs64 is the same as statfs. */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/statvfs.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/statvfs.c
new file mode 100644
index 0000000..48a1d6d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/statvfs.c
@@ -0,0 +1,5 @@ 
+#define __statvfs64(file, buf) __no_statvfs64(file, buf)
+#define statvfs64(file, buf) no_statvfs64(file, buf)
+#include "sysdeps/unix/sysv/linux/statvfs.c"
+strong_alias (statvfs, __statvfs64)
+weak_alias (statvfs, statvfs64)
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/statvfs64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/statvfs64.c
new file mode 100644
index 0000000..510015e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/statvfs64.c
@@ -0,0 +1 @@ 
+/* statvfs64 is the same as statvfs. */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/syscalls.list b/sysdeps/unix/sysv/linux/aarch64/ilp32/syscalls.list
new file mode 100644
index 0000000..1a3834b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/syscalls.list
@@ -0,0 +1,21 @@ 
+# File name	Caller	Syscall name	# args	Strong name	Weak names
+
+truncate	-	truncate	i:si	truncate	__truncate truncate64
+ftruncate	-	ftruncate	i:ii	__ftruncate	ftruncate ftruncate64 __ftruncate64
+preadv		-	preadv		Ci:ipii	preadv		preadv64
+pwritev		-	pwritev		Ci:ipii	pwritev		pwritev64
+pread		-	pread64		Ci:ibni	__libc_pread	__libc_pread64 __pread pread __pread64 pread64
+pwrite		-	pwrite64	Ci:ibni	__libc_pwrite	__libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
+readahead	-	readahead	i:iii	__readahead	readahead
+getrlimit	-	getrlimit	i:ip	__getrlimit	getrlimit getrlimit64
+setrlimit	-	setrlimit	i:ip	__setrlimit	setrlimit setrlimit64
+prlimit		EXTRA	prlimit64	i:iipp	prlimit		
+sendfile	-	sendfile	i:iipi	sendfile	sendfile64
+lseek		-	lseek		Ci:iii	__libc_lseek	__lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64
+sync_file_range	-	sync_file_range	Ci:iiii	sync_file_range
+mmap		-	mmap		b:aniiii	__mmap		mmap __mmap64 mmap64
+posix_fadvise   -       fadvise64       Vi:iiii posix_fadvise   posix_fadvise64
+fstatfs		-	fstatfs		i:ip	__fstatfs	fstatfs fstatfs64 __fstatfs64
+statfs		-	statfs		i:sp	__statfs	statfs statfs64 __statfs64
+fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	fanotify_mark
+
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/truncate64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/truncate64.c
new file mode 100644
index 0000000..8999768
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/truncate64.c
@@ -0,0 +1 @@ 
+/* truncate64 is the same as truncate. */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/xstat.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/xstat.c
new file mode 100644
index 0000000..96927fe
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/xstat.c
@@ -0,0 +1 @@ 
+#include <sysdeps/unix/sysv/linux/generic/xstat.c>
diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/xstat64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/xstat64.c
new file mode 100644
index 0000000..e7acd3b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/xstat64.c
@@ -0,0 +1 @@ 
+/* xstat64 is in xstat.c */
diff --git a/sysdeps/unix/sysv/linux/aarch64/ioctl.S b/sysdeps/unix/sysv/linux/aarch64/ioctl.S
deleted file mode 100644
index 8920a20..0000000
--- a/sysdeps/unix/sysv/linux/aarch64/ioctl.S
+++ /dev/null
@@ -1,31 +0,0 @@ 
-/* Copyright (C) 2012-2014 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>
-
-	.text
-ENTRY(__ioctl)
-	mov	x8, #__NR_ioctl
-	sxtw	x0, w0
-	svc	#0x0
-	cmn	x0, #4095
-	b.cs	.Lsyscall_error
-	ret
-PSEUDO_END (__ioctl)
-
-weak_alias (__ioctl, ioctl)
diff --git a/sysdeps/unix/sysv/linux/aarch64/lp64/Implies b/sysdeps/unix/sysv/linux/aarch64/lp64/Implies
new file mode 100644
index 0000000..6418211
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/lp64/Implies
@@ -0,0 +1,4 @@ 
+aarch64/nptl
+unix/sysv/linux/aarch64
+unix/sysv/linux/generic
+unix/sysv/linux/wordsize-64
diff --git a/sysdeps/unix/sysv/linux/aarch64/lp64/ioctl.S b/sysdeps/unix/sysv/linux/aarch64/lp64/ioctl.S
new file mode 100644
index 0000000..8920a20
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/lp64/ioctl.S
@@ -0,0 +1,31 @@ 
+/* Copyright (C) 2012-2014 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>
+
+	.text
+ENTRY(__ioctl)
+	mov	x8, #__NR_ioctl
+	sxtw	x0, w0
+	svc	#0x0
+	cmn	x0, #4095
+	b.cs	.Lsyscall_error
+	ret
+PSEUDO_END (__ioctl)
+
+weak_alias (__ioctl, ioctl)
diff --git a/sysdeps/unix/sysv/linux/aarch64/lp64/shlib-versions b/sysdeps/unix/sysv/linux/aarch64/lp64/shlib-versions
new file mode 100644
index 0000000..e1768a7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/lp64/shlib-versions
@@ -0,0 +1,7 @@ 
+DEFAULT			GLIBC_2.17
+
+%ifdef HAVE_AARCH64_BE
+ld=ld-linux-aarch64_be.so.1
+%else
+ld=ld-linux-aarch64.so.1
+%endif
diff --git a/sysdeps/unix/sysv/linux/aarch64/mmap.c b/sysdeps/unix/sysv/linux/aarch64/mmap.c
deleted file mode 100644
index 54ecc10..0000000
--- a/sysdeps/unix/sysv/linux/aarch64/mmap.c
+++ /dev/null
@@ -1,34 +0,0 @@ 
-/* Copyright (C) 2009-2014 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 <sys/mman.h>
-#include <errno.h>
-#include <sys/syscall.h>
-#include <sysdep.h>
-#include <unistd.h>
-
-__ptr_t
-__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
-{
-  return (__ptr_t) INLINE_SYSCALL (mmap, 6, addr, len, prot, flags, fd, offset);
-}
-
-weak_alias (__mmap, mmap)
-weak_alias (__mmap, mmap64)
-weak_alias (__mmap, __mmap64)
diff --git a/sysdeps/unix/sysv/linux/aarch64/shlib-versions b/sysdeps/unix/sysv/linux/aarch64/shlib-versions
deleted file mode 100644
index e1768a7..0000000
--- a/sysdeps/unix/sysv/linux/aarch64/shlib-versions
+++ /dev/null
@@ -1,7 +0,0 @@ 
-DEFAULT			GLIBC_2.17
-
-%ifdef HAVE_AARCH64_BE
-ld=ld-linux-aarch64_be.so.1
-%else
-ld=ld-linux-aarch64.so.1
-%endif