Blame SOURCES/ltrace-0.7.91-aarch64.patch

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