Blame SOURCES/ltrace-0.7.91-aarch64.patch

e7106e
diff --git a/README b/README
e7106e
index 414bdfb..a04b767 100644
e7106e
--- a/README
e7106e
+++ b/README
e7106e
@@ -24,6 +24,7 @@ The following targets are currently (at least somewhat) supported.
e7106e
 Some of them may be more or less broken in reality, it is not feasible
e7106e
 to test each release comprehensively on each target.
e7106e
 
e7106e
+	aarch64-*-linux-gnu
e7106e
 	armv6l-*-linux-gnueabi
e7106e
 	armv7l-*-linux-gnueabihf
e7106e
 	i[4567]86-*-linux-gnu
e7106e
@@ -81,7 +82,7 @@ quick one-liner), it is advisable to send an e-mail beforehand.
e7106e
 
e7106e
 
e7106e
 -------------------------------------------------------------------------------
e7106e
-Copyright (C) 2012,2013 Petr Machata <pmachata@redhat.com>
e7106e
+Copyright (C) 2012-2014 Petr Machata <pmachata@redhat.com>
e7106e
 Copyright (C) 1997-2009 Juan Cespedes <cespedes@debian.org>
e7106e
 This file is part of ltrace.
e7106e
 
e7106e
diff --git a/configure.ac b/configure.ac
e7106e
index c6e6bf0..0e9a124 100644
e7106e
--- a/configure.ac
e7106e
+++ b/configure.ac
e7106e
@@ -1,6 +1,6 @@
e7106e
 # -*- Autoconf -*-
e7106e
 # This file is part of ltrace.
e7106e
-# Copyright (C) 2010,2012,2013 Petr Machata, Red Hat Inc.
e7106e
+# Copyright (C) 2010,2012,2013,2014 Petr Machata, Red Hat Inc.
e7106e
 # Copyright (C) 2010,2011 Joe Damato
e7106e
 # Copyright (C) 2010 Marc Kleine-Budde
e7106e
 # Copyright (C) 2010 Zachary T Welch
e7106e
@@ -399,6 +399,7 @@ AC_CONFIG_FILES([
e7106e
 	Makefile
e7106e
 	sysdeps/Makefile
e7106e
 	sysdeps/linux-gnu/Makefile
e7106e
+	sysdeps/linux-gnu/aarch64/Makefile
e7106e
 	sysdeps/linux-gnu/alpha/Makefile
e7106e
 	sysdeps/linux-gnu/arm/Makefile
e7106e
 	sysdeps/linux-gnu/cris/Makefile
e7106e
diff --git a/etc/libc.so.conf b/etc/libc.so.conf
e7106e
index 669c50a..48b3b01 100644
e7106e
--- a/etc/libc.so.conf
e7106e
+++ b/etc/libc.so.conf
e7106e
@@ -1,5 +1,12 @@
e7106e
 # See ltrace.conf(5) for description of syntax of this file.
e7106e
 
e7106e
+# XXX ltrace misses long double and long long support
e7106e
+typedef ldouble = double;
e7106e
+typedef llong = long;
e7106e
+typedef ullong = ulong;
e7106e
+
e7106e
+void __libc_start_main(hide(void*), hide(int), array(string, arg2));
e7106e
+
e7106e
 # arpa/inet.h
e7106e
 typedef in_addr = struct(hex(uint));
e7106e
 int inet_aton(string, +in_addr*);
e7106e
@@ -233,9 +240,22 @@ void setbuffer(file,addr,ulong);
e7106e
 void setlinebuf(file);
e7106e
 int rename(string,string);
e7106e
 
e7106e
+# xlocale.h
e7106e
+typedef locale_t = void*;
e7106e
+locale_t newlocale(hex(int), string, locale_t);
e7106e
+
e7106e
 # stdlib.h
e7106e
-long __strtol_internal(string,addr,int);
e7106e
-ulong __strtoul_internal(string,addr,int);
e7106e
+long __strtol_internal(string, +string*, int);
e7106e
+ulong __strtoul_internal(string, +string*, int);
e7106e
+
e7106e
+double strtod(string, +string*);
e7106e
+float strtof(string, +string*);
e7106e
+ldouble strtold(string, +string*);
e7106e
+
e7106e
+double strtod_l(string, +string*, locale_t);
e7106e
+float strtof_l(string, +string*, locale_t);
e7106e
+ldouble strtold_l(string, +string*, locale_t);
e7106e
+
e7106e
 int atexit(addr);
e7106e
 addr bsearch(string, addr, ulong, ulong, addr);
e7106e
 addr calloc(ulong, ulong);
e7106e
@@ -343,6 +363,10 @@ addr gmtime(addr);
e7106e
 addr localtime(addr);
e7106e
 ulong strftime(+string2,ulong,string,addr);
e7106e
 long time(addr);
e7106e
+# XXX in fact (time_t, long), which may be (llong, long) on 32-bit
e7106e
+# arches.  We don't have llong as of this writing.
e7106e
+typedef timespec = struct(long, long);
e7106e
+int nanosleep(timespec*, timespec*);
e7106e
 
e7106e
 # unistd.h
e7106e
 void _exit(int);
e7106e
diff --git a/etc/syscalls.conf b/etc/syscalls.conf
e7106e
index 562f4e7..09d347d 100644
e7106e
--- a/etc/syscalls.conf
e7106e
+++ b/etc/syscalls.conf
e7106e
@@ -1,6 +1,10 @@
e7106e
 # syscall.conf -- system call prototypes
e7106e
 # See ltrace.conf(5) for description of syntax of this file.
e7106e
 
e7106e
+# Special value used to indicate the *at functions should use the
e7106e
+# current working directory.
e7106e
+typedef at_dirfd_t = enum[int](AT_FDCWD=-100);
e7106e
+
e7106e
 addr brk(addr);
e7106e
 int close(int);
e7106e
 int execve(string,addr,addr);
e7106e
@@ -14,7 +18,7 @@ int getpid();
e7106e
 addr mmap(addr,ulong,int,int,int,long);
e7106e
 
e7106e
 int munmap(addr,ulong);
e7106e
-int open(string,int,octal);
e7106e
+int open(string, hex(uint), oct(uint));
e7106e
 int personality(uint);
e7106e
 long read(int,+string0,ulong);
e7106e
 int stat(string,addr);
e7106e
@@ -113,3 +117,30 @@ ulong writev(int,addr,int);
e7106e
 int mprotect(addr,int,int);
e7106e
 int access(string,octal);
e7106e
 int getdents(uint, void *, uint);
e7106e
+
e7106e
+int openat(at_dirfd_t, string, hex(uint), oct(uint));
e7106e
+int mknodat(at_dirfd_t, string, oct(uint), ushort)
e7106e
+int mkdirat(at_dirfd_t, string, oct(uint));
e7106e
+int unlinkat(at_dirfd_t, string, hex(uint));
e7106e
+int symlinkat(string, at_dirfd_t, string);
e7106e
+int linkat(at_dirfd_t, string, at_dirfd_t, string, hex(uint));
e7106e
+int renameat(at_dirfd_t, string, at_dirfd_t, string);
e7106e
+int faccessat(at_dirfd_t, string, oct(uint), hex(uint));
e7106e
+int fchmodat(at_dirfd_t, string, oct(uint), hex(uint));
e7106e
+int fchownat(at_dirfd_t, string, int, int, hex(uint));
e7106e
+int readlinkat(at_dirfd_t, string, +string[arg4], ulong);
e7106e
+int fstatat(at_dirfd_t, string, addr, hex(uint));
e7106e
+int utimensat(at_dirfd_t, string, addr, hex(uint));
e7106e
+int futimens(int, addr);
e7106e
+int futimesat(at_dirfd_t, string, addr);
e7106e
+addr shmat(int, addr, hex(uint));
e7106e
+int shmdt(addr);
e7106e
+
e7106e
+typedef fid_type = enum(FILEID_ROOT=0, FILEID_INO32_GEN=1, FILEID_INO32_GEN_PARENT=2, FILEID_BTRFS_WITHOUT_PARENT=0x4d, FILEID_BTRFS_WITH_PARENT=0x4e, FILEID_BTRFS_WITH_PARENT_ROOT=0x4f, FILEID_UDF_WITHOUT_PARENT=0x51, FILEID_UDF_WITH_PARENT=0x52, FILEID_NILFS_WITHOUT_PARENT=0x61, FILEID_NILFS_WITH_PARENT=0x62);
e7106e
+typedef file_handle = struct(uint, fid_type, array(hex(char), elt1)*);
e7106e
+int name_to_handle_at(at_dirfd_t, string, file_handle, int*, hex(uint));
e7106e
+int open_by_handle_at(at_dirfd_t, file_handle, hex(uint));
e7106e
+
e7106e
+int newfstatat(at_dirfd_t, string, addr, hex(uint));
e7106e
+int creat(string, oct(int));
e7106e
+int ustat(ushort, addr);
e7106e
diff --git a/sysdeps/linux-gnu/Makefile.am b/sysdeps/linux-gnu/Makefile.am
e7106e
index ecee577..ec26162 100644
e7106e
--- a/sysdeps/linux-gnu/Makefile.am
e7106e
+++ b/sysdeps/linux-gnu/Makefile.am
e7106e
@@ -1,4 +1,5 @@
e7106e
 # This file is part of ltrace.
e7106e
+# Copyright (C) 2014 Petr Machata, Red Hat, Inc.
e7106e
 # Copyright (C) 2010,2012 Marc Kleine-Budde, Pengutronix
e7106e
 #
e7106e
 # This program is free software; you can redistribute it and/or
e7106e
@@ -16,7 +17,8 @@
e7106e
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
e7106e
 # 02110-1301 USA
e7106e
 
e7106e
-DIST_SUBDIRS = alpha arm cris ia64 m68k metag mips ppc s390 sparc x86
e7106e
+DIST_SUBDIRS = aarch64 alpha arm cris ia64 m68k metag mips ppc s390	\
e7106e
+	       sparc x86
e7106e
 
e7106e
 SUBDIRS = \
e7106e
 	$(HOST_CPU)
e7106e
diff --git a/sysdeps/linux-gnu/aarch64/Makefile.am b/sysdeps/linux-gnu/aarch64/Makefile.am
e7106e
new file mode 100644
e7106e
index 0000000..0af4e6e
e7106e
--- /dev/null
e7106e
+++ b/sysdeps/linux-gnu/aarch64/Makefile.am
e7106e
@@ -0,0 +1,25 @@
e7106e
+# This file is part of ltrace.
e7106e
+# Copyright (C) 2014 Petr Machata, Red Hat, Inc.
e7106e
+#
e7106e
+# This program is free software; you can redistribute it and/or
e7106e
+# modify it under the terms of the GNU General Public License as
e7106e
+# published by the Free Software Foundation; either version 2 of the
e7106e
+# License, or (at your option) any later version.
e7106e
+#
e7106e
+# This program is distributed in the hope that it will be useful, but
e7106e
+# WITHOUT ANY WARRANTY; without even the implied warranty of
e7106e
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
e7106e
+# General Public License for more details.
e7106e
+#
e7106e
+# You should have received a copy of the GNU General Public License
e7106e
+# along with this program; if not, write to the Free Software
e7106e
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
e7106e
+# 02110-1301 USA
e7106e
+
e7106e
+noinst_LTLIBRARIES = ../libcpu.la
e7106e
+
e7106e
+___libcpu_la_SOURCES = fetch.c plt.c regs.c trace.c
e7106e
+
e7106e
+noinst_HEADERS = arch.h ptrace.h signalent.h syscallent.h
e7106e
+
e7106e
+MAINTAINERCLEANFILES = Makefile.in
e7106e
diff --git a/sysdeps/linux-gnu/aarch64/arch.h b/sysdeps/linux-gnu/aarch64/arch.h
e7106e
new file mode 100644
e7106e
index 0000000..4137613
e7106e
--- /dev/null
e7106e
+++ b/sysdeps/linux-gnu/aarch64/arch.h
e7106e
@@ -0,0 +1,37 @@
e7106e
+/*
e7106e
+ * This file is part of ltrace.
e7106e
+ * Copyright (C) 2014 Petr Machata, Red Hat, Inc.
e7106e
+ *
e7106e
+ * This program is free software; you can redistribute it and/or
e7106e
+ * modify it under the terms of the GNU General Public License as
e7106e
+ * published by the Free Software Foundation; either version 2 of the
e7106e
+ * License, or (at your option) any later version.
e7106e
+ *
e7106e
+ * This program is distributed in the hope that it will be useful, but
e7106e
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
e7106e
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
e7106e
+ * General Public License for more details.
e7106e
+ *
e7106e
+ * You should have received a copy of the GNU General Public License
e7106e
+ * along with this program; if not, write to the Free Software
e7106e
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
e7106e
+ * 02110-1301 USA
e7106e
+ */
e7106e
+#ifndef LTRACE_AARCH64_ARCH_H
e7106e
+#define LTRACE_AARCH64_ARCH_H
e7106e
+
e7106e
+/* | 31                 21 | 20       5 | 4       0 | *
e7106e
+ * | 1 1 0 1 0 1 0 0 0 0 1 |    imm16   | 0 0 0 0 0 | */
e7106e
+#define BREAKPOINT_VALUE { 0xd4, 0x20, 0, 0 }
e7106e
+#define BREAKPOINT_LENGTH 4
e7106e
+#define DECR_PC_AFTER_BREAK 0
e7106e
+
e7106e
+#define LT_ELFCLASS	ELFCLASS64
e7106e
+#define LT_ELF_MACHINE	EM_AARCH64
e7106e
+
e7106e
+#define ARCH_HAVE_FETCH_ARG
e7106e
+#define ARCH_ENDIAN_BIG
e7106e
+#define ARCH_HAVE_SIZEOF
e7106e
+#define ARCH_HAVE_ALIGNOF
e7106e
+
e7106e
+#endif /* LTRACE_AARCH64_ARCH_H */
e7106e
diff --git a/sysdeps/linux-gnu/aarch64/fetch.c b/sysdeps/linux-gnu/aarch64/fetch.c
e7106e
new file mode 100644
e7106e
index 0000000..8779f03
e7106e
--- /dev/null
e7106e
+++ b/sysdeps/linux-gnu/aarch64/fetch.c
e7106e
@@ -0,0 +1,365 @@
e7106e
+/*
e7106e
+ * This file is part of ltrace.
e7106e
+ * Copyright (C) 2014 Petr Machata, Red Hat, Inc.
e7106e
+ *
e7106e
+ * This program is free software; you can redistribute it and/or
e7106e
+ * modify it under the terms of the GNU General Public License as
e7106e
+ * published by the Free Software Foundation; either version 2 of the
e7106e
+ * License, or (at your option) any later version.
e7106e
+ *
e7106e
+ * This program is distributed in the hope that it will be useful, but
e7106e
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
e7106e
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
e7106e
+ * General Public License for more details.
e7106e
+ *
e7106e
+ * You should have received a copy of the GNU General Public License
e7106e
+ * along with this program; if not, write to the Free Software
e7106e
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
e7106e
+ * 02110-1301 USA
e7106e
+ */
e7106e
+
e7106e
+#include <sys/ptrace.h>
e7106e
+#include <asm/ptrace.h>
e7106e
+#include <stdlib.h>
e7106e
+#include <string.h>
e7106e
+
e7106e
+#include "fetch.h"
e7106e
+#include "proc.h"
e7106e
+#include "type.h"
e7106e
+#include "value.h"
e7106e
+
e7106e
+int aarch64_read_gregs(struct process *proc, struct user_pt_regs *regs);
e7106e
+int aarch64_read_fregs(struct process *proc, struct user_fpsimd_state *regs);
e7106e
+
e7106e
+
e7106e
+struct fetch_context
e7106e
+{
e7106e
+	struct user_pt_regs gregs;
e7106e
+	struct user_fpsimd_state fpregs;
e7106e
+	arch_addr_t nsaa;
e7106e
+	unsigned ngrn;
e7106e
+	unsigned nsrn;
e7106e
+	arch_addr_t x8;
e7106e
+};
e7106e
+
e7106e
+static int
e7106e
+context_init(struct fetch_context *context, struct process *proc)
e7106e
+{
e7106e
+	if (aarch64_read_gregs(proc, &context->gregs) < 0
e7106e
+	    || aarch64_read_fregs(proc, &context->fpregs) < 0)
e7106e
+		return -1;
e7106e
+
e7106e
+	context->ngrn = 0;
e7106e
+	context->nsrn = 0;
e7106e
+	/* XXX double cast */
e7106e
+	context->nsaa = (arch_addr_t) (uintptr_t) context->gregs.sp;
e7106e
+	context->x8 = 0;
e7106e
+
e7106e
+	return 0;
e7106e
+}
e7106e
+
e7106e
+struct fetch_context *
e7106e
+arch_fetch_arg_clone(struct process *proc, struct fetch_context *context)
e7106e
+{
e7106e
+	struct fetch_context *ret = malloc(sizeof(*ret));
e7106e
+	if (ret == NULL)
e7106e
+		return NULL;
e7106e
+	return memcpy(ret, context, sizeof(*ret));
e7106e
+}
e7106e
+
e7106e
+static void
e7106e
+fetch_next_gpr(struct fetch_context *context, unsigned char *buf)
e7106e
+{
e7106e
+	uint64_t u = context->gregs.regs[context->ngrn++];
e7106e
+	memcpy(buf, &u, 8);
e7106e
+}
e7106e
+
e7106e
+static int
e7106e
+fetch_gpr(struct fetch_context *context, struct value *value, size_t sz)
e7106e
+{
e7106e
+	if (sz < 8)
e7106e
+		sz = 8;
e7106e
+
e7106e
+	unsigned char *buf = value_reserve(value, sz);
e7106e
+	if (buf == NULL)
e7106e
+		return -1;
e7106e
+
e7106e
+	size_t i;
e7106e
+	for (i = 0; i < sz; i += 8)
e7106e
+		fetch_next_gpr(context, buf + i);
e7106e
+
e7106e
+	return 0;
e7106e
+}
e7106e
+
e7106e
+static void
e7106e
+fetch_next_sse(struct fetch_context *context, unsigned char *buf, size_t sz)
e7106e
+{
e7106e
+	__int128 u = context->fpregs.vregs[context->nsrn++];
e7106e
+	memcpy(buf, &u, sz);
e7106e
+}
e7106e
+
e7106e
+static int
e7106e
+fetch_sse(struct fetch_context *context, struct value *value, size_t sz)
e7106e
+{
e7106e
+	unsigned char *buf = value_reserve(value, sz);
e7106e
+	if (buf == NULL)
e7106e
+		return -1;
e7106e
+
e7106e
+	fetch_next_sse(context, buf, sz);
e7106e
+	return 0;
e7106e
+}
e7106e
+
e7106e
+static int
e7106e
+fetch_hfa(struct fetch_context *context,
e7106e
+	  struct value *value, struct arg_type_info *hfa_t, size_t count)
e7106e
+{
e7106e
+	size_t sz = type_sizeof(value->inferior, hfa_t);
e7106e
+	unsigned char *buf = value_reserve(value, sz * count);
e7106e
+	if (buf == NULL)
e7106e
+		return -1;
e7106e
+
e7106e
+	size_t i;
e7106e
+	for (i = 0; i < count; ++i) {
e7106e
+		fetch_next_sse(context, buf, sz);
e7106e
+		buf += sz;
e7106e
+	}
e7106e
+	return 0;
e7106e
+}
e7106e
+
e7106e
+static int
e7106e
+fetch_stack(struct fetch_context *context, struct value *value,
e7106e
+	    size_t align, size_t sz)
e7106e
+{
e7106e
+	if (align < 8)
e7106e
+		align = 8;
e7106e
+	size_t amount = ((sz + align - 1) / align) * align;
e7106e
+
e7106e
+	/* XXX double casts */
e7106e
+	uintptr_t sp = (uintptr_t) context->nsaa;
e7106e
+	sp = ((sp + align - 1) / align) * align;
e7106e
+
e7106e
+	value_in_inferior(value, (arch_addr_t) sp);
e7106e
+
e7106e
+	sp += amount;
e7106e
+	context->nsaa = (arch_addr_t) sp;
e7106e
+
e7106e
+	return 0;
e7106e
+}
e7106e
+
e7106e
+enum convert_method {
e7106e
+	CVT_ERR = -1,
e7106e
+	CVT_NOP = 0,
e7106e
+	CVT_BYREF,
e7106e
+};
e7106e
+
e7106e
+enum fetch_method {
e7106e
+	FETCH_NOP,
e7106e
+	FETCH_STACK,
e7106e
+	FETCH_GPR,
e7106e
+	FETCH_SSE,
e7106e
+	FETCH_HFA,
e7106e
+};
e7106e
+
e7106e
+struct fetch_script {
e7106e
+	enum convert_method c;
e7106e
+	enum fetch_method f;
e7106e
+	size_t sz;
e7106e
+	struct arg_type_info *hfa_t;
e7106e
+	size_t count;
e7106e
+};
e7106e
+
e7106e
+static struct fetch_script
e7106e
+pass_arg(struct fetch_context const *context,
e7106e
+	 struct process *proc, struct arg_type_info *info)
e7106e
+{
e7106e
+	enum fetch_method cvt = CVT_NOP;
e7106e
+
e7106e
+	size_t sz = type_sizeof(proc, info);
e7106e
+	if (sz == (size_t) -1)
e7106e
+		return (struct fetch_script) { CVT_ERR, FETCH_NOP, sz };
e7106e
+
e7106e
+	switch (info->type) {
e7106e
+	case ARGTYPE_VOID:
e7106e
+		return (struct fetch_script) { cvt, FETCH_NOP, sz };
e7106e
+
e7106e
+	case ARGTYPE_STRUCT:
e7106e
+	case ARGTYPE_ARRAY:;
e7106e
+		size_t count;
e7106e
+		struct arg_type_info *hfa_t = type_get_hfa_type(info, &count);
e7106e
+		if (hfa_t != NULL && count <= 4) {
e7106e
+			if (context->nsrn + count <= 8)
e7106e
+				return (struct fetch_script)
e7106e
+					{ cvt, FETCH_HFA, sz, hfa_t, count };
e7106e
+			return (struct fetch_script)
e7106e
+				{ cvt, FETCH_STACK, sz, hfa_t, count };
e7106e
+		}
e7106e
+
e7106e
+		if (sz <= 16) {
e7106e
+			size_t count = sz / 8;
e7106e
+			if (context->ngrn + count <= 8)
e7106e
+				return (struct fetch_script)
e7106e
+					{ cvt, FETCH_GPR, sz };
e7106e
+		}
e7106e
+
e7106e
+		cvt = CVT_BYREF;
e7106e
+		sz = 8;
e7106e
+		/* Fall through.  */
e7106e
+
e7106e
+	case ARGTYPE_POINTER:
e7106e
+	case ARGTYPE_INT:
e7106e
+	case ARGTYPE_UINT:
e7106e
+	case ARGTYPE_LONG:
e7106e
+	case ARGTYPE_ULONG:
e7106e
+	case ARGTYPE_CHAR:
e7106e
+	case ARGTYPE_SHORT:
e7106e
+	case ARGTYPE_USHORT:
e7106e
+		if (context->ngrn < 8 && sz <= 8)
e7106e
+			return (struct fetch_script) { cvt, FETCH_GPR, sz };
e7106e
+		/* We don't support types wider than 8 bytes as of
e7106e
+		 * now.  */
e7106e
+		assert(sz <= 8);
e7106e
+
e7106e
+		return (struct fetch_script) { cvt, FETCH_STACK, sz };
e7106e
+
e7106e
+	case ARGTYPE_FLOAT:
e7106e
+	case ARGTYPE_DOUBLE:
e7106e
+		if (context->nsrn < 8) {
e7106e
+			/* ltrace doesn't support float128.  */
e7106e
+			assert(sz <= 8);
e7106e
+			return (struct fetch_script) { cvt, FETCH_SSE, sz };
e7106e
+		}
e7106e
+
e7106e
+		return (struct fetch_script) { cvt, FETCH_STACK, sz };
e7106e
+	}
e7106e
+
e7106e
+	assert(! "Failed to allocate argument.");
e7106e
+	abort();
e7106e
+}
e7106e
+
e7106e
+static int
e7106e
+convert_arg(struct value *value, struct fetch_script how)
e7106e
+{
e7106e
+	switch (how.c) {
e7106e
+	case CVT_NOP:
e7106e
+		return 0;
e7106e
+	case CVT_BYREF:
e7106e
+		return value_pass_by_reference(value);
e7106e
+	case CVT_ERR:
e7106e
+		return -1;
e7106e
+	}
e7106e
+
e7106e
+	assert(! "Don't know how to convert argument.");
e7106e
+	abort();
e7106e
+}
e7106e
+
e7106e
+static int
e7106e
+fetch_arg(struct fetch_context *context,
e7106e
+	  struct process *proc, struct arg_type_info *info,
e7106e
+	  struct value *value, struct fetch_script how)
e7106e
+{
e7106e
+	if (convert_arg(value, how) < 0)
e7106e
+		return -1;
e7106e
+
e7106e
+	switch (how.f) {
e7106e
+	case FETCH_NOP:
e7106e
+		return 0;
e7106e
+
e7106e
+	case FETCH_STACK:
e7106e
+		if (how.hfa_t != NULL && how.count != 0 && how.count <= 8)
e7106e
+			context->nsrn = 8;
e7106e
+		return fetch_stack(context, value,
e7106e
+				   type_alignof(proc, info), how.sz);
e7106e
+
e7106e
+	case FETCH_GPR:
e7106e
+		return fetch_gpr(context, value, how.sz);
e7106e
+
e7106e
+	case FETCH_SSE:
e7106e
+		return fetch_sse(context, value, how.sz);
e7106e
+
e7106e
+	case FETCH_HFA:
e7106e
+		return fetch_hfa(context, value, how.hfa_t, how.count);
e7106e
+	}
e7106e
+
e7106e
+	assert(! "Don't know how to fetch argument.");
e7106e
+	abort();
e7106e
+}
e7106e
+
e7106e
+struct fetch_context *
e7106e
+arch_fetch_arg_init(enum tof type, struct process *proc,
e7106e
+		    struct arg_type_info *ret_info)
e7106e
+{
e7106e
+	struct fetch_context *context = malloc(sizeof *context);
e7106e
+	if (context == NULL || context_init(context, proc) < 0) {
e7106e
+	fail:
e7106e
+		free(context);
e7106e
+		return NULL;
e7106e
+	}
e7106e
+
e7106e
+	/* There's a provision in ARMv8 parameter passing convention
e7106e
+	 * for returning types that, if passed as first argument to a
e7106e
+	 * function, would be passed on stack.  For those types, x8
e7106e
+	 * contains an address where the return argument should be
e7106e
+	 * placed.  The callee doesn't need to preserve the value of
e7106e
+	 * x8, so we need to fetch it now.
e7106e
+	 *
e7106e
+	 * To my knowledge, there are currently no types where this
e7106e
+	 * holds, but the code is here, utterly untested.  */
e7106e
+
e7106e
+	struct fetch_script how = pass_arg(context, proc, ret_info);
e7106e
+	if (how.c == CVT_ERR)
e7106e
+		goto fail;
e7106e
+	if (how.c == CVT_NOP && how.f == FETCH_STACK) {
e7106e
+		/* XXX double cast.  */
e7106e
+		context->x8 = (arch_addr_t) (uintptr_t) context->gregs.regs[8];
e7106e
+		/* See the comment above about the assert.  */
e7106e
+		assert(! "Unexpected: first argument passed on stack.");
e7106e
+		abort();
e7106e
+	}
e7106e
+
e7106e
+	return context;
e7106e
+}
e7106e
+
e7106e
+int
e7106e
+arch_fetch_arg_next(struct fetch_context *context, enum tof type,
e7106e
+		    struct process *proc, struct arg_type_info *info,
e7106e
+		    struct value *value)
e7106e
+{
e7106e
+	return fetch_arg(context, proc, info, value,
e7106e
+			 pass_arg(context, proc, info));
e7106e
+}
e7106e
+
e7106e
+int
e7106e
+arch_fetch_retval(struct fetch_context *context, enum tof type,
e7106e
+		  struct process *proc, struct arg_type_info *info,
e7106e
+		  struct value *value)
e7106e
+{
e7106e
+	if (context->x8 != 0) {
e7106e
+		value_in_inferior(value, context->x8);
e7106e
+		return 0;
e7106e
+	}
e7106e
+
e7106e
+	if (context_init(context, proc) < 0)
e7106e
+		return -1;
e7106e
+
e7106e
+	return fetch_arg(context, proc, info, value,
e7106e
+			 pass_arg(context, proc, info));
e7106e
+}
e7106e
+
e7106e
+void
e7106e
+arch_fetch_arg_done(struct fetch_context *context)
e7106e
+{
e7106e
+	if (context != NULL)
e7106e
+		free(context);
e7106e
+}
e7106e
+
e7106e
+size_t
e7106e
+arch_type_sizeof(struct process *proc, struct arg_type_info *arg)
e7106e
+{
e7106e
+	return (size_t) -2;
e7106e
+}
e7106e
+
e7106e
+size_t
e7106e
+arch_type_alignof(struct process *proc, struct arg_type_info *arg)
e7106e
+{
e7106e
+	return (size_t) -2;
e7106e
+}
e7106e
diff --git a/sysdeps/linux-gnu/aarch64/plt.c b/sysdeps/linux-gnu/aarch64/plt.c
e7106e
new file mode 100644
e7106e
index 0000000..29dc4c9
e7106e
--- /dev/null
e7106e
+++ b/sysdeps/linux-gnu/aarch64/plt.c
e7106e
@@ -0,0 +1,38 @@
e7106e
+/*
e7106e
+ * This file is part of ltrace.
e7106e
+ * Copyright (C) 2014 Petr Machata, Red Hat, Inc.
e7106e
+ *
e7106e
+ * This program is free software; you can redistribute it and/or
e7106e
+ * modify it under the terms of the GNU General Public License as
e7106e
+ * published by the Free Software Foundation; either version 2 of the
e7106e
+ * License, or (at your option) any later version.
e7106e
+ *
e7106e
+ * This program is distributed in the hope that it will be useful, but
e7106e
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
e7106e
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
e7106e
+ * General Public License for more details.
e7106e
+ *
e7106e
+ * You should have received a copy of the GNU General Public License
e7106e
+ * along with this program; if not, write to the Free Software
e7106e
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
e7106e
+ * 02110-1301 USA
e7106e
+ */
e7106e
+
e7106e
+#include <gelf.h>
e7106e
+
e7106e
+#include "backend.h"
e7106e
+#include "proc.h"
e7106e
+#include "library.h"
e7106e
+#include "ltrace-elf.h"
e7106e
+
e7106e
+arch_addr_t
e7106e
+sym2addr(struct process *proc, struct library_symbol *sym)
e7106e
+{
e7106e
+	return sym->enter_addr;
e7106e
+}
e7106e
+
e7106e
+GElf_Addr
e7106e
+arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela *rela)
e7106e
+{
e7106e
+	return lte->plt_addr + 32 + ndx * 16;
e7106e
+}
e7106e
diff --git a/sysdeps/linux-gnu/aarch64/ptrace.h b/sysdeps/linux-gnu/aarch64/ptrace.h
e7106e
new file mode 100644
e7106e
index 0000000..283c314
e7106e
--- /dev/null
e7106e
+++ b/sysdeps/linux-gnu/aarch64/ptrace.h
e7106e
@@ -0,0 +1,22 @@
e7106e
+/*
e7106e
+ * This file is part of ltrace.
e7106e
+ * Copyright (C) 2014 Petr Machata, Red Hat, Inc.
e7106e
+ *
e7106e
+ * This program is free software; you can redistribute it and/or
e7106e
+ * modify it under the terms of the GNU General Public License as
e7106e
+ * published by the Free Software Foundation; either version 2 of the
e7106e
+ * License, or (at your option) any later version.
e7106e
+ *
e7106e
+ * This program is distributed in the hope that it will be useful, but
e7106e
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
e7106e
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
e7106e
+ * General Public License for more details.
e7106e
+ *
e7106e
+ * You should have received a copy of the GNU General Public License
e7106e
+ * along with this program; if not, write to the Free Software
e7106e
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
e7106e
+ * 02110-1301 USA
e7106e
+ */
e7106e
+
e7106e
+#include <sys/ptrace.h>
e7106e
+#include <asm/ptrace.h>
e7106e
diff --git a/sysdeps/linux-gnu/aarch64/regs.c b/sysdeps/linux-gnu/aarch64/regs.c
e7106e
new file mode 100644
e7106e
index 0000000..06eb72b
e7106e
--- /dev/null
e7106e
+++ b/sysdeps/linux-gnu/aarch64/regs.c
e7106e
@@ -0,0 +1,131 @@
e7106e
+/*
e7106e
+ * This file is part of ltrace.
e7106e
+ * Copyright (C) 2014 Petr Machata, Red Hat, Inc.
e7106e
+ *
e7106e
+ * This program is free software; you can redistribute it and/or
e7106e
+ * modify it under the terms of the GNU General Public License as
e7106e
+ * published by the Free Software Foundation; either version 2 of the
e7106e
+ * License, or (at your option) any later version.
e7106e
+ *
e7106e
+ * This program is distributed in the hope that it will be useful, but
e7106e
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
e7106e
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
e7106e
+ * General Public License for more details.
e7106e
+ *
e7106e
+ * You should have received a copy of the GNU General Public License
e7106e
+ * along with this program; if not, write to the Free Software
e7106e
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
e7106e
+ * 02110-1301 USA
e7106e
+ */
e7106e
+
e7106e
+#include <sys/ptrace.h>
e7106e
+#include <asm/ptrace.h>
e7106e
+#include <linux/uio.h>
e7106e
+#include <assert.h>
e7106e
+#include <stdlib.h>
e7106e
+#include <stdio.h>
e7106e
+
e7106e
+#include "backend.h"
e7106e
+#include "proc.h"
e7106e
+
e7106e
+#define PC_OFF (32 * 4)
e7106e
+
e7106e
+int
e7106e
+aarch64_read_gregs(struct process *proc, struct user_pt_regs *regs)
e7106e
+{
e7106e
+	*regs = (struct user_pt_regs) {};
e7106e
+	struct iovec iovec;
e7106e
+	iovec.iov_base = regs;
e7106e
+	iovec.iov_len = sizeof *regs;
e7106e
+	return ptrace(PTRACE_GETREGSET, proc->pid, NT_PRSTATUS, &iovec) < 0
e7106e
+		? -1 : 0;
e7106e
+}
e7106e
+
e7106e
+int
e7106e
+aarch64_write_gregs(struct process *proc, struct user_pt_regs *regs)
e7106e
+{
e7106e
+	struct iovec iovec;
e7106e
+	iovec.iov_base = regs;
e7106e
+	iovec.iov_len = sizeof *regs;
e7106e
+	return ptrace(PTRACE_SETREGSET, proc->pid, NT_PRSTATUS, &iovec) < 0
e7106e
+		? -1 : 0;
e7106e
+}
e7106e
+
e7106e
+int
e7106e
+aarch64_read_fregs(struct process *proc, struct user_fpsimd_state *regs)
e7106e
+{
e7106e
+	*regs = (struct user_fpsimd_state) {};
e7106e
+	struct iovec iovec;
e7106e
+	iovec.iov_base = regs;
e7106e
+	iovec.iov_len = sizeof *regs;
e7106e
+	return ptrace(PTRACE_GETREGSET, proc->pid, NT_FPREGSET, &iovec) < 0
e7106e
+		? -1 : 0;
e7106e
+}
e7106e
+
e7106e
+arch_addr_t
e7106e
+get_instruction_pointer(struct process *proc)
e7106e
+{
e7106e
+	struct user_pt_regs regs;
e7106e
+	if (aarch64_read_gregs(proc, &regs) < 0) {
e7106e
+		fprintf(stderr, "get_instruction_pointer: "
e7106e
+			"Couldn't read registers of %d.\n", proc->pid);
e7106e
+		return 0;
e7106e
+	}
e7106e
+
e7106e
+	/* 
e7106e
+	char buf[128];
e7106e
+	sprintf(buf, "cat /proc/%d/maps", proc->pid);
e7106e
+	system(buf);
e7106e
+	*/
e7106e
+
e7106e
+	/* XXX double cast */
e7106e
+	return (arch_addr_t) (uintptr_t) regs.pc;
e7106e
+}
e7106e
+
e7106e
+void
e7106e
+set_instruction_pointer(struct process *proc, arch_addr_t addr)
e7106e
+{
e7106e
+	struct user_pt_regs regs;
e7106e
+	if (aarch64_read_gregs(proc, &regs) < 0) {
e7106e
+		fprintf(stderr, "get_instruction_pointer: "
e7106e
+			"Couldn't read registers of %d.\n", proc->pid);
e7106e
+		return;
e7106e
+	}
e7106e
+
e7106e
+	/* XXX double cast */
e7106e
+	regs.pc = (uint64_t) (uintptr_t) addr;
e7106e
+
e7106e
+	if (aarch64_write_gregs(proc, &regs) < 0) {
e7106e
+		fprintf(stderr, "get_instruction_pointer: "
e7106e
+			"Couldn't write registers of %d.\n", proc->pid);
e7106e
+		return;
e7106e
+	}
e7106e
+}
e7106e
+
e7106e
+arch_addr_t
e7106e
+get_stack_pointer(struct process *proc)
e7106e
+{
e7106e
+	struct user_pt_regs regs;
e7106e
+	if (aarch64_read_gregs(proc, &regs) < 0) {
e7106e
+		fprintf(stderr, "get_stack_pointer: "
e7106e
+			"Couldn't read registers of %d.\n", proc->pid);
e7106e
+		return 0;
e7106e
+	}
e7106e
+
e7106e
+	/* XXX double cast */
e7106e
+	return (arch_addr_t) (uintptr_t) regs.sp;
e7106e
+}
e7106e
+
e7106e
+arch_addr_t
e7106e
+get_return_addr(struct process *proc, arch_addr_t stack_pointer)
e7106e
+{
e7106e
+	struct user_pt_regs regs;
e7106e
+	if (aarch64_read_gregs(proc, &regs) < 0) {
e7106e
+		fprintf(stderr, "get_return_addr: "
e7106e
+			"Couldn't read registers of %d.\n", proc->pid);
e7106e
+		return 0;
e7106e
+	}
e7106e
+
e7106e
+	/* XXX double cast */
e7106e
+	return (arch_addr_t) (uintptr_t) regs.regs[30];
e7106e
+}
e7106e
diff --git a/sysdeps/linux-gnu/aarch64/signalent.h b/sysdeps/linux-gnu/aarch64/signalent.h
e7106e
new file mode 100644
e7106e
index 0000000..bf56ebc
e7106e
--- /dev/null
e7106e
+++ b/sysdeps/linux-gnu/aarch64/signalent.h
e7106e
@@ -0,0 +1,52 @@
e7106e
+/*
e7106e
+ * This file is part of ltrace.
e7106e
+ * Copyright (C) 2006 Ian Wienand
e7106e
+ *
e7106e
+ * This program is free software; you can redistribute it and/or
e7106e
+ * modify it under the terms of the GNU General Public License as
e7106e
+ * published by the Free Software Foundation; either version 2 of the
e7106e
+ * License, or (at your option) any later version.
e7106e
+ *
e7106e
+ * This program is distributed in the hope that it will be useful, but
e7106e
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
e7106e
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
e7106e
+ * General Public License for more details.
e7106e
+ *
e7106e
+ * You should have received a copy of the GNU General Public License
e7106e
+ * along with this program; if not, write to the Free Software
e7106e
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
e7106e
+ * 02110-1301 USA
e7106e
+ */
e7106e
+
e7106e
+	"SIG_0",			/* 0 */
e7106e
+	"SIGHUP",			/* 1 */
e7106e
+	"SIGINT",			/* 2 */
e7106e
+	"SIGQUIT",			/* 3 */
e7106e
+	"SIGILL",			/* 4 */
e7106e
+	"SIGTRAP",			/* 5 */
e7106e
+	"SIGABRT",			/* 6 */
e7106e
+	"SIGBUS",			/* 7 */
e7106e
+	"SIGFPE",			/* 8 */
e7106e
+	"SIGKILL",			/* 9 */
e7106e
+	"SIGUSR1",			/* 10 */
e7106e
+	"SIGSEGV",			/* 11 */
e7106e
+	"SIGUSR2",			/* 12 */
e7106e
+	"SIGPIPE",			/* 13 */
e7106e
+	"SIGALRM",			/* 14 */
e7106e
+	"SIGTERM",			/* 15 */
e7106e
+	"SIGSTKFLT",			/* 16 */
e7106e
+	"SIGCHLD",			/* 17 */
e7106e
+	"SIGCONT",			/* 18 */
e7106e
+	"SIGSTOP",			/* 19 */
e7106e
+	"SIGTSTP",			/* 20 */
e7106e
+	"SIGTTIN",			/* 21 */
e7106e
+	"SIGTTOU",			/* 22 */
e7106e
+	"SIGURG",			/* 23 */
e7106e
+	"SIGXCPU",			/* 24 */
e7106e
+	"SIGXFSZ",			/* 25 */
e7106e
+	"SIGVTALRM",			/* 26 */
e7106e
+	"SIGPROF",			/* 27 */
e7106e
+	"SIGWINCH",			/* 28 */
e7106e
+	"SIGIO",			/* 29 */
e7106e
+	"SIGPWR",			/* 30 */
e7106e
+	"SIGSYS",			/* 31 */
e7106e
diff --git a/sysdeps/linux-gnu/aarch64/syscallent.h b/sysdeps/linux-gnu/aarch64/syscallent.h
e7106e
new file mode 100644
e7106e
index 0000000..aca8191
e7106e
--- /dev/null
e7106e
+++ b/sysdeps/linux-gnu/aarch64/syscallent.h
e7106e
@@ -0,0 +1,1100 @@
e7106e
+/*
e7106e
+ * This file is part of ltrace.
e7106e
+ * Copyright (C) 2014 Petr Machata, Red Hat, Inc.
e7106e
+ *
e7106e
+ * This program is free software; you can redistribute it and/or
e7106e
+ * modify it under the terms of the GNU General Public License as
e7106e
+ * published by the Free Software Foundation; either version 2 of the
e7106e
+ * License, or (at your option) any later version.
e7106e
+ *
e7106e
+ * This program is distributed in the hope that it will be useful, but
e7106e
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
e7106e
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
e7106e
+ * General Public License for more details.
e7106e
+ *
e7106e
+ * You should have received a copy of the GNU General Public License
e7106e
+ * along with this program; if not, write to the Free Software
e7106e
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
e7106e
+ * 02110-1301 USA
e7106e
+ */
e7106e
+
e7106e
+	"io_setup",                        /* 0 */
e7106e
+	"io_destroy",                      /* 1 */
e7106e
+	"io_submit",                       /* 2 */
e7106e
+	"io_cancel",                       /* 3 */
e7106e
+	"io_getevents",                    /* 4 */
e7106e
+	"setxattr",                        /* 5 */
e7106e
+	"lsetxattr",                       /* 6 */
e7106e
+	"fsetxattr",                       /* 7 */
e7106e
+	"getxattr",                        /* 8 */
e7106e
+	"lgetxattr",                       /* 9 */
e7106e
+	"fgetxattr",                       /* 10 */
e7106e
+	"listxattr",                       /* 11 */
e7106e
+	"llistxattr",                      /* 12 */
e7106e
+	"flistxattr",                      /* 13 */
e7106e
+	"removexattr",                     /* 14 */
e7106e
+	"lremovexattr",                    /* 15 */
e7106e
+	"fremovexattr",                    /* 16 */
e7106e
+	"getcwd",                          /* 17 */
e7106e
+	"lookup_dcookie",                  /* 18 */
e7106e
+	"eventfd2",                        /* 19 */
e7106e
+	"epoll_create1",                   /* 20 */
e7106e
+	"epoll_ctl",                       /* 21 */
e7106e
+	"epoll_pwait",                     /* 22 */
e7106e
+	"dup",                             /* 23 */
e7106e
+	"dup3",                            /* 24 */
e7106e
+	"fcntl",                           /* 25 */
e7106e
+	"inotify_init1",                   /* 26 */
e7106e
+	"inotify_add_watch",               /* 27 */
e7106e
+	"inotify_rm_watch",                /* 28 */
e7106e
+	"ioctl",                           /* 29 */
e7106e
+	"ioprio_set",                      /* 30 */
e7106e
+	"ioprio_get",                      /* 31 */
e7106e
+	"flock",                           /* 32 */
e7106e
+	"mknodat",                         /* 33 */
e7106e
+	"mkdirat",                         /* 34 */
e7106e
+	"unlinkat",                        /* 35 */
e7106e
+	"symlinkat",                       /* 36 */
e7106e
+	"linkat",                          /* 37 */
e7106e
+	"renameat",                        /* 38 */
e7106e
+	"umount2",                         /* 39 */
e7106e
+	"mount",                           /* 40 */
e7106e
+	"pivot_root",                      /* 41 */
e7106e
+	"nfsservctl",                      /* 42 */
e7106e
+	"statfs",                          /* 43 */
e7106e
+	"fstatfs",                         /* 44 */
e7106e
+	"truncate",                        /* 45 */
e7106e
+	"ftruncate",                       /* 46 */
e7106e
+	"fallocate",                       /* 47 */
e7106e
+	"faccessat",                       /* 48 */
e7106e
+	"chdir",                           /* 49 */
e7106e
+	"fchdir",                          /* 50 */
e7106e
+	"chroot",                          /* 51 */
e7106e
+	"fchmod",                          /* 52 */
e7106e
+	"fchmodat",                        /* 53 */
e7106e
+	"fchownat",                        /* 54 */
e7106e
+	"fchown",                          /* 55 */
e7106e
+	"openat",                          /* 56 */
e7106e
+	"close",                           /* 57 */
e7106e
+	"vhangup",                         /* 58 */
e7106e
+	"pipe2",                           /* 59 */
e7106e
+	"quotactl",                        /* 60 */
e7106e
+	"getdents64",                      /* 61 */
e7106e
+	"lseek",                           /* 62 */
e7106e
+	"read",                            /* 63 */
e7106e
+	"write",                           /* 64 */
e7106e
+	"readv",                           /* 65 */
e7106e
+	"writev",                          /* 66 */
e7106e
+	"pread64",                         /* 67 */
e7106e
+	"pwrite64",                        /* 68 */
e7106e
+	"preadv",                          /* 69 */
e7106e
+	"pwritev",                         /* 70 */
e7106e
+	"sendfile",                        /* 71 */
e7106e
+	"pselect6",                        /* 72 */
e7106e
+	"ppoll",                           /* 73 */
e7106e
+	"signalfd4",                       /* 74 */
e7106e
+	"vmsplice",                        /* 75 */
e7106e
+	"splice",                          /* 76 */
e7106e
+	"tee",                             /* 77 */
e7106e
+	"readlinkat",                      /* 78 */
e7106e
+	"fstatat",                         /* 79 */
e7106e
+	"fstat",                           /* 80 */
e7106e
+	"sync",                            /* 81 */
e7106e
+	"fsync",                           /* 82 */
e7106e
+	"fdatasync",                       /* 83 */
e7106e
+	"sync_file_range",                 /* 84 */
e7106e
+	"timerfd_create",                  /* 85 */
e7106e
+	"timerfd_settime",                 /* 86 */
e7106e
+	"timerfd_gettime",                 /* 87 */
e7106e
+	"utimensat",                       /* 88 */
e7106e
+	"acct",                            /* 89 */
e7106e
+	"capget",                          /* 90 */
e7106e
+	"capset",                          /* 91 */
e7106e
+	"personality",                     /* 92 */
e7106e
+	"exit",                            /* 93 */
e7106e
+	"exit_group",                      /* 94 */
e7106e
+	"waitid",                          /* 95 */
e7106e
+	"set_tid_address",                 /* 96 */
e7106e
+	"unshare",                         /* 97 */
e7106e
+	"futex",                           /* 98 */
e7106e
+	"set_robust_list",                 /* 99 */
e7106e
+	"get_robust_list",                 /* 100 */
e7106e
+	"nanosleep",                       /* 101 */
e7106e
+	"getitimer",                       /* 102 */
e7106e
+	"setitimer",                       /* 103 */
e7106e
+	"kexec_load",                      /* 104 */
e7106e
+	"init_module",                     /* 105 */
e7106e
+	"delete_module",                   /* 106 */
e7106e
+	"timer_create",                    /* 107 */
e7106e
+	"timer_gettime",                   /* 108 */
e7106e
+	"timer_getoverrun",                /* 109 */
e7106e
+	"timer_settime",                   /* 110 */
e7106e
+	"timer_delete",                    /* 111 */
e7106e
+	"clock_settime",                   /* 112 */
e7106e
+	"clock_gettime",                   /* 113 */
e7106e
+	"clock_getres",                    /* 114 */
e7106e
+	"clock_nanosleep",                 /* 115 */
e7106e
+	"syslog",                          /* 116 */
e7106e
+	"ptrace",                          /* 117 */
e7106e
+	"sched_setparam",                  /* 118 */
e7106e
+	"sched_setscheduler",              /* 119 */
e7106e
+	"sched_getscheduler",              /* 120 */
e7106e
+	"sched_getparam",                  /* 121 */
e7106e
+	"sched_setaffinity",               /* 122 */
e7106e
+	"sched_getaffinity",               /* 123 */
e7106e
+	"sched_yield",                     /* 124 */
e7106e
+	"sched_get_priority_max",          /* 125 */
e7106e
+	"sched_get_priority_min",          /* 126 */
e7106e
+	"sched_rr_get_interval",           /* 127 */
e7106e
+	"restart_syscall",                 /* 128 */
e7106e
+	"kill",                            /* 129 */
e7106e
+	"tkill",                           /* 130 */
e7106e
+	"tgkill",                          /* 131 */
e7106e
+	"sigaltstack",                     /* 132 */
e7106e
+	"rt_sigsuspend",                   /* 133 */
e7106e
+	"rt_sigaction",                    /* 134 */
e7106e
+	"rt_sigprocmask",                  /* 135 */
e7106e
+	"rt_sigpending",                   /* 136 */
e7106e
+	"rt_sigtimedwait",                 /* 137 */
e7106e
+	"rt_sigqueueinfo",                 /* 138 */
e7106e
+	"rt_sigreturn",                    /* 139 */
e7106e
+	"setpriority",                     /* 140 */
e7106e
+	"getpriority",                     /* 141 */
e7106e
+	"reboot",                          /* 142 */
e7106e
+	"setregid",                        /* 143 */
e7106e
+	"setgid",                          /* 144 */
e7106e
+	"setreuid",                        /* 145 */
e7106e
+	"setuid",                          /* 146 */
e7106e
+	"setresuid",                       /* 147 */
e7106e
+	"getresuid",                       /* 148 */
e7106e
+	"setresgid",                       /* 149 */
e7106e
+	"getresgid",                       /* 150 */
e7106e
+	"setfsuid",                        /* 151 */
e7106e
+	"setfsgid",                        /* 152 */
e7106e
+	"times",                           /* 153 */
e7106e
+	"setpgid",                         /* 154 */
e7106e
+	"getpgid",                         /* 155 */
e7106e
+	"getsid",                          /* 156 */
e7106e
+	"setsid",                          /* 157 */
e7106e
+	"getgroups",                       /* 158 */
e7106e
+	"setgroups",                       /* 159 */
e7106e
+	"uname",                           /* 160 */
e7106e
+	"sethostname",                     /* 161 */
e7106e
+	"setdomainname",                   /* 162 */
e7106e
+	"getrlimit",                       /* 163 */
e7106e
+	"setrlimit",                       /* 164 */
e7106e
+	"getrusage",                       /* 165 */
e7106e
+	"umask",                           /* 166 */
e7106e
+	"prctl",                           /* 167 */
e7106e
+	"getcpu",                          /* 168 */
e7106e
+	"gettimeofday",                    /* 169 */
e7106e
+	"settimeofday",                    /* 170 */
e7106e
+	"adjtimex",                        /* 171 */
e7106e
+	"getpid",                          /* 172 */
e7106e
+	"getppid",                         /* 173 */
e7106e
+	"getuid",                          /* 174 */
e7106e
+	"geteuid",                         /* 175 */
e7106e
+	"getgid",                          /* 176 */
e7106e
+	"getegid",                         /* 177 */
e7106e
+	"gettid",                          /* 178 */
e7106e
+	"sysinfo",                         /* 179 */
e7106e
+	"mq_open",                         /* 180 */
e7106e
+	"mq_unlink",                       /* 181 */
e7106e
+	"mq_timedsend",                    /* 182 */
e7106e
+	"mq_timedreceive",                 /* 183 */
e7106e
+	"mq_notify",                       /* 184 */
e7106e
+	"mq_getsetattr",                   /* 185 */
e7106e
+	"msgget",                          /* 186 */
e7106e
+	"msgctl",                          /* 187 */
e7106e
+	"msgrcv",                          /* 188 */
e7106e
+	"msgsnd",                          /* 189 */
e7106e
+	"semget",                          /* 190 */
e7106e
+	"semctl",                          /* 191 */
e7106e
+	"semtimedop",                      /* 192 */
e7106e
+	"semop",                           /* 193 */
e7106e
+	"shmget",                          /* 194 */
e7106e
+	"shmctl",                          /* 195 */
e7106e
+	"shmat",                           /* 196 */
e7106e
+	"shmdt",                           /* 197 */
e7106e
+	"socket",                          /* 198 */
e7106e
+	"socketpair",                      /* 199 */
e7106e
+	"bind",                            /* 200 */
e7106e
+	"listen",                          /* 201 */
e7106e
+	"accept",                          /* 202 */
e7106e
+	"connect",                         /* 203 */
e7106e
+	"getsockname",                     /* 204 */
e7106e
+	"getpeername",                     /* 205 */
e7106e
+	"sendto",                          /* 206 */
e7106e
+	"recvfrom",                        /* 207 */
e7106e
+	"setsockopt",                      /* 208 */
e7106e
+	"getsockopt",                      /* 209 */
e7106e
+	"shutdown",                        /* 210 */
e7106e
+	"sendmsg",                         /* 211 */
e7106e
+	"recvmsg",                         /* 212 */
e7106e
+	"readahead",                       /* 213 */
e7106e
+	"brk",                             /* 214 */
e7106e
+	"munmap",                          /* 215 */
e7106e
+	"mremap",                          /* 216 */
e7106e
+	"add_key",                         /* 217 */
e7106e
+	"request_key",                     /* 218 */
e7106e
+	"keyctl",                          /* 219 */
e7106e
+	"clone",                           /* 220 */
e7106e
+	"execve",                          /* 221 */
e7106e
+	"mmap",                            /* 222 */
e7106e
+	"fadvise64",                       /* 223 */
e7106e
+	"swapon",                          /* 224 */
e7106e
+	"swapoff",                         /* 225 */
e7106e
+	"mprotect",                        /* 226 */
e7106e
+	"msync",                           /* 227 */
e7106e
+	"mlock",                           /* 228 */
e7106e
+	"munlock",                         /* 229 */
e7106e
+	"mlockall",                        /* 230 */
e7106e
+	"munlockall",                      /* 231 */
e7106e
+	"mincore",                         /* 232 */
e7106e
+	"madvise",                         /* 233 */
e7106e
+	"remap_file_pages",                /* 234 */
e7106e
+	"mbind",                           /* 235 */
e7106e
+	"get_mempolicy",                   /* 236 */
e7106e
+	"set_mempolicy",                   /* 237 */
e7106e
+	"migrate_pages",                   /* 238 */
e7106e
+	"move_pages",                      /* 239 */
e7106e
+	"rt_tgsigqueueinfo",               /* 240 */
e7106e
+	"perf_event_open",                 /* 241 */
e7106e
+	"accept4",                         /* 242 */
e7106e
+	"recvmmsg",                        /* 243 */
e7106e
+	"arch_specific_syscall",           /* 244 */
e7106e
+	"245",                             /* 245 */
e7106e
+	"246",                             /* 246 */
e7106e
+	"247",                             /* 247 */
e7106e
+	"248",                             /* 248 */
e7106e
+	"249",                             /* 249 */
e7106e
+	"250",                             /* 250 */
e7106e
+	"251",                             /* 251 */
e7106e
+	"252",                             /* 252 */
e7106e
+	"253",                             /* 253 */
e7106e
+	"254",                             /* 254 */
e7106e
+	"255",                             /* 255 */
e7106e
+	"256",                             /* 256 */
e7106e
+	"257",                             /* 257 */
e7106e
+	"258",                             /* 258 */
e7106e
+	"259",                             /* 259 */
e7106e
+	"wait4",                           /* 260 */
e7106e
+	"prlimit64",                       /* 261 */
e7106e
+	"fanotify_init",                   /* 262 */
e7106e
+	"fanotify_mark",                   /* 263 */
e7106e
+	"name_to_handle_at",               /* 264 */
e7106e
+	"open_by_handle_at",               /* 265 */
e7106e
+	"clock_adjtime",                   /* 266 */
e7106e
+	"syncfs",                          /* 267 */
e7106e
+	"setns",                           /* 268 */
e7106e
+	"sendmmsg",                        /* 269 */
e7106e
+	"process_vm_readv",                /* 270 */
e7106e
+	"process_vm_writev",               /* 271 */
e7106e
+	"kcmp",                            /* 272 */
e7106e
+	"finit_module",                    /* 273 */
e7106e
+	"syscalls",                        /* 274 */
e7106e
+	"275",                             /* 275 */
e7106e
+	"276",                             /* 276 */
e7106e
+	"277",                             /* 277 */
e7106e
+	"278",                             /* 278 */
e7106e
+	"279",                             /* 279 */
e7106e
+	"280",                             /* 280 */
e7106e
+	"281",                             /* 281 */
e7106e
+	"282",                             /* 282 */
e7106e
+	"283",                             /* 283 */
e7106e
+	"284",                             /* 284 */
e7106e
+	"285",                             /* 285 */
e7106e
+	"286",                             /* 286 */
e7106e
+	"287",                             /* 287 */
e7106e
+	"288",                             /* 288 */
e7106e
+	"289",                             /* 289 */
e7106e
+	"290",                             /* 290 */
e7106e
+	"291",                             /* 291 */
e7106e
+	"292",                             /* 292 */
e7106e
+	"293",                             /* 293 */
e7106e
+	"294",                             /* 294 */
e7106e
+	"295",                             /* 295 */
e7106e
+	"296",                             /* 296 */
e7106e
+	"297",                             /* 297 */
e7106e
+	"298",                             /* 298 */
e7106e
+	"299",                             /* 299 */
e7106e
+	"300",                             /* 300 */
e7106e
+	"301",                             /* 301 */
e7106e
+	"302",                             /* 302 */
e7106e
+	"303",                             /* 303 */
e7106e
+	"304",                             /* 304 */
e7106e
+	"305",                             /* 305 */
e7106e
+	"306",                             /* 306 */
e7106e
+	"307",                             /* 307 */
e7106e
+	"308",                             /* 308 */
e7106e
+	"309",                             /* 309 */
e7106e
+	"310",                             /* 310 */
e7106e
+	"311",                             /* 311 */
e7106e
+	"312",                             /* 312 */
e7106e
+	"313",                             /* 313 */
e7106e
+	"314",                             /* 314 */
e7106e
+	"315",                             /* 315 */
e7106e
+	"316",                             /* 316 */
e7106e
+	"317",                             /* 317 */
e7106e
+	"318",                             /* 318 */
e7106e
+	"319",                             /* 319 */
e7106e
+	"320",                             /* 320 */
e7106e
+	"321",                             /* 321 */
e7106e
+	"322",                             /* 322 */
e7106e
+	"323",                             /* 323 */
e7106e
+	"324",                             /* 324 */
e7106e
+	"325",                             /* 325 */
e7106e
+	"326",                             /* 326 */
e7106e
+	"327",                             /* 327 */
e7106e
+	"328",                             /* 328 */
e7106e
+	"329",                             /* 329 */
e7106e
+	"330",                             /* 330 */
e7106e
+	"331",                             /* 331 */
e7106e
+	"332",                             /* 332 */
e7106e
+	"333",                             /* 333 */
e7106e
+	"334",                             /* 334 */
e7106e
+	"335",                             /* 335 */
e7106e
+	"336",                             /* 336 */
e7106e
+	"337",                             /* 337 */
e7106e
+	"338",                             /* 338 */
e7106e
+	"339",                             /* 339 */
e7106e
+	"340",                             /* 340 */
e7106e
+	"341",                             /* 341 */
e7106e
+	"342",                             /* 342 */
e7106e
+	"343",                             /* 343 */
e7106e
+	"344",                             /* 344 */
e7106e
+	"345",                             /* 345 */
e7106e
+	"346",                             /* 346 */
e7106e
+	"347",                             /* 347 */
e7106e
+	"348",                             /* 348 */
e7106e
+	"349",                             /* 349 */
e7106e
+	"350",                             /* 350 */
e7106e
+	"351",                             /* 351 */
e7106e
+	"352",                             /* 352 */
e7106e
+	"353",                             /* 353 */
e7106e
+	"354",                             /* 354 */
e7106e
+	"355",                             /* 355 */
e7106e
+	"356",                             /* 356 */
e7106e
+	"357",                             /* 357 */
e7106e
+	"358",                             /* 358 */
e7106e
+	"359",                             /* 359 */
e7106e
+	"360",                             /* 360 */
e7106e
+	"361",                             /* 361 */
e7106e
+	"362",                             /* 362 */
e7106e
+	"363",                             /* 363 */
e7106e
+	"364",                             /* 364 */
e7106e
+	"365",                             /* 365 */
e7106e
+	"366",                             /* 366 */
e7106e
+	"367",                             /* 367 */
e7106e
+	"368",                             /* 368 */
e7106e
+	"369",                             /* 369 */
e7106e
+	"370",                             /* 370 */
e7106e
+	"371",                             /* 371 */
e7106e
+	"372",                             /* 372 */
e7106e
+	"373",                             /* 373 */
e7106e
+	"374",                             /* 374 */
e7106e
+	"375",                             /* 375 */
e7106e
+	"376",                             /* 376 */
e7106e
+	"377",                             /* 377 */
e7106e
+	"378",                             /* 378 */
e7106e
+	"379",                             /* 379 */
e7106e
+	"380",                             /* 380 */
e7106e
+	"381",                             /* 381 */
e7106e
+	"382",                             /* 382 */
e7106e
+	"383",                             /* 383 */
e7106e
+	"384",                             /* 384 */
e7106e
+	"385",                             /* 385 */
e7106e
+	"386",                             /* 386 */
e7106e
+	"387",                             /* 387 */
e7106e
+	"388",                             /* 388 */
e7106e
+	"389",                             /* 389 */
e7106e
+	"390",                             /* 390 */
e7106e
+	"391",                             /* 391 */
e7106e
+	"392",                             /* 392 */
e7106e
+	"393",                             /* 393 */
e7106e
+	"394",                             /* 394 */
e7106e
+	"395",                             /* 395 */
e7106e
+	"396",                             /* 396 */
e7106e
+	"397",                             /* 397 */
e7106e
+	"398",                             /* 398 */
e7106e
+	"399",                             /* 399 */
e7106e
+	"400",                             /* 400 */
e7106e
+	"401",                             /* 401 */
e7106e
+	"402",                             /* 402 */
e7106e
+	"403",                             /* 403 */
e7106e
+	"404",                             /* 404 */
e7106e
+	"405",                             /* 405 */
e7106e
+	"406",                             /* 406 */
e7106e
+	"407",                             /* 407 */
e7106e
+	"408",                             /* 408 */
e7106e
+	"409",                             /* 409 */
e7106e
+	"410",                             /* 410 */
e7106e
+	"411",                             /* 411 */
e7106e
+	"412",                             /* 412 */
e7106e
+	"413",                             /* 413 */
e7106e
+	"414",                             /* 414 */
e7106e
+	"415",                             /* 415 */
e7106e
+	"416",                             /* 416 */
e7106e
+	"417",                             /* 417 */
e7106e
+	"418",                             /* 418 */
e7106e
+	"419",                             /* 419 */
e7106e
+	"420",                             /* 420 */
e7106e
+	"421",                             /* 421 */
e7106e
+	"422",                             /* 422 */
e7106e
+	"423",                             /* 423 */
e7106e
+	"424",                             /* 424 */
e7106e
+	"425",                             /* 425 */
e7106e
+	"426",                             /* 426 */
e7106e
+	"427",                             /* 427 */
e7106e
+	"428",                             /* 428 */
e7106e
+	"429",                             /* 429 */
e7106e
+	"430",                             /* 430 */
e7106e
+	"431",                             /* 431 */
e7106e
+	"432",                             /* 432 */
e7106e
+	"433",                             /* 433 */
e7106e
+	"434",                             /* 434 */
e7106e
+	"435",                             /* 435 */
e7106e
+	"436",                             /* 436 */
e7106e
+	"437",                             /* 437 */
e7106e
+	"438",                             /* 438 */
e7106e
+	"439",                             /* 439 */
e7106e
+	"440",                             /* 440 */
e7106e
+	"441",                             /* 441 */
e7106e
+	"442",                             /* 442 */
e7106e
+	"443",                             /* 443 */
e7106e
+	"444",                             /* 444 */
e7106e
+	"445",                             /* 445 */
e7106e
+	"446",                             /* 446 */
e7106e
+	"447",                             /* 447 */
e7106e
+	"448",                             /* 448 */
e7106e
+	"449",                             /* 449 */
e7106e
+	"450",                             /* 450 */
e7106e
+	"451",                             /* 451 */
e7106e
+	"452",                             /* 452 */
e7106e
+	"453",                             /* 453 */
e7106e
+	"454",                             /* 454 */
e7106e
+	"455",                             /* 455 */
e7106e
+	"456",                             /* 456 */
e7106e
+	"457",                             /* 457 */
e7106e
+	"458",                             /* 458 */
e7106e
+	"459",                             /* 459 */
e7106e
+	"460",                             /* 460 */
e7106e
+	"461",                             /* 461 */
e7106e
+	"462",                             /* 462 */
e7106e
+	"463",                             /* 463 */
e7106e
+	"464",                             /* 464 */
e7106e
+	"465",                             /* 465 */
e7106e
+	"466",                             /* 466 */
e7106e
+	"467",                             /* 467 */
e7106e
+	"468",                             /* 468 */
e7106e
+	"469",                             /* 469 */
e7106e
+	"470",                             /* 470 */
e7106e
+	"471",                             /* 471 */
e7106e
+	"472",                             /* 472 */
e7106e
+	"473",                             /* 473 */
e7106e
+	"474",                             /* 474 */
e7106e
+	"475",                             /* 475 */
e7106e
+	"476",                             /* 476 */
e7106e
+	"477",                             /* 477 */
e7106e
+	"478",                             /* 478 */
e7106e
+	"479",                             /* 479 */
e7106e
+	"480",                             /* 480 */
e7106e
+	"481",                             /* 481 */
e7106e
+	"482",                             /* 482 */
e7106e
+	"483",                             /* 483 */
e7106e
+	"484",                             /* 484 */
e7106e
+	"485",                             /* 485 */
e7106e
+	"486",                             /* 486 */
e7106e
+	"487",                             /* 487 */
e7106e
+	"488",                             /* 488 */
e7106e
+	"489",                             /* 489 */
e7106e
+	"490",                             /* 490 */
e7106e
+	"491",                             /* 491 */
e7106e
+	"492",                             /* 492 */
e7106e
+	"493",                             /* 493 */
e7106e
+	"494",                             /* 494 */
e7106e
+	"495",                             /* 495 */
e7106e
+	"496",                             /* 496 */
e7106e
+	"497",                             /* 497 */
e7106e
+	"498",                             /* 498 */
e7106e
+	"499",                             /* 499 */
e7106e
+	"500",                             /* 500 */
e7106e
+	"501",                             /* 501 */
e7106e
+	"502",                             /* 502 */
e7106e
+	"503",                             /* 503 */
e7106e
+	"504",                             /* 504 */
e7106e
+	"505",                             /* 505 */
e7106e
+	"506",                             /* 506 */
e7106e
+	"507",                             /* 507 */
e7106e
+	"508",                             /* 508 */
e7106e
+	"509",                             /* 509 */
e7106e
+	"510",                             /* 510 */
e7106e
+	"511",                             /* 511 */
e7106e
+	"512",                             /* 512 */
e7106e
+	"513",                             /* 513 */
e7106e
+	"514",                             /* 514 */
e7106e
+	"515",                             /* 515 */
e7106e
+	"516",                             /* 516 */
e7106e
+	"517",                             /* 517 */
e7106e
+	"518",                             /* 518 */
e7106e
+	"519",                             /* 519 */
e7106e
+	"520",                             /* 520 */
e7106e
+	"521",                             /* 521 */
e7106e
+	"522",                             /* 522 */
e7106e
+	"523",                             /* 523 */
e7106e
+	"524",                             /* 524 */
e7106e
+	"525",                             /* 525 */
e7106e
+	"526",                             /* 526 */
e7106e
+	"527",                             /* 527 */
e7106e
+	"528",                             /* 528 */
e7106e
+	"529",                             /* 529 */
e7106e
+	"530",                             /* 530 */
e7106e
+	"531",                             /* 531 */
e7106e
+	"532",                             /* 532 */
e7106e
+	"533",                             /* 533 */
e7106e
+	"534",                             /* 534 */
e7106e
+	"535",                             /* 535 */
e7106e
+	"536",                             /* 536 */
e7106e
+	"537",                             /* 537 */
e7106e
+	"538",                             /* 538 */
e7106e
+	"539",                             /* 539 */
e7106e
+	"540",                             /* 540 */
e7106e
+	"541",                             /* 541 */
e7106e
+	"542",                             /* 542 */
e7106e
+	"543",                             /* 543 */
e7106e
+	"544",                             /* 544 */
e7106e
+	"545",                             /* 545 */
e7106e
+	"546",                             /* 546 */
e7106e
+	"547",                             /* 547 */
e7106e
+	"548",                             /* 548 */
e7106e
+	"549",                             /* 549 */
e7106e
+	"550",                             /* 550 */
e7106e
+	"551",                             /* 551 */
e7106e
+	"552",                             /* 552 */
e7106e
+	"553",                             /* 553 */
e7106e
+	"554",                             /* 554 */
e7106e
+	"555",                             /* 555 */
e7106e
+	"556",                             /* 556 */
e7106e
+	"557",                             /* 557 */
e7106e
+	"558",                             /* 558 */
e7106e
+	"559",                             /* 559 */
e7106e
+	"560",                             /* 560 */
e7106e
+	"561",                             /* 561 */
e7106e
+	"562",                             /* 562 */
e7106e
+	"563",                             /* 563 */
e7106e
+	"564",                             /* 564 */
e7106e
+	"565",                             /* 565 */
e7106e
+	"566",                             /* 566 */
e7106e
+	"567",                             /* 567 */
e7106e
+	"568",                             /* 568 */
e7106e
+	"569",                             /* 569 */
e7106e
+	"570",                             /* 570 */
e7106e
+	"571",                             /* 571 */
e7106e
+	"572",                             /* 572 */
e7106e
+	"573",                             /* 573 */
e7106e
+	"574",                             /* 574 */
e7106e
+	"575",                             /* 575 */
e7106e
+	"576",                             /* 576 */
e7106e
+	"577",                             /* 577 */
e7106e
+	"578",                             /* 578 */
e7106e
+	"579",                             /* 579 */
e7106e
+	"580",                             /* 580 */
e7106e
+	"581",                             /* 581 */
e7106e
+	"582",                             /* 582 */
e7106e
+	"583",                             /* 583 */
e7106e
+	"584",                             /* 584 */
e7106e
+	"585",                             /* 585 */
e7106e
+	"586",                             /* 586 */
e7106e
+	"587",                             /* 587 */
e7106e
+	"588",                             /* 588 */
e7106e
+	"589",                             /* 589 */
e7106e
+	"590",                             /* 590 */
e7106e
+	"591",                             /* 591 */
e7106e
+	"592",                             /* 592 */
e7106e
+	"593",                             /* 593 */
e7106e
+	"594",                             /* 594 */
e7106e
+	"595",                             /* 595 */
e7106e
+	"596",                             /* 596 */
e7106e
+	"597",                             /* 597 */
e7106e
+	"598",                             /* 598 */
e7106e
+	"599",                             /* 599 */
e7106e
+	"600",                             /* 600 */
e7106e
+	"601",                             /* 601 */
e7106e
+	"602",                             /* 602 */
e7106e
+	"603",                             /* 603 */
e7106e
+	"604",                             /* 604 */
e7106e
+	"605",                             /* 605 */
e7106e
+	"606",                             /* 606 */
e7106e
+	"607",                             /* 607 */
e7106e
+	"608",                             /* 608 */
e7106e
+	"609",                             /* 609 */
e7106e
+	"610",                             /* 610 */
e7106e
+	"611",                             /* 611 */
e7106e
+	"612",                             /* 612 */
e7106e
+	"613",                             /* 613 */
e7106e
+	"614",                             /* 614 */
e7106e
+	"615",                             /* 615 */
e7106e
+	"616",                             /* 616 */
e7106e
+	"617",                             /* 617 */
e7106e
+	"618",                             /* 618 */
e7106e
+	"619",                             /* 619 */
e7106e
+	"620",                             /* 620 */
e7106e
+	"621",                             /* 621 */
e7106e
+	"622",                             /* 622 */
e7106e
+	"623",                             /* 623 */
e7106e
+	"624",                             /* 624 */
e7106e
+	"625",                             /* 625 */
e7106e
+	"626",                             /* 626 */
e7106e
+	"627",                             /* 627 */
e7106e
+	"628",                             /* 628 */
e7106e
+	"629",                             /* 629 */
e7106e
+	"630",                             /* 630 */
e7106e
+	"631",                             /* 631 */
e7106e
+	"632",                             /* 632 */
e7106e
+	"633",                             /* 633 */
e7106e
+	"634",                             /* 634 */
e7106e
+	"635",                             /* 635 */
e7106e
+	"636",                             /* 636 */
e7106e
+	"637",                             /* 637 */
e7106e
+	"638",                             /* 638 */
e7106e
+	"639",                             /* 639 */
e7106e
+	"640",                             /* 640 */
e7106e
+	"641",                             /* 641 */
e7106e
+	"642",                             /* 642 */
e7106e
+	"643",                             /* 643 */
e7106e
+	"644",                             /* 644 */
e7106e
+	"645",                             /* 645 */
e7106e
+	"646",                             /* 646 */
e7106e
+	"647",                             /* 647 */
e7106e
+	"648",                             /* 648 */
e7106e
+	"649",                             /* 649 */
e7106e
+	"650",                             /* 650 */
e7106e
+	"651",                             /* 651 */
e7106e
+	"652",                             /* 652 */
e7106e
+	"653",                             /* 653 */
e7106e
+	"654",                             /* 654 */
e7106e
+	"655",                             /* 655 */
e7106e
+	"656",                             /* 656 */
e7106e
+	"657",                             /* 657 */
e7106e
+	"658",                             /* 658 */
e7106e
+	"659",                             /* 659 */
e7106e
+	"660",                             /* 660 */
e7106e
+	"661",                             /* 661 */
e7106e
+	"662",                             /* 662 */
e7106e
+	"663",                             /* 663 */
e7106e
+	"664",                             /* 664 */
e7106e
+	"665",                             /* 665 */
e7106e
+	"666",                             /* 666 */
e7106e
+	"667",                             /* 667 */
e7106e
+	"668",                             /* 668 */
e7106e
+	"669",                             /* 669 */
e7106e
+	"670",                             /* 670 */
e7106e
+	"671",                             /* 671 */
e7106e
+	"672",                             /* 672 */
e7106e
+	"673",                             /* 673 */
e7106e
+	"674",                             /* 674 */
e7106e
+	"675",                             /* 675 */
e7106e
+	"676",                             /* 676 */
e7106e
+	"677",                             /* 677 */
e7106e
+	"678",                             /* 678 */
e7106e
+	"679",                             /* 679 */
e7106e
+	"680",                             /* 680 */
e7106e
+	"681",                             /* 681 */
e7106e
+	"682",                             /* 682 */
e7106e
+	"683",                             /* 683 */
e7106e
+	"684",                             /* 684 */
e7106e
+	"685",                             /* 685 */
e7106e
+	"686",                             /* 686 */
e7106e
+	"687",                             /* 687 */
e7106e
+	"688",                             /* 688 */
e7106e
+	"689",                             /* 689 */
e7106e
+	"690",                             /* 690 */
e7106e
+	"691",                             /* 691 */
e7106e
+	"692",                             /* 692 */
e7106e
+	"693",                             /* 693 */
e7106e
+	"694",                             /* 694 */
e7106e
+	"695",                             /* 695 */
e7106e
+	"696",                             /* 696 */
e7106e
+	"697",                             /* 697 */
e7106e
+	"698",                             /* 698 */
e7106e
+	"699",                             /* 699 */
e7106e
+	"700",                             /* 700 */
e7106e
+	"701",                             /* 701 */
e7106e
+	"702",                             /* 702 */
e7106e
+	"703",                             /* 703 */
e7106e
+	"704",                             /* 704 */
e7106e
+	"705",                             /* 705 */
e7106e
+	"706",                             /* 706 */
e7106e
+	"707",                             /* 707 */
e7106e
+	"708",                             /* 708 */
e7106e
+	"709",                             /* 709 */
e7106e
+	"710",                             /* 710 */
e7106e
+	"711",                             /* 711 */
e7106e
+	"712",                             /* 712 */
e7106e
+	"713",                             /* 713 */
e7106e
+	"714",                             /* 714 */
e7106e
+	"715",                             /* 715 */
e7106e
+	"716",                             /* 716 */
e7106e
+	"717",                             /* 717 */
e7106e
+	"718",                             /* 718 */
e7106e
+	"719",                             /* 719 */
e7106e
+	"720",                             /* 720 */
e7106e
+	"721",                             /* 721 */
e7106e
+	"722",                             /* 722 */
e7106e
+	"723",                             /* 723 */
e7106e
+	"724",                             /* 724 */
e7106e
+	"725",                             /* 725 */
e7106e
+	"726",                             /* 726 */
e7106e
+	"727",                             /* 727 */
e7106e
+	"728",                             /* 728 */
e7106e
+	"729",                             /* 729 */
e7106e
+	"730",                             /* 730 */
e7106e
+	"731",                             /* 731 */
e7106e
+	"732",                             /* 732 */
e7106e
+	"733",                             /* 733 */
e7106e
+	"734",                             /* 734 */
e7106e
+	"735",                             /* 735 */
e7106e
+	"736",                             /* 736 */
e7106e
+	"737",                             /* 737 */
e7106e
+	"738",                             /* 738 */
e7106e
+	"739",                             /* 739 */
e7106e
+	"740",                             /* 740 */
e7106e
+	"741",                             /* 741 */
e7106e
+	"742",                             /* 742 */
e7106e
+	"743",                             /* 743 */
e7106e
+	"744",                             /* 744 */
e7106e
+	"745",                             /* 745 */
e7106e
+	"746",                             /* 746 */
e7106e
+	"747",                             /* 747 */
e7106e
+	"748",                             /* 748 */
e7106e
+	"749",                             /* 749 */
e7106e
+	"750",                             /* 750 */
e7106e
+	"751",                             /* 751 */
e7106e
+	"752",                             /* 752 */
e7106e
+	"753",                             /* 753 */
e7106e
+	"754",                             /* 754 */
e7106e
+	"755",                             /* 755 */
e7106e
+	"756",                             /* 756 */
e7106e
+	"757",                             /* 757 */
e7106e
+	"758",                             /* 758 */
e7106e
+	"759",                             /* 759 */
e7106e
+	"760",                             /* 760 */
e7106e
+	"761",                             /* 761 */
e7106e
+	"762",                             /* 762 */
e7106e
+	"763",                             /* 763 */
e7106e
+	"764",                             /* 764 */
e7106e
+	"765",                             /* 765 */
e7106e
+	"766",                             /* 766 */
e7106e
+	"767",                             /* 767 */
e7106e
+	"768",                             /* 768 */
e7106e
+	"769",                             /* 769 */
e7106e
+	"770",                             /* 770 */
e7106e
+	"771",                             /* 771 */
e7106e
+	"772",                             /* 772 */
e7106e
+	"773",                             /* 773 */
e7106e
+	"774",                             /* 774 */
e7106e
+	"775",                             /* 775 */
e7106e
+	"776",                             /* 776 */
e7106e
+	"777",                             /* 777 */
e7106e
+	"778",                             /* 778 */
e7106e
+	"779",                             /* 779 */
e7106e
+	"780",                             /* 780 */
e7106e
+	"781",                             /* 781 */
e7106e
+	"782",                             /* 782 */
e7106e
+	"783",                             /* 783 */
e7106e
+	"784",                             /* 784 */
e7106e
+	"785",                             /* 785 */
e7106e
+	"786",                             /* 786 */
e7106e
+	"787",                             /* 787 */
e7106e
+	"788",                             /* 788 */
e7106e
+	"789",                             /* 789 */
e7106e
+	"790",                             /* 790 */
e7106e
+	"791",                             /* 791 */
e7106e
+	"792",                             /* 792 */
e7106e
+	"793",                             /* 793 */
e7106e
+	"794",                             /* 794 */
e7106e
+	"795",                             /* 795 */
e7106e
+	"796",                             /* 796 */
e7106e
+	"797",                             /* 797 */
e7106e
+	"798",                             /* 798 */
e7106e
+	"799",                             /* 799 */
e7106e
+	"800",                             /* 800 */
e7106e
+	"801",                             /* 801 */
e7106e
+	"802",                             /* 802 */
e7106e
+	"803",                             /* 803 */
e7106e
+	"804",                             /* 804 */
e7106e
+	"805",                             /* 805 */
e7106e
+	"806",                             /* 806 */
e7106e
+	"807",                             /* 807 */
e7106e
+	"808",                             /* 808 */
e7106e
+	"809",                             /* 809 */
e7106e
+	"810",                             /* 810 */
e7106e
+	"811",                             /* 811 */
e7106e
+	"812",                             /* 812 */
e7106e
+	"813",                             /* 813 */
e7106e
+	"814",                             /* 814 */
e7106e
+	"815",                             /* 815 */
e7106e
+	"816",                             /* 816 */
e7106e
+	"817",                             /* 817 */
e7106e
+	"818",                             /* 818 */
e7106e
+	"819",                             /* 819 */
e7106e
+	"820",                             /* 820 */
e7106e
+	"821",                             /* 821 */
e7106e
+	"822",                             /* 822 */
e7106e
+	"823",                             /* 823 */
e7106e
+	"824",                             /* 824 */
e7106e
+	"825",                             /* 825 */
e7106e
+	"826",                             /* 826 */
e7106e
+	"827",                             /* 827 */
e7106e
+	"828",                             /* 828 */
e7106e
+	"829",                             /* 829 */
e7106e
+	"830",                             /* 830 */
e7106e
+	"831",                             /* 831 */
e7106e
+	"832",                             /* 832 */
e7106e
+	"833",                             /* 833 */
e7106e
+	"834",                             /* 834 */
e7106e
+	"835",                             /* 835 */
e7106e
+	"836",                             /* 836 */
e7106e
+	"837",                             /* 837 */
e7106e
+	"838",                             /* 838 */
e7106e
+	"839",                             /* 839 */
e7106e
+	"840",                             /* 840 */
e7106e
+	"841",                             /* 841 */
e7106e
+	"842",                             /* 842 */
e7106e
+	"843",                             /* 843 */
e7106e
+	"844",                             /* 844 */
e7106e
+	"845",                             /* 845 */
e7106e
+	"846",                             /* 846 */
e7106e
+	"847",                             /* 847 */
e7106e
+	"848",                             /* 848 */
e7106e
+	"849",                             /* 849 */
e7106e
+	"850",                             /* 850 */
e7106e
+	"851",                             /* 851 */
e7106e
+	"852",                             /* 852 */
e7106e
+	"853",                             /* 853 */
e7106e
+	"854",                             /* 854 */
e7106e
+	"855",                             /* 855 */
e7106e
+	"856",                             /* 856 */
e7106e
+	"857",                             /* 857 */
e7106e
+	"858",                             /* 858 */
e7106e
+	"859",                             /* 859 */
e7106e
+	"860",                             /* 860 */
e7106e
+	"861",                             /* 861 */
e7106e
+	"862",                             /* 862 */
e7106e
+	"863",                             /* 863 */
e7106e
+	"864",                             /* 864 */
e7106e
+	"865",                             /* 865 */
e7106e
+	"866",                             /* 866 */
e7106e
+	"867",                             /* 867 */
e7106e
+	"868",                             /* 868 */
e7106e
+	"869",                             /* 869 */
e7106e
+	"870",                             /* 870 */
e7106e
+	"871",                             /* 871 */
e7106e
+	"872",                             /* 872 */
e7106e
+	"873",                             /* 873 */
e7106e
+	"874",                             /* 874 */
e7106e
+	"875",                             /* 875 */
e7106e
+	"876",                             /* 876 */
e7106e
+	"877",                             /* 877 */
e7106e
+	"878",                             /* 878 */
e7106e
+	"879",                             /* 879 */
e7106e
+	"880",                             /* 880 */
e7106e
+	"881",                             /* 881 */
e7106e
+	"882",                             /* 882 */
e7106e
+	"883",                             /* 883 */
e7106e
+	"884",                             /* 884 */
e7106e
+	"885",                             /* 885 */
e7106e
+	"886",                             /* 886 */
e7106e
+	"887",                             /* 887 */
e7106e
+	"888",                             /* 888 */
e7106e
+	"889",                             /* 889 */
e7106e
+	"890",                             /* 890 */
e7106e
+	"891",                             /* 891 */
e7106e
+	"892",                             /* 892 */
e7106e
+	"893",                             /* 893 */
e7106e
+	"894",                             /* 894 */
e7106e
+	"895",                             /* 895 */
e7106e
+	"896",                             /* 896 */
e7106e
+	"897",                             /* 897 */
e7106e
+	"898",                             /* 898 */
e7106e
+	"899",                             /* 899 */
e7106e
+	"900",                             /* 900 */
e7106e
+	"901",                             /* 901 */
e7106e
+	"902",                             /* 902 */
e7106e
+	"903",                             /* 903 */
e7106e
+	"904",                             /* 904 */
e7106e
+	"905",                             /* 905 */
e7106e
+	"906",                             /* 906 */
e7106e
+	"907",                             /* 907 */
e7106e
+	"908",                             /* 908 */
e7106e
+	"909",                             /* 909 */
e7106e
+	"910",                             /* 910 */
e7106e
+	"911",                             /* 911 */
e7106e
+	"912",                             /* 912 */
e7106e
+	"913",                             /* 913 */
e7106e
+	"914",                             /* 914 */
e7106e
+	"915",                             /* 915 */
e7106e
+	"916",                             /* 916 */
e7106e
+	"917",                             /* 917 */
e7106e
+	"918",                             /* 918 */
e7106e
+	"919",                             /* 919 */
e7106e
+	"920",                             /* 920 */
e7106e
+	"921",                             /* 921 */
e7106e
+	"922",                             /* 922 */
e7106e
+	"923",                             /* 923 */
e7106e
+	"924",                             /* 924 */
e7106e
+	"925",                             /* 925 */
e7106e
+	"926",                             /* 926 */
e7106e
+	"927",                             /* 927 */
e7106e
+	"928",                             /* 928 */
e7106e
+	"929",                             /* 929 */
e7106e
+	"930",                             /* 930 */
e7106e
+	"931",                             /* 931 */
e7106e
+	"932",                             /* 932 */
e7106e
+	"933",                             /* 933 */
e7106e
+	"934",                             /* 934 */
e7106e
+	"935",                             /* 935 */
e7106e
+	"936",                             /* 936 */
e7106e
+	"937",                             /* 937 */
e7106e
+	"938",                             /* 938 */
e7106e
+	"939",                             /* 939 */
e7106e
+	"940",                             /* 940 */
e7106e
+	"941",                             /* 941 */
e7106e
+	"942",                             /* 942 */
e7106e
+	"943",                             /* 943 */
e7106e
+	"944",                             /* 944 */
e7106e
+	"945",                             /* 945 */
e7106e
+	"946",                             /* 946 */
e7106e
+	"947",                             /* 947 */
e7106e
+	"948",                             /* 948 */
e7106e
+	"949",                             /* 949 */
e7106e
+	"950",                             /* 950 */
e7106e
+	"951",                             /* 951 */
e7106e
+	"952",                             /* 952 */
e7106e
+	"953",                             /* 953 */
e7106e
+	"954",                             /* 954 */
e7106e
+	"955",                             /* 955 */
e7106e
+	"956",                             /* 956 */
e7106e
+	"957",                             /* 957 */
e7106e
+	"958",                             /* 958 */
e7106e
+	"959",                             /* 959 */
e7106e
+	"960",                             /* 960 */
e7106e
+	"961",                             /* 961 */
e7106e
+	"962",                             /* 962 */
e7106e
+	"963",                             /* 963 */
e7106e
+	"964",                             /* 964 */
e7106e
+	"965",                             /* 965 */
e7106e
+	"966",                             /* 966 */
e7106e
+	"967",                             /* 967 */
e7106e
+	"968",                             /* 968 */
e7106e
+	"969",                             /* 969 */
e7106e
+	"970",                             /* 970 */
e7106e
+	"971",                             /* 971 */
e7106e
+	"972",                             /* 972 */
e7106e
+	"973",                             /* 973 */
e7106e
+	"974",                             /* 974 */
e7106e
+	"975",                             /* 975 */
e7106e
+	"976",                             /* 976 */
e7106e
+	"977",                             /* 977 */
e7106e
+	"978",                             /* 978 */
e7106e
+	"979",                             /* 979 */
e7106e
+	"980",                             /* 980 */
e7106e
+	"981",                             /* 981 */
e7106e
+	"982",                             /* 982 */
e7106e
+	"983",                             /* 983 */
e7106e
+	"984",                             /* 984 */
e7106e
+	"985",                             /* 985 */
e7106e
+	"986",                             /* 986 */
e7106e
+	"987",                             /* 987 */
e7106e
+	"988",                             /* 988 */
e7106e
+	"989",                             /* 989 */
e7106e
+	"990",                             /* 990 */
e7106e
+	"991",                             /* 991 */
e7106e
+	"992",                             /* 992 */
e7106e
+	"993",                             /* 993 */
e7106e
+	"994",                             /* 994 */
e7106e
+	"995",                             /* 995 */
e7106e
+	"996",                             /* 996 */
e7106e
+	"997",                             /* 997 */
e7106e
+	"998",                             /* 998 */
e7106e
+	"999",                             /* 999 */
e7106e
+	"1000",                            /* 1000 */
e7106e
+	"1001",                            /* 1001 */
e7106e
+	"1002",                            /* 1002 */
e7106e
+	"1003",                            /* 1003 */
e7106e
+	"1004",                            /* 1004 */
e7106e
+	"1005",                            /* 1005 */
e7106e
+	"1006",                            /* 1006 */
e7106e
+	"1007",                            /* 1007 */
e7106e
+	"1008",                            /* 1008 */
e7106e
+	"1009",                            /* 1009 */
e7106e
+	"1010",                            /* 1010 */
e7106e
+	"1011",                            /* 1011 */
e7106e
+	"1012",                            /* 1012 */
e7106e
+	"1013",                            /* 1013 */
e7106e
+	"1014",                            /* 1014 */
e7106e
+	"1015",                            /* 1015 */
e7106e
+	"1016",                            /* 1016 */
e7106e
+	"1017",                            /* 1017 */
e7106e
+	"1018",                            /* 1018 */
e7106e
+	"1019",                            /* 1019 */
e7106e
+	"1020",                            /* 1020 */
e7106e
+	"1021",                            /* 1021 */
e7106e
+	"1022",                            /* 1022 */
e7106e
+	"1023",                            /* 1023 */
e7106e
+	"open",                            /* 1024 */
e7106e
+	"link",                            /* 1025 */
e7106e
+	"unlink",                          /* 1026 */
e7106e
+	"mknod",                           /* 1027 */
e7106e
+	"chmod",                           /* 1028 */
e7106e
+	"chown",                           /* 1029 */
e7106e
+	"mkdir",                           /* 1030 */
e7106e
+	"rmdir",                           /* 1031 */
e7106e
+	"lchown",                          /* 1032 */
e7106e
+	"access",                          /* 1033 */
e7106e
+	"rename",                          /* 1034 */
e7106e
+	"readlink",                        /* 1035 */
e7106e
+	"symlink",                         /* 1036 */
e7106e
+	"utimes",                          /* 1037 */
e7106e
+	"stat",                            /* 1038 */
e7106e
+	"lstat",                           /* 1039 */
e7106e
+	"pipe",                            /* 1040 */
e7106e
+	"dup2",                            /* 1041 */
e7106e
+	"epoll_create",                    /* 1042 */
e7106e
+	"inotify_init",                    /* 1043 */
e7106e
+	"eventfd",                         /* 1044 */
e7106e
+	"signalfd",                        /* 1045 */
e7106e
+	"sendfile",                        /* 1046 */
e7106e
+	"ftruncate",                       /* 1047 */
e7106e
+	"truncate",                        /* 1048 */
e7106e
+	"stat",                            /* 1049 */
e7106e
+	"lstat",                           /* 1050 */
e7106e
+	"fstat",                           /* 1051 */
e7106e
+	"fcntl",                           /* 1052 */
e7106e
+	"fadvise64",                       /* 1053 */
e7106e
+	"newfstatat",                      /* 1054 */
e7106e
+	"fstatfs",                         /* 1055 */
e7106e
+	"statfs",                          /* 1056 */
e7106e
+	"lseek",                           /* 1057 */
e7106e
+	"mmap",                            /* 1058 */
e7106e
+	"alarm",                           /* 1059 */
e7106e
+	"getpgrp",                         /* 1060 */
e7106e
+	"pause",                           /* 1061 */
e7106e
+	"time",                            /* 1062 */
e7106e
+	"utime",                           /* 1063 */
e7106e
+	"creat",                           /* 1064 */
e7106e
+	"getdents",                        /* 1065 */
e7106e
+	"futimesat",                       /* 1066 */
e7106e
+	"select",                          /* 1067 */
e7106e
+	"poll",                            /* 1068 */
e7106e
+	"epoll_wait",                      /* 1069 */
e7106e
+	"ustat",                           /* 1070 */
e7106e
+	"vfork",                           /* 1071 */
e7106e
+	"oldwait4",                        /* 1072 */
e7106e
+	"recv",                            /* 1073 */
e7106e
+	"send",                            /* 1074 */
e7106e
+	"bdflush",                         /* 1075 */
e7106e
+	"umount",                          /* 1076 */
e7106e
+	"uselib",                          /* 1077 */
e7106e
+	"_sysctl",                         /* 1078 */
e7106e
+	"fork",                            /* 1079 */
e7106e
diff --git a/sysdeps/linux-gnu/aarch64/trace.c b/sysdeps/linux-gnu/aarch64/trace.c
e7106e
new file mode 100644
e7106e
index 0000000..5544b51
e7106e
--- /dev/null
e7106e
+++ b/sysdeps/linux-gnu/aarch64/trace.c
e7106e
@@ -0,0 +1,84 @@
e7106e
+/*
e7106e
+ * This file is part of ltrace.
e7106e
+ * Copyright (C) 2014 Petr Machata, Red Hat, Inc.
e7106e
+ *
e7106e
+ * This program is free software; you can redistribute it and/or
e7106e
+ * modify it under the terms of the GNU General Public License as
e7106e
+ * published by the Free Software Foundation; either version 2 of the
e7106e
+ * License, or (at your option) any later version.
e7106e
+ *
e7106e
+ * This program is distributed in the hope that it will be useful, but
e7106e
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
e7106e
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
e7106e
+ * General Public License for more details.
e7106e
+ *
e7106e
+ * You should have received a copy of the GNU General Public License
e7106e
+ * along with this program; if not, write to the Free Software
e7106e
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
e7106e
+ * 02110-1301 USA
e7106e
+ */
e7106e
+
e7106e
+#include <sys/ptrace.h>
e7106e
+#include <sys/types.h>
e7106e
+#include <sys/wait.h>
e7106e
+#include <asm/ptrace.h>
e7106e
+#include <string.h>
e7106e
+#include <errno.h>
e7106e
+#include <stdio.h>
e7106e
+
e7106e
+#include "backend.h"
e7106e
+#include "proc.h"
e7106e
+
e7106e
+void
e7106e
+get_arch_dep(struct process *proc)
e7106e
+{
e7106e
+}
e7106e
+
e7106e
+int aarch64_read_gregs(struct process *proc, struct user_pt_regs *regs);
e7106e
+
e7106e
+/* The syscall instruction is:
e7106e
+ * | 31                   21 | 20    5 | 4       0 |
e7106e
+ * | 1 1 0 1 0 1 0 0 | 0 0 0 |  imm16  | 0 0 0 0 1 | */
e7106e
+#define SVC_MASK  0xffe0001f
e7106e
+#define SVC_VALUE 0xd4000001
e7106e
+
e7106e
+int
e7106e
+syscall_p(struct process *proc, int status, int *sysnum)
e7106e
+{
e7106e
+	if (WIFSTOPPED(status)
e7106e
+	    && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) {
e7106e
+
e7106e
+		struct user_pt_regs regs;
e7106e
+		if (aarch64_read_gregs(proc, &regs) < 0) {
e7106e
+			fprintf(stderr, "syscall_p: "
e7106e
+				"Couldn't read registers of %d.\n", proc->pid);
e7106e
+			return -1;
e7106e
+		}
e7106e
+
e7106e
+		errno = 0;
e7106e
+		unsigned long insn = (unsigned long) ptrace(PTRACE_PEEKTEXT,
e7106e
+							    proc->pid,
e7106e
+							    regs.pc - 4, 0);
e7106e
+		if (insn == -1UL && errno != 0) {
e7106e
+			fprintf(stderr, "syscall_p: "
e7106e
+				"Couldn't peek into %d: %s\n", proc->pid,
e7106e
+				strerror(errno));
e7106e
+			return -1;
e7106e
+		}
e7106e
+
e7106e
+		insn &= 0xffffffffUL;
e7106e
+		if ((insn & SVC_MASK) == SVC_VALUE) {
e7106e
+			*sysnum = regs.regs[8];
e7106e
+
e7106e
+			size_t d1 = proc->callstack_depth - 1;
e7106e
+			if (proc->callstack_depth > 0
e7106e
+			    && proc->callstack[d1].is_syscall
e7106e
+			    && proc->callstack[d1].c_un.syscall == *sysnum)
e7106e
+				return 2;
e7106e
+
e7106e
+			return 1;
e7106e
+		}
e7106e
+	}
e7106e
+
e7106e
+	return 0;
e7106e
+}
e7106e
diff --git a/testsuite/ltrace.main/system_call_params.exp b/testsuite/ltrace.main/system_call_params.exp
e7106e
index 787e342..2ccf840 100644
e7106e
--- a/testsuite/ltrace.main/system_call_params.exp
e7106e
+++ b/testsuite/ltrace.main/system_call_params.exp
e7106e
@@ -1,5 +1,5 @@
e7106e
 # This file is part of ltrace.
e7106e
-# Copyright (C) 2013 Petr Machata, Red Hat Inc.
e7106e
+# Copyright (C) 2013, 2014 Petr Machata, Red Hat Inc.
e7106e
 #
e7106e
 # This program is free software; you can redistribute it and/or
e7106e
 # modify it under the terms of the GNU General Public License as
e7106e
@@ -17,11 +17,25 @@
e7106e
 # 02110-1301 USA
e7106e
 
e7106e
 set bin [ltraceCompile {} [ltraceSource c {
e7106e
+    #define _GNU_SOURCE
e7106e
     #include <sys/types.h>
e7106e
     #include <sys/stat.h>
e7106e
     #include <fcntl.h>
e7106e
+    #include <unistd.h>
e7106e
+    #include <sys/syscall.h>   /* For SYS_xxx definitions */
e7106e
+
e7106e
+    #ifndef SYS_open
e7106e
+    # if defined(__aarch64__)
e7106e
+    #  /* Linux doesn't actually implement SYS_open on AArch64, but for merely
e7106e
+    #   * recording the syscall, it's fine.  */
e7106e
+    #  define SYS_open 1024
e7106e
+    # else
e7106e
+    #  error SYS_open not available.
e7106e
+    # endif
e7106e
+    #endif
e7106e
+
e7106e
     int main(void) {
e7106e
-	open("/some/path", O_RDONLY);
e7106e
+	syscall(SYS_open, "/some/path", O_RDONLY);
e7106e
 	write(1, "something", 10);
e7106e
 	mount("source", "target", "filesystemtype", 0, 0);
e7106e
     }
e7106e
diff --git a/testsuite/ltrace.main/system_calls.c b/testsuite/ltrace.main/system_calls.c
e7106e
deleted file mode 100644
e7106e
index 7be3d04..0000000
e7106e
--- a/testsuite/ltrace.main/system_calls.c
e7106e
+++ /dev/null
e7106e
@@ -1,68 +0,0 @@
e7106e
-/* Ltrace Test : system_calls.c.
e7106e
-   Objectives  : Verify that Ltrace can trace all the system calls in
e7106e
-   execution.
e7106e
-
e7106e
-   You can add new system calls in it and add its verification in 
e7106e
-   system_calls correspondingly.
e7106e
-
e7106e
-   This file was written by Yao Qi <qiyao@cn.ibm.com>. */
e7106e
-
e7106e
-#include <stdio.h>
e7106e
-#include <unistd.h>
e7106e
-#include <sys/syscall.h>
e7106e
-#include <sys/stat.h>
e7106e
-#include <errno.h>
e7106e
-
e7106e
-void exit (int);
e7106e
-
e7106e
-#define	BUF_SIZE	100
e7106e
-
e7106e
-int 
e7106e
-main ()
e7106e
-{
e7106e
-  FILE* fp;
e7106e
-  char s[]="system_calls";
e7106e
-  char buffer[BUF_SIZE];
e7106e
-  struct stat state;
e7106e
-  
e7106e
-  /*  SYS_open.  */
e7106e
-  fp = fopen ("system_calls.tmp", "w");
e7106e
-  if (fp == NULL)
e7106e
-    {
e7106e
-      printf("Can not create system_calls.tmp\n");
e7106e
-      exit (0);
e7106e
-    }
e7106e
-  /*  SYS_write.  */
e7106e
-  fwrite(s, sizeof(s), 1, fp);
e7106e
-  /*  SYS_lseek.  */
e7106e
-  fseek (fp, 0, SEEK_CUR);
e7106e
-  /*  SYS_read.  */
e7106e
-  fread(buffer, sizeof(s), 1, fp);
e7106e
-  /*  SYS_close.  */
e7106e
-  fclose(fp);
e7106e
-
e7106e
-  /*  SYS_getcwd.  */
e7106e
-  getcwd (buffer, BUF_SIZE);
e7106e
-  /*  SYS_chdir.  */
e7106e
-  chdir (".");
e7106e
-  /*  SYS_symlink.  */
e7106e
-  symlink ("system_calls.tmp", "system_calls.link");
e7106e
-  /*  SYS_unlink.  */
e7106e
-  remove("system_calls.link");
e7106e
-  /*  SYS_rename.  */
e7106e
-  rename ("system_calls.tmp", "system_calls.tmp1");
e7106e
-  /*  SYS_stat.  */
e7106e
-  stat ("system_calls.tmp", &state);
e7106e
-  /*  SYS_access.  */
e7106e
-  access ("system_calls.tmp", R_OK);
e7106e
-  remove("system_calls.tmp1");
e7106e
-  
e7106e
-  /*  SYS_mkdir.  */
e7106e
-  mkdir ("system_call_mkdir", 0777);
e7106e
-  /*  SYS_rmdir.  */
e7106e
-  rmdir ("system_call_mkdir");
e7106e
-  
e7106e
-  return 0;
e7106e
-}
e7106e
-
e7106e
-
e7106e
diff --git a/testsuite/ltrace.main/system_calls.exp b/testsuite/ltrace.main/system_calls.exp
e7106e
index a74fa04..f60e319 100644
e7106e
--- a/testsuite/ltrace.main/system_calls.exp
e7106e
+++ b/testsuite/ltrace.main/system_calls.exp
e7106e
@@ -1,67 +1,146 @@
e7106e
-# This file was written by Yao Qi <qiyao@cn.ibm.com>.
e7106e
+# This file is part of ltrace.
e7106e
+# Copyright (C) 2014 Petr Machata, Red Hat Inc.
e7106e
+# Copyright (C) 2006 Yao Qi <qiyao@cn.ibm.com>, IBM Corporation
e7106e
+#
e7106e
+# This program is free software; you can redistribute it and/or
e7106e
+# modify it under the terms of the GNU General Public License as
e7106e
+# published by the Free Software Foundation; either version 2 of the
e7106e
+# License, or (at your option) any later version.
e7106e
+#
e7106e
+# This program is distributed in the hope that it will be useful, but
e7106e
+# WITHOUT ANY WARRANTY; without even the implied warranty of
e7106e
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
e7106e
+# General Public License for more details.
e7106e
+#
e7106e
+# You should have received a copy of the GNU General Public License
e7106e
+# along with this program; if not, write to the Free Software
e7106e
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
e7106e
+# 02110-1301 USA
e7106e
 
e7106e
-set testfile "system_calls"
e7106e
-set srcfile ${testfile}.c
e7106e
-set binfile ${testfile}
e7106e
+# Objectives: Verify that Ltrace can trace all the system calls in
e7106e
+# execution.  Note that this test is necessarily noisy.  Dynamic
e7106e
+# linker adds a bunch of system calls of its own.
e7106e
 
e7106e
+set empty [ltraceCompile {} [ltraceSource c {
e7106e
+    int main (void) { return 0; }
e7106e
+}]]
e7106e
 
e7106e
-verbose "compiling source file now....."
e7106e
-# Build the shared libraries this test case needs.
e7106e
-if  { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c" "${objdir}/${subdir}/${binfile}" executable {debug} ] != "" } {
e7106e
-     send_user "Testcase compile failed, so all tests in this file will automatically fail.\n"
e7106e
+set bin [ltraceCompile {} [ltraceSource c {
e7106e
+    #include <stdio.h>
e7106e
+    #include <unistd.h>
e7106e
+    #include <sys/syscall.h>
e7106e
+    #include <sys/stat.h>
e7106e
+    #include <errno.h>
e7106e
+    #include <stdlib.h>
e7106e
+
e7106e
+    int
e7106e
+    main ()
e7106e
+    {
e7106e
+      FILE* fp;
e7106e
+      char s[]="system_calls";
e7106e
+      char buffer[1024];
e7106e
+      struct stat state;
e7106e
+
e7106e
+      fp = fopen ("system_calls.tmp", "w");
e7106e
+      if (fp == NULL)
e7106e
+	{
e7106e
+	  printf("Can not create system_calls.tmp\n");
e7106e
+	  exit (0);
e7106e
+	}
e7106e
+      fwrite(s, sizeof(s), 1, fp);
e7106e
+      fseek (fp, 0, SEEK_CUR);
e7106e
+      fread(buffer, sizeof(s), 1, fp);
e7106e
+      fclose(fp);
e7106e
+
e7106e
+      getcwd (buffer, sizeof buffer);
e7106e
+      chdir (".");
e7106e
+      symlink ("system_calls.tmp", "system_calls.link");
e7106e
+      remove("system_calls.link");
e7106e
+      rename ("system_calls.tmp", "system_calls.tmp1");
e7106e
+      stat ("system_calls.tmp", &state);
e7106e
+      access ("system_calls.tmp", R_OK);
e7106e
+      remove("system_calls.tmp1");
e7106e
+
e7106e
+      mkdir ("system_call_mkdir", 0777);
e7106e
+      rmdir ("system_call_mkdir");
e7106e
+
e7106e
+      return 0;
e7106e
+    }
e7106e
+}]]
e7106e
+
e7106e
+proc Calls {logfile} {
e7106e
+    set fp [open $logfile]
e7106e
+    set ret {}
e7106e
+
e7106e
+    while {[gets $fp line] >= 0} {
e7106e
+	if [regexp -- {^[a-zA-Z0-9]*@SYS} $line] {
e7106e
+	    set call [lindex [split $line @] 0]
e7106e
+	    dict incr ret $call
e7106e
+	}
e7106e
+    }
e7106e
+
e7106e
+    close $fp
e7106e
+    return $ret
e7106e
+}
e7106e
+
e7106e
+proc GetDefault {d key def} {
e7106e
+    if {[dict exists $d $key]} {
e7106e
+	return [dict get $d $key]
e7106e
+    } else {
e7106e
+	return $def
e7106e
+    }
e7106e
 }
e7106e
 
e7106e
-# set options for ltrace.
e7106e
-ltrace_options "-S"
e7106e
+proc Diff {d1 d2} {
e7106e
+    set keys [lsort -unique [concat [dict keys $d1] [dict keys $d2]]]
e7106e
+    set ret {}
e7106e
+    foreach key $keys {
e7106e
+	set n1 [GetDefault $d1 $key 0]
e7106e
+	set n2 [GetDefault $d2 $key 0]
e7106e
+	set sum [expr $n1 - $n2]
e7106e
+	if {[expr $sum != 0]} {
e7106e
+		dict set ret $key $sum
e7106e
+	}
e7106e
+    }
e7106e
+    return $ret
e7106e
+}
e7106e
+
e7106e
+proc Match {d patterns} {
e7106e
+    foreach line $patterns {
e7106e
+	set pattern [lindex $line 0]
e7106e
+	set op [lindex $line 1]
e7106e
+	set expect [lindex $line 2]
e7106e
 
e7106e
-#Run PUT for ltarce.
e7106e
-set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
e7106e
+	set count 0
e7106e
+	foreach key [dict keys $d] {
e7106e
+	    if [regexp -- $pattern $key] {
e7106e
+		incr count [dict get $d $key]
e7106e
+	    }
e7106e
+	}
e7106e
 
e7106e
-#check the output of this program.
e7106e
-verbose "ltrace runtest output: $exec_output\n"
e7106e
+	set msgMain "$pattern was recorded $count times"
e7106e
 
e7106e
-if [regexp {ELF from incompatible architecture} $exec_output] {
e7106e
-	fail "32-bit ltrace can not perform on 64-bit PUTs and rebuild ltrace in 64 bit mode!"
e7106e
-        return
e7106e
-} elseif [ regexp {Couldn't get .hash data} $exec_output ] {
e7106e
-	fail "Couldn't get .hash data!"
e7106e
-	return
e7106e
+	if {[eval expr $count $op $expect]} {
e7106e
+	    pass $msgMain
e7106e
+	} else {
e7106e
+	    fail "$msgMain, expected $op $expect"
e7106e
+	}
e7106e
+    }
e7106e
 }
e7106e
 
e7106e
+Match [Diff [Calls [ltraceRun -L -S -- $bin]] \
e7106e
+	   [Calls [ltraceRun -L -S -- $empty]]] {
e7106e
+    { {^write$} == 1 }
e7106e
+    { {^unlink(at)?$} >= 2 }
e7106e
+    { {^open(at)?$} == 1 }
e7106e
+    { {^(new|f)?stat(64)?$} == 1 }
e7106e
+    { {^close$} == 1 }
e7106e
+    { {^getcwd$} == 1 }
e7106e
+    { {^chdir$} == 1 }
e7106e
+    { {^symlink(at)?$} == 1 }
e7106e
+    { {^f?access(at)?$} == 1 }
e7106e
+    { {^rename(at)?$} == 1 }
e7106e
+    { {^mkdir(at)?$} == 1 }
e7106e
+}
e7106e
 
e7106e
-set pattern "^munmap@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 2
e7106e
-set pattern "^write@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
e7106e
-set pattern "^unlink@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
e7106e
-
e7106e
-set pattern "^brk@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
e7106e
-set pattern "^open@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
e7106e
-set pattern "^(new)?fstat(64)?@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 egrep
e7106e
-set pattern "^(old_)?mmap2?@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 egrep
e7106e
-set pattern "^close@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
e7106e
-
e7106e
-set pattern "^getcwd@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
e7106e
-set pattern "^chdir@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
e7106e
-set pattern "^symlink@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
e7106e
-set pattern "^unlink@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
e7106e
-set pattern "^(new)?stat(64)?@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 egrep
e7106e
-set pattern "^access@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
e7106e
-set pattern "^rename@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
e7106e
-set pattern "^mkdir@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
e7106e
-set pattern "^rmdir@SYS"
e7106e
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
e7106e
+ltraceDone
e7106e
diff --git a/testsuite/ltrace.minor/trace-clone.c b/testsuite/ltrace.minor/trace-clone.c
e7106e
index db1936d..ded930c 100644
e7106e
--- a/testsuite/ltrace.minor/trace-clone.c
e7106e
+++ b/testsuite/ltrace.minor/trace-clone.c
e7106e
@@ -8,6 +8,7 @@
e7106e
 #include <sys/types.h>
e7106e
 #include <stdlib.h>
e7106e
 #include <sched.h>
e7106e
+#include <unistd.h>
e7106e
 
e7106e
 int child ()
e7106e
 {
e7106e
@@ -22,7 +23,8 @@ typedef int (* myfunc)();
e7106e
 int main ()
e7106e
 {
e7106e
   pid_t pid;
e7106e
-  static char stack[STACK_SIZE];
e7106e
+  static __attribute__ ((aligned (16))) char stack[STACK_SIZE];
e7106e
+
e7106e
 #ifdef __ia64__
e7106e
   pid = __clone2((myfunc)&child, stack, STACK_SIZE, CLONE_FS, NULL);
e7106e
 #else