diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index c5821df25e..9321f2c964 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -482,7 +482,10 @@ class Context(object):
             old_components = ('gmp', 'mpfr', 'mpc', 'binutils', 'gcc', 'linux',
                               'mig', 'gnumach', 'hurd')
             old_versions = self.build_state['compilers']['build-versions']
-            self.build_glibcs(configs)
+            if action == 'update-syscall-lists':
+                self.update_syscall_lists(configs)
+            else:
+                self.build_glibcs(configs)
         self.write_files()
         self.do_build()
         if configs:
@@ -673,6 +676,18 @@ class Context(object):
         for c in configs:
             self.glibc_configs[c].build()
 
+    def update_syscall_lists(self, configs):
+        if not configs:
+            self.remove_dirs(os.path.join(self.builddir, 'glibcs'))
+            self.remove_dirs(os.path.join(self.installdir, 'glibcs'))
+            self.remove_dirs(os.path.join(self.logsdir, 'glibcs'))
+            configs = sorted(self.glibc_configs.keys())
+        for c in configs:
+            cfg = self.glibc_configs[c]
+            # Hurd does not use system call lists.
+            if cfg.os != 'gnu':
+                cfg.update_syscall_lists()
+
     def load_versions_json(self):
         """Load information about source directory versions."""
         if not os.access(self.versions_json, os.F_OK):
@@ -909,7 +924,8 @@ class Context(object):
                 self.build_state = json.load(f)
         else:
             self.build_state = {}
-        for k in ('host-libraries', 'compilers', 'glibcs'):
+        for k in ('host-libraries', 'compilers', 'glibcs',
+                  'update-syscall-lists'):
             if k not in self.build_state:
                 self.build_state[k] = {}
             if 'build-time' not in self.build_state[k]:
@@ -1429,22 +1445,8 @@ class Glibc(object):
         self.ctx.add_makefile_cmdlist('glibcs-%s' % self.name, cmdlist,
                                       logsdir)
 
-    def build_glibc(self, cmdlist, for_compiler):
-        """Generate commands to build this glibc, either as part of a compiler
-        build or with the bootstrapped compiler (and in the latter case, run
-        tests as well)."""
+    def configure_command(self, cmdlist, use_usr):
         srcdir = self.ctx.component_srcdir('glibc')
-        if for_compiler:
-            builddir = self.ctx.component_builddir('compilers',
-                                                   self.compiler.name, 'glibc',
-                                                   self.name)
-            installdir = self.compiler.sysroot
-        else:
-            builddir = self.ctx.component_builddir('glibcs', self.name,
-                                                   'glibc')
-            installdir = self.ctx.glibc_installdir(self.name)
-        cmdlist.create_use_dir(builddir)
-        use_usr = self.os != 'gnu'
         prefix = '/usr' if use_usr else ''
         cfg_cmd = [os.path.join(srcdir, 'configure'),
                    '--prefix=%s' % prefix,
@@ -1466,6 +1468,23 @@ class Glibc(object):
             cfg_cmd += ['MIG=%s' % self.tool_name('mig')]
         cfg_cmd += self.cfg
         cmdlist.add_command('configure', cfg_cmd)
+
+    def build_glibc(self, cmdlist, for_compiler):
+        """Generate commands to build this glibc, either as part of a compiler
+        build or with the bootstrapped compiler (and in the latter case, run
+        tests as well)."""
+        if for_compiler:
+            builddir = self.ctx.component_builddir('compilers',
+                                                   self.compiler.name, 'glibc',
+                                                   self.name)
+            installdir = self.compiler.sysroot
+        else:
+            builddir = self.ctx.component_builddir('glibcs', self.name,
+                                                   'glibc')
+            installdir = self.ctx.glibc_installdir(self.name)
+        cmdlist.create_use_dir(builddir)
+        use_usr = self.os != 'gnu'
+        self.configure_command(cmdlist, use_usr=use_usr)
         cmdlist.add_command('build', ['make'])
         cmdlist.add_command('install', ['make', 'install',
                                         'install_root=%s' % installdir])
@@ -1487,6 +1506,24 @@ class Glibc(object):
                                 always_run=True)
         cmdlist.cleanup_dir()
 
+    def update_syscall_lists(self):
+        builddir = self.ctx.component_builddir('update-syscall-lists', self.name,
+                                               'glibc')
+        logsdir = os.path.join(self.ctx.logsdir, 'upate-syscall-lists',
+                               self.name)
+        self.ctx.remove_recreate_dirs(builddir, logsdir)
+        cmdlist = CommandList('glibcs-%s' % self.name, self.ctx.keep)
+        cmdlist.add_command('check-compilers',
+                            ['test', '-f',
+                             os.path.join(self.compiler.installdir, 'ok')])
+        cmdlist.use_path(self.compiler.bindir)
+        cmdlist.create_use_dir(builddir)
+        self.configure_command(cmdlist, use_usr=True)
+        cmdlist.add_command('update-syscall-lists',
+                            ['make', 'update-syscall-lists'])
+        cmdlist.cleanup_dir()
+        self.ctx.add_makefile_cmdlist('update-syscall-lists-%s' % self.name,
+                                      cmdlist, logsdir)
 
 class Command(object):
     """A command run in the build process."""
@@ -1654,7 +1691,8 @@ def get_parser():
     parser.add_argument('action',
                         help='What to do',
                         choices=('checkout', 'bot-cycle', 'bot',
-                                 'host-libraries', 'compilers', 'glibcs'))
+                                 'host-libraries', 'compilers', 'glibcs',
+                                 'update-syscall-lists'))
     parser.add_argument('configs',
                         help='Versions to check out or configurations to build',
                         nargs='*')
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index d2f0b60ea9..3e3a9a0c0e 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -1,3 +1,41 @@
+# Option to pass to Python scripts to set the C compiler.  Rewriting
+# MODULE_NAME is required to enable the _ISOMAC verbatim header
+# environment.
+sysdeps-linux-python-cc = \
+  --cc="$(CC) $(patsubst -DMODULE_NAME=%,-DMODULE_NAME=testsuite,$(CPPFLAGS))"
+
+# Additional dependencies for Python scripts.
+sysdeps-linux-python-deps = \
+  $(..)sysdeps/unix/sysv/linux/glibcsyscalls.py \
+  $(..)scripts/glibcextract.py
+
+# Invocation of the Python interpreter with the Python search path.
+sysdeps-linux-python = \
+  PYTHONPATH=$(..)scripts:$(..)sysdeps/unix/sysv/linux $(PYTHON)
+
+ifndef subdir
+# This target performs two actions:
+#
+# Replace <arch-syscall.h> with a file generated from kernel headers
+# and <fixup-asm-unistd.h>.  Both files are located via the sysdeps
+# override search path.
+#
+# Update sysdeps/unix/sysv/linux/syscall-names.list with additional
+# names found in the generated <arch-syscall.h> file, so that the
+# global system call names list is a superset of the
+# architecture-specific system call names.
+#
+# To bootstrap a new architecture, create an empty file in the right
+# place and run â€œmake update-arch-syscallâ€ from the top-level of a
+# configured, but not-yet-built glibc tree.
+.PHONY: update-syscall-lists
+update-syscall-lists: arch-syscall.h
+	$(sysdeps-linux-python) \
+	  sysdeps/unix/sysv/linux/update-syscall-lists.py \
+	    $(sysdeps-linux-python-cc) $< \
+	    sysdeps/unix/sysv/linux/syscall-names.list
+endif
+
 ifeq ($(subdir),csu)
 sysdep_routines += errno-loc
 endif
@@ -100,6 +138,19 @@ $(objpfx)tst-syscall-list.out: \
   $(objpfx)tst-syscall-list-sys.list
 	$(BASH) $^ $(AWK) > $@; $(evaluate-test)
 
+tests-special += $(objpfx)tst-glibcsyscalls.out
+# arch-syscall.h is located via the sysdeps override search path.
+$(objpfx)tst-glibcsyscalls.out: arch-syscall.h \
+  ../sysdeps/unix/sysv/linux/syscall-names.list
+	$(sysdeps-linux-python) \
+	  ../sysdeps/unix/sysv/linux/tst-glibcsyscalls.py \
+	    $(sysdeps-linux-python-cc) $< \
+	    ../sysdeps/unix/sysv/linux/syscall-names.list \
+	  < /dev/null > $@ 2>&1; $(evaluate-test)
+$(objpfx)tst-glibcsyscalls.out: \
+  ../sysdeps/unix/sysv/linux/tst-glibcsyscalls.py \
+  $(sysdeps-linux-python-deps)
+
 # Separate object file for access to the constant from the UAPI header.
 $(objpfx)tst-sysconf-iov_max: $(objpfx)tst-sysconf-iov_max-uapi.o
 
@@ -107,12 +158,11 @@ $(objpfx)tst-pkey: $(shared-thread-library)
 
 tests-special += $(objpfx)tst-mman-consts.out
 $(objpfx)tst-mman-consts.out: ../sysdeps/unix/sysv/linux/tst-mman-consts.py
-	PYTHONPATH=../scripts \
-	$(PYTHON) ../sysdeps/unix/sysv/linux/tst-mman-consts.py \
-		   --cc="$(CC) $(patsubst -DMODULE_NAME=%, \
-					  -DMODULE_NAME=testsuite, \
-					  $(CPPFLAGS))" \
-	< /dev/null > $@ 2>&1; $(evaluate-test)
+	$(sysdeps-linux-python) \
+	  ../sysdeps/unix/sysv/linux/tst-mman-consts.py \
+	    $(sysdeps-linux-python-cc) \
+	  < /dev/null > $@ 2>&1; $(evaluate-test)
+$(objpfx)tst-mman-consts.out: $(sysdeps-linux-python-deps)
 
 $(objpfx)tst-gettid: $(shared-thread-library)
 $(objpfx)tst-gettid-kill: $(shared-thread-library)
@@ -135,12 +185,11 @@ tests-special += $(objpfx)tst-signal-numbers.out
 $(objpfx)tst-signal-numbers.out: \
 		../sysdeps/unix/sysv/linux/tst-signal-numbers.py \
 		$(objpfx)signal.o*
-	PYTHONPATH=../scripts \
-	$(PYTHON) ../sysdeps/unix/sysv/linux/tst-signal-numbers.py \
-		   --cc="$(CC) $(patsubst -DMODULE_NAME=%, \
-					  -DMODULE_NAME=testsuite, \
-					  $(CPPFLAGS))" \
-	< /dev/null > $@ 2>&1; $(evaluate-test)
+	$(sysdeps-linux-python) \
+	  ../sysdeps/unix/sysv/linux/tst-signal-numbers.py \
+	    $(sysdeps-linux-python-cc) \
+	  < /dev/null > $@ 2>&1; $(evaluate-test)
+$(objpfx)tst-signal-numbers.out: $(sysdeps-linux-python-deps)
 endif
 
 ifeq ($(subdir),socket)
diff --git a/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h b/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h
new file mode 100644
index 0000000000..eac0104609
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h
@@ -0,0 +1,279 @@
+#define __NR_accept 202
+#define __NR_accept4 242
+#define __NR_acct 89
+#define __NR_add_key 217
+#define __NR_adjtimex 171
+#define __NR_bind 200
+#define __NR_bpf 280
+#define __NR_brk 214
+#define __NR_capget 90
+#define __NR_capset 91
+#define __NR_chdir 49
+#define __NR_chroot 51
+#define __NR_clock_adjtime 266
+#define __NR_clock_getres 114
+#define __NR_clock_gettime 113
+#define __NR_clock_nanosleep 115
+#define __NR_clock_settime 112
+#define __NR_clone 220
+#define __NR_close 57
+#define __NR_connect 203
+#define __NR_copy_file_range 285
+#define __NR_delete_module 106
+#define __NR_dup 23
+#define __NR_dup3 24
+#define __NR_epoll_create1 20
+#define __NR_epoll_ctl 21
+#define __NR_epoll_pwait 22
+#define __NR_eventfd2 19
+#define __NR_execve 221
+#define __NR_execveat 281
+#define __NR_exit 93
+#define __NR_exit_group 94
+#define __NR_faccessat 48
+#define __NR_fadvise64 223
+#define __NR_fallocate 47
+#define __NR_fanotify_init 262
+#define __NR_fanotify_mark 263
+#define __NR_fchdir 50
+#define __NR_fchmod 52
+#define __NR_fchmodat 53
+#define __NR_fchown 55
+#define __NR_fchownat 54
+#define __NR_fcntl 25
+#define __NR_fdatasync 83
+#define __NR_fgetxattr 10
+#define __NR_finit_module 273
+#define __NR_flistxattr 13
+#define __NR_flock 32
+#define __NR_fremovexattr 16
+#define __NR_fsetxattr 7
+#define __NR_fstat 80
+#define __NR_fstatfs 44
+#define __NR_fsync 82
+#define __NR_ftruncate 46
+#define __NR_futex 98
+#define __NR_get_mempolicy 236
+#define __NR_get_robust_list 100
+#define __NR_getcpu 168
+#define __NR_getcwd 17
+#define __NR_getdents64 61
+#define __NR_getegid 177
+#define __NR_geteuid 175
+#define __NR_getgid 176
+#define __NR_getgroups 158
+#define __NR_getitimer 102
+#define __NR_getpeername 205
+#define __NR_getpgid 155
+#define __NR_getpid 172
+#define __NR_getppid 173
+#define __NR_getpriority 141
+#define __NR_getrandom 278
+#define __NR_getresgid 150
+#define __NR_getresuid 148
+#define __NR_getrlimit 163
+#define __NR_getrusage 165
+#define __NR_getsid 156
+#define __NR_getsockname 204
+#define __NR_getsockopt 209
+#define __NR_gettid 178
+#define __NR_gettimeofday 169
+#define __NR_getuid 174
+#define __NR_getxattr 8
+#define __NR_init_module 105
+#define __NR_inotify_add_watch 27
+#define __NR_inotify_init1 26
+#define __NR_inotify_rm_watch 28
+#define __NR_io_cancel 3
+#define __NR_io_destroy 1
+#define __NR_io_getevents 4
+#define __NR_io_pgetevents 292
+#define __NR_io_setup 0
+#define __NR_io_submit 2
+#define __NR_ioctl 29
+#define __NR_ioprio_get 31
+#define __NR_ioprio_set 30
+#define __NR_kcmp 272
+#define __NR_kexec_file_load 294
+#define __NR_kexec_load 104
+#define __NR_keyctl 219
+#define __NR_kill 129
+#define __NR_lgetxattr 9
+#define __NR_linkat 37
+#define __NR_listen 201
+#define __NR_listxattr 11
+#define __NR_llistxattr 12
+#define __NR_lookup_dcookie 18
+#define __NR_lremovexattr 15
+#define __NR_lseek 62
+#define __NR_lsetxattr 6
+#define __NR_madvise 233
+#define __NR_mbind 235
+#define __NR_membarrier 283
+#define __NR_memfd_create 279
+#define __NR_migrate_pages 238
+#define __NR_mincore 232
+#define __NR_mkdirat 34
+#define __NR_mknodat 33
+#define __NR_mlock 228
+#define __NR_mlock2 284
+#define __NR_mlockall 230
+#define __NR_mmap 222
+#define __NR_mount 40
+#define __NR_move_pages 239
+#define __NR_mprotect 226
+#define __NR_mq_getsetattr 185
+#define __NR_mq_notify 184
+#define __NR_mq_open 180
+#define __NR_mq_timedreceive 183
+#define __NR_mq_timedsend 182
+#define __NR_mq_unlink 181
+#define __NR_mremap 216
+#define __NR_msgctl 187
+#define __NR_msgget 186
+#define __NR_msgrcv 188
+#define __NR_msgsnd 189
+#define __NR_msync 227
+#define __NR_munlock 229
+#define __NR_munlockall 231
+#define __NR_munmap 215
+#define __NR_name_to_handle_at 264
+#define __NR_nanosleep 101
+#define __NR_newfstatat 79
+#define __NR_nfsservctl 42
+#define __NR_open_by_handle_at 265
+#define __NR_openat 56
+#define __NR_perf_event_open 241
+#define __NR_personality 92
+#define __NR_pipe2 59
+#define __NR_pivot_root 41
+#define __NR_pkey_alloc 289
+#define __NR_pkey_free 290
+#define __NR_pkey_mprotect 288
+#define __NR_ppoll 73
+#define __NR_prctl 167
+#define __NR_pread64 67
+#define __NR_preadv 69
+#define __NR_preadv2 286
+#define __NR_prlimit64 261
+#define __NR_process_vm_readv 270
+#define __NR_process_vm_writev 271
+#define __NR_pselect6 72
+#define __NR_ptrace 117
+#define __NR_pwrite64 68
+#define __NR_pwritev 70
+#define __NR_pwritev2 287
+#define __NR_quotactl 60
+#define __NR_read 63
+#define __NR_readahead 213
+#define __NR_readlinkat 78
+#define __NR_readv 65
+#define __NR_reboot 142
+#define __NR_recvfrom 207
+#define __NR_recvmmsg 243
+#define __NR_recvmsg 212
+#define __NR_remap_file_pages 234
+#define __NR_removexattr 14
+#define __NR_renameat 38
+#define __NR_renameat2 276
+#define __NR_request_key 218
+#define __NR_restart_syscall 128
+#define __NR_rseq 293
+#define __NR_rt_sigaction 134
+#define __NR_rt_sigpending 136
+#define __NR_rt_sigprocmask 135
+#define __NR_rt_sigqueueinfo 138
+#define __NR_rt_sigreturn 139
+#define __NR_rt_sigsuspend 133
+#define __NR_rt_sigtimedwait 137
+#define __NR_rt_tgsigqueueinfo 240
+#define __NR_sched_get_priority_max 125
+#define __NR_sched_get_priority_min 126
+#define __NR_sched_getaffinity 123
+#define __NR_sched_getattr 275
+#define __NR_sched_getparam 121
+#define __NR_sched_getscheduler 120
+#define __NR_sched_rr_get_interval 127
+#define __NR_sched_setaffinity 122
+#define __NR_sched_setattr 274
+#define __NR_sched_setparam 118
+#define __NR_sched_setscheduler 119
+#define __NR_sched_yield 124
+#define __NR_seccomp 277
+#define __NR_semctl 191
+#define __NR_semget 190
+#define __NR_semop 193
+#define __NR_semtimedop 192
+#define __NR_sendfile 71
+#define __NR_sendmmsg 269
+#define __NR_sendmsg 211
+#define __NR_sendto 206
+#define __NR_set_mempolicy 237
+#define __NR_set_robust_list 99
+#define __NR_set_tid_address 96
+#define __NR_setdomainname 162
+#define __NR_setfsgid 152
+#define __NR_setfsuid 151
+#define __NR_setgid 144
+#define __NR_setgroups 159
+#define __NR_sethostname 161
+#define __NR_setitimer 103
+#define __NR_setns 268
+#define __NR_setpgid 154
+#define __NR_setpriority 140
+#define __NR_setregid 143
+#define __NR_setresgid 149
+#define __NR_setresuid 147
+#define __NR_setreuid 145
+#define __NR_setrlimit 164
+#define __NR_setsid 157
+#define __NR_setsockopt 208
+#define __NR_settimeofday 170
+#define __NR_setuid 146
+#define __NR_setxattr 5
+#define __NR_shmat 196
+#define __NR_shmctl 195
+#define __NR_shmdt 197
+#define __NR_shmget 194
+#define __NR_shutdown 210
+#define __NR_sigaltstack 132
+#define __NR_signalfd4 74
+#define __NR_socket 198
+#define __NR_socketpair 199
+#define __NR_splice 76
+#define __NR_statfs 43
+#define __NR_statx 291
+#define __NR_swapoff 225
+#define __NR_swapon 224
+#define __NR_symlinkat 36
+#define __NR_sync 81
+#define __NR_sync_file_range 84
+#define __NR_syncfs 267
+#define __NR_sysinfo 179
+#define __NR_syslog 116
+#define __NR_tee 77
+#define __NR_tgkill 131
+#define __NR_timer_create 107
+#define __NR_timer_delete 111
+#define __NR_timer_getoverrun 109
+#define __NR_timer_gettime 108
+#define __NR_timer_settime 110
+#define __NR_timerfd_create 85
+#define __NR_timerfd_gettime 87
+#define __NR_timerfd_settime 86
+#define __NR_times 153
+#define __NR_tkill 130
+#define __NR_truncate 45
+#define __NR_umask 166
+#define __NR_umount2 39
+#define __NR_uname 160
+#define __NR_unlinkat 35
+#define __NR_unshare 97
+#define __NR_userfaultfd 282
+#define __NR_utimensat 88
+#define __NR_vhangup 58
+#define __NR_vmsplice 75
+#define __NR_wait4 260
+#define __NR_waitid 95
+#define __NR_write 64
+#define __NR_writev 66
diff --git a/sysdeps/unix/sysv/linux/alpha/arch-syscall.h b/sysdeps/unix/sysv/linux/alpha/arch-syscall.h
new file mode 100644
index 0000000000..d993fe28e1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/arch-syscall.h
@@ -0,0 +1,442 @@
+#define __NR__sysctl 319
+#define __NR_accept 99
+#define __NR_accept4 502
+#define __NR_access 33
+#define __NR_acct 51
+#define __NR_add_key 439
+#define __NR_adjtimex 366
+#define __NR_afs_syscall 338
+#define __NR_bdflush 300
+#define __NR_bind 104
+#define __NR_bpf 515
+#define __NR_brk 17
+#define __NR_capget 368
+#define __NR_capset 369
+#define __NR_chdir 12
+#define __NR_chmod 15
+#define __NR_chown 16
+#define __NR_chroot 61
+#define __NR_clock_adjtime 499
+#define __NR_clock_getres 421
+#define __NR_clock_gettime 420
+#define __NR_clock_nanosleep 422
+#define __NR_clock_settime 419
+#define __NR_clone 312
+#define __NR_close 6
+#define __NR_connect 98
+#define __NR_copy_file_range 519
+#define __NR_create_module 306
+#define __NR_delete_module 308
+#define __NR_dipc 373
+#define __NR_dup 41
+#define __NR_dup2 90
+#define __NR_dup3 487
+#define __NR_epoll_create 407
+#define __NR_epoll_create1 486
+#define __NR_epoll_ctl 408
+#define __NR_epoll_pwait 474
+#define __NR_epoll_wait 409
+#define __NR_eventfd 478
+#define __NR_eventfd2 485
+#define __NR_exec_with_loader 25
+#define __NR_execve 59
+#define __NR_execveat 513
+#define __NR_exit 1
+#define __NR_exit_group 405
+#define __NR_faccessat 462
+#define __NR_fadvise64 413
+#define __NR_fallocate 480
+#define __NR_fanotify_init 494
+#define __NR_fanotify_mark 495
+#define __NR_fchdir 13
+#define __NR_fchmod 124
+#define __NR_fchmodat 461
+#define __NR_fchown 123
+#define __NR_fchownat 453
+#define __NR_fcntl 92
+#define __NR_fdatasync 447
+#define __NR_fgetxattr 387
+#define __NR_finit_module 507
+#define __NR_flistxattr 390
+#define __NR_flock 131
+#define __NR_fork 2
+#define __NR_fremovexattr 393
+#define __NR_fsetxattr 384
+#define __NR_fstat 91
+#define __NR_fstat64 427
+#define __NR_fstatat64 455
+#define __NR_fstatfs 329
+#define __NR_fsync 95
+#define __NR_ftruncate 130
+#define __NR_futex 394
+#define __NR_futimesat 454
+#define __NR_get_kernel_syms 309
+#define __NR_get_mempolicy 430
+#define __NR_get_robust_list 467
+#define __NR_getcpu 473
+#define __NR_getcwd 367
+#define __NR_getdents 305
+#define __NR_getdents64 377
+#define __NR_getdtablesize 89
+#define __NR_getgroups 79
+#define __NR_gethostname 87
+#define __NR_getitimer 361
+#define __NR_getpagesize 64
+#define __NR_getpeername 141
+#define __NR_getpgid 233
+#define __NR_getpgrp 63
+#define __NR_getpriority 100
+#define __NR_getrandom 511
+#define __NR_getresgid 372
+#define __NR_getresuid 344
+#define __NR_getrlimit 144
+#define __NR_getrusage 364
+#define __NR_getsid 234
+#define __NR_getsockname 150
+#define __NR_getsockopt 118
+#define __NR_gettid 378
+#define __NR_gettimeofday 359
+#define __NR_getxattr 385
+#define __NR_getxgid 47
+#define __NR_getxpid 20
+#define __NR_getxuid 24
+#define __NR_init_module 307
+#define __NR_inotify_add_watch 445
+#define __NR_inotify_init 444
+#define __NR_inotify_init1 489
+#define __NR_inotify_rm_watch 446
+#define __NR_io_cancel 402
+#define __NR_io_destroy 399
+#define __NR_io_getevents 400
+#define __NR_io_setup 398
+#define __NR_io_submit 401
+#define __NR_ioctl 54
+#define __NR_ioprio_get 443
+#define __NR_ioprio_set 442
+#define __NR_kcmp 506
+#define __NR_kexec_load 448
+#define __NR_keyctl 441
+#define __NR_kill 37
+#define __NR_lchown 208
+#define __NR_lgetxattr 386
+#define __NR_link 9
+#define __NR_linkat 458
+#define __NR_listen 106
+#define __NR_listxattr 388
+#define __NR_llistxattr 389
+#define __NR_lookup_dcookie 406
+#define __NR_lremovexattr 392
+#define __NR_lseek 19
+#define __NR_lsetxattr 383
+#define __NR_lstat 68
+#define __NR_lstat64 426
+#define __NR_madvise 75
+#define __NR_mbind 429
+#define __NR_membarrier 517
+#define __NR_memfd_create 512
+#define __NR_migrate_pages 449
+#define __NR_mincore 375
+#define __NR_mkdir 136
+#define __NR_mkdirat 451
+#define __NR_mknod 14
+#define __NR_mknodat 452
+#define __NR_mlock 314
+#define __NR_mlock2 518
+#define __NR_mlockall 316
+#define __NR_mmap 71
+#define __NR_mount 302
+#define __NR_move_pages 472
+#define __NR_mprotect 74
+#define __NR_mq_getsetattr 437
+#define __NR_mq_notify 436
+#define __NR_mq_open 432
+#define __NR_mq_timedreceive 435
+#define __NR_mq_timedsend 434
+#define __NR_mq_unlink 433
+#define __NR_mremap 341
+#define __NR_msgctl 200
+#define __NR_msgget 201
+#define __NR_msgrcv 202
+#define __NR_msgsnd 203
+#define __NR_msync 217
+#define __NR_munlock 315
+#define __NR_munlockall 317
+#define __NR_munmap 73
+#define __NR_name_to_handle_at 497
+#define __NR_nanosleep 340
+#define __NR_nfsservctl 342
+#define __NR_old_adjtimex 303
+#define __NR_oldumount 321
+#define __NR_open 45
+#define __NR_open_by_handle_at 498
+#define __NR_openat 450
+#define __NR_osf_adjtime 140
+#define __NR_osf_afs_syscall 258
+#define __NR_osf_alt_plock 181
+#define __NR_osf_alt_setsid 188
+#define __NR_osf_alt_sigpending 187
+#define __NR_osf_asynch_daemon 163
+#define __NR_osf_audcntl 252
+#define __NR_osf_audgen 253
+#define __NR_osf_chflags 34
+#define __NR_osf_execve 11
+#define __NR_osf_exportfs 169
+#define __NR_osf_fchflags 35
+#define __NR_osf_fdatasync 261
+#define __NR_osf_fpathconf 248
+#define __NR_osf_fstat 226
+#define __NR_osf_fstatfs 161
+#define __NR_osf_fstatfs64 228
+#define __NR_osf_fuser 243
+#define __NR_osf_getaddressconf 214
+#define __NR_osf_getdirentries 159
+#define __NR_osf_getdomainname 165
+#define __NR_osf_getfh 164
+#define __NR_osf_getfsstat 18
+#define __NR_osf_gethostid 142
+#define __NR_osf_getitimer 86
+#define __NR_osf_getlogin 49
+#define __NR_osf_getmnt 184
+#define __NR_osf_getrusage 117
+#define __NR_osf_getsysinfo 256
+#define __NR_osf_gettimeofday 116
+#define __NR_osf_kloadcall 223
+#define __NR_osf_kmodcall 77
+#define __NR_osf_lstat 225
+#define __NR_osf_memcntl 260
+#define __NR_osf_mincore 78
+#define __NR_osf_mount 21
+#define __NR_osf_mremap 65
+#define __NR_osf_msfs_syscall 240
+#define __NR_osf_msleep 215
+#define __NR_osf_mvalid 213
+#define __NR_osf_mwakeup 216
+#define __NR_osf_naccept 30
+#define __NR_osf_nfssvc 158
+#define __NR_osf_ngetpeername 31
+#define __NR_osf_ngetsockname 32
+#define __NR_osf_nrecvfrom 29
+#define __NR_osf_nrecvmsg 27
+#define __NR_osf_nsendmsg 28
+#define __NR_osf_ntp_adjtime 245
+#define __NR_osf_ntp_gettime 246
+#define __NR_osf_old_creat 8
+#define __NR_osf_old_fstat 62
+#define __NR_osf_old_getpgrp 81
+#define __NR_osf_old_killpg 146
+#define __NR_osf_old_lstat 40
+#define __NR_osf_old_open 5
+#define __NR_osf_old_sigaction 46
+#define __NR_osf_old_sigblock 109
+#define __NR_osf_old_sigreturn 139
+#define __NR_osf_old_sigsetmask 110
+#define __NR_osf_old_sigvec 108
+#define __NR_osf_old_stat 38
+#define __NR_osf_old_vadvise 72
+#define __NR_osf_old_vtrace 115
+#define __NR_osf_old_wait 84
+#define __NR_osf_oldquota 149
+#define __NR_osf_pathconf 247
+#define __NR_osf_pid_block 153
+#define __NR_osf_pid_unblock 154
+#define __NR_osf_plock 107
+#define __NR_osf_priocntlset 237
+#define __NR_osf_profil 44
+#define __NR_osf_proplist_syscall 244
+#define __NR_osf_reboot 55
+#define __NR_osf_revoke 56
+#define __NR_osf_sbrk 69
+#define __NR_osf_security 222
+#define __NR_osf_select 93
+#define __NR_osf_set_program_attributes 43
+#define __NR_osf_set_speculative 239
+#define __NR_osf_sethostid 143
+#define __NR_osf_setitimer 83
+#define __NR_osf_setlogin 50
+#define __NR_osf_setsysinfo 257
+#define __NR_osf_settimeofday 122
+#define __NR_osf_shmat 209
+#define __NR_osf_signal 218
+#define __NR_osf_sigprocmask 48
+#define __NR_osf_sigsendset 238
+#define __NR_osf_sigstack 112
+#define __NR_osf_sigwaitprim 157
+#define __NR_osf_sstk 70
+#define __NR_osf_stat 224
+#define __NR_osf_statfs 160
+#define __NR_osf_statfs64 227
+#define __NR_osf_subsys_info 255
+#define __NR_osf_swapctl 259
+#define __NR_osf_swapon 199
+#define __NR_osf_syscall 0
+#define __NR_osf_sysinfo 241
+#define __NR_osf_table 85
+#define __NR_osf_uadmin 242
+#define __NR_osf_usleep_thread 251
+#define __NR_osf_uswitch 250
+#define __NR_osf_utc_adjtime 220
+#define __NR_osf_utc_gettime 219
+#define __NR_osf_utimes 138
+#define __NR_osf_utsname 207
+#define __NR_osf_wait4 7
+#define __NR_osf_waitid 236
+#define __NR_pciconfig_iobase 376
+#define __NR_pciconfig_read 345
+#define __NR_pciconfig_write 346
+#define __NR_perf_event_open 493
+#define __NR_personality 324
+#define __NR_pipe 42
+#define __NR_pipe2 488
+#define __NR_pivot_root 374
+#define __NR_poll 94
+#define __NR_ppoll 464
+#define __NR_prctl 348
+#define __NR_pread64 349
+#define __NR_preadv 490
+#define __NR_preadv2 520
+#define __NR_prlimit64 496
+#define __NR_process_vm_readv 504
+#define __NR_process_vm_writev 505
+#define __NR_pselect6 463
+#define __NR_ptrace 26
+#define __NR_pwrite64 350
+#define __NR_pwritev 491
+#define __NR_pwritev2 521
+#define __NR_query_module 347
+#define __NR_quotactl 148
+#define __NR_read 3
+#define __NR_readahead 379
+#define __NR_readlink 58
+#define __NR_readlinkat 460
+#define __NR_readv 120
+#define __NR_reboot 311
+#define __NR_recv 102
+#define __NR_recvfrom 125
+#define __NR_recvmmsg 479
+#define __NR_recvmsg 113
+#define __NR_remap_file_pages 410
+#define __NR_removexattr 391
+#define __NR_rename 128
+#define __NR_renameat 457
+#define __NR_renameat2 510
+#define __NR_request_key 440
+#define __NR_restart_syscall 412
+#define __NR_rmdir 137
+#define __NR_rt_sigaction 352
+#define __NR_rt_sigpending 354
+#define __NR_rt_sigprocmask 353
+#define __NR_rt_sigqueueinfo 356
+#define __NR_rt_sigreturn 351
+#define __NR_rt_sigsuspend 357
+#define __NR_rt_sigtimedwait 355
+#define __NR_rt_tgsigqueueinfo 492
+#define __NR_sched_get_priority_max 335
+#define __NR_sched_get_priority_min 336
+#define __NR_sched_getaffinity 396
+#define __NR_sched_getattr 509
+#define __NR_sched_getparam 331
+#define __NR_sched_getscheduler 333
+#define __NR_sched_rr_get_interval 337
+#define __NR_sched_setaffinity 395
+#define __NR_sched_setattr 508
+#define __NR_sched_setparam 330
+#define __NR_sched_setscheduler 332
+#define __NR_sched_yield 334
+#define __NR_seccomp 514
+#define __NR_select 358
+#define __NR_semctl 204
+#define __NR_semget 205
+#define __NR_semop 206
+#define __NR_semtimedop 423
+#define __NR_send 101
+#define __NR_sendfile 370
+#define __NR_sendmmsg 503
+#define __NR_sendmsg 114
+#define __NR_sendto 133
+#define __NR_set_mempolicy 431
+#define __NR_set_robust_list 466
+#define __NR_set_tid_address 411
+#define __NR_setdomainname 166
+#define __NR_setfsgid 326
+#define __NR_setfsuid 325
+#define __NR_setgid 132
+#define __NR_setgroups 80
+#define __NR_sethae 301
+#define __NR_sethostname 88
+#define __NR_setitimer 362
+#define __NR_setns 501
+#define __NR_setpgid 39
+#define __NR_setpgrp 82
+#define __NR_setpriority 96
+#define __NR_setregid 127
+#define __NR_setresgid 371
+#define __NR_setresuid 343
+#define __NR_setreuid 126
+#define __NR_setrlimit 145
+#define __NR_setsid 147
+#define __NR_setsockopt 105
+#define __NR_settimeofday 360
+#define __NR_setuid 23
+#define __NR_setxattr 382
+#define __NR_shmctl 210
+#define __NR_shmdt 211
+#define __NR_shmget 212
+#define __NR_shutdown 134
+#define __NR_sigaction 156
+#define __NR_sigaltstack 235
+#define __NR_signalfd 476
+#define __NR_signalfd4 484
+#define __NR_sigpending 52
+#define __NR_sigreturn 103
+#define __NR_sigsuspend 111
+#define __NR_socket 97
+#define __NR_socketpair 135
+#define __NR_splice 468
+#define __NR_stat 67
+#define __NR_stat64 425
+#define __NR_statfs 328
+#define __NR_statx 522
+#define __NR_swapoff 304
+#define __NR_swapon 322
+#define __NR_symlink 57
+#define __NR_symlinkat 459
+#define __NR_sync 36
+#define __NR_sync_file_range 469
+#define __NR_syncfs 500
+#define __NR_sysfs 254
+#define __NR_sysinfo 318
+#define __NR_syslog 310
+#define __NR_tee 470
+#define __NR_tgkill 424
+#define __NR_timer_create 414
+#define __NR_timer_delete 418
+#define __NR_timer_getoverrun 417
+#define __NR_timer_gettime 416
+#define __NR_timer_settime 415
+#define __NR_timerfd 477
+#define __NR_timerfd_create 481
+#define __NR_timerfd_gettime 483
+#define __NR_timerfd_settime 482
+#define __NR_times 323
+#define __NR_tkill 381
+#define __NR_truncate 129
+#define __NR_tuxcall 397
+#define __NR_umask 60
+#define __NR_umount 22
+#define __NR_uname 339
+#define __NR_unlink 10
+#define __NR_unlinkat 456
+#define __NR_unshare 465
+#define __NR_uselib 313
+#define __NR_userfaultfd 516
+#define __NR_ustat 327
+#define __NR_utimensat 475
+#define __NR_utimes 363
+#define __NR_vfork 66
+#define __NR_vhangup 76
+#define __NR_vmsplice 471
+#define __NR_vserver 428
+#define __NR_wait4 365
+#define __NR_waitid 438
+#define __NR_write 4
+#define __NR_writev 121
diff --git a/sysdeps/unix/sysv/linux/arm/arch-syscall.h b/sysdeps/unix/sysv/linux/arm/arch-syscall.h
new file mode 100644
index 0000000000..d1a1dec1e8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/arch-syscall.h
@@ -0,0 +1,358 @@
+#define __NR__llseek 140
+#define __NR__newselect 142
+#define __NR__sysctl 149
+#define __NR_accept 285
+#define __NR_accept4 366
+#define __NR_access 33
+#define __NR_acct 51
+#define __NR_add_key 309
+#define __NR_adjtimex 124
+#define __NR_arm_fadvise64_64 270
+#define __NR_arm_sync_file_range 341
+#define __NR_bdflush 134
+#define __NR_bind 282
+#define __NR_bpf 386
+#define __NR_brk 45
+#define __NR_cacheflush 983042
+#define __NR_capget 184
+#define __NR_capset 185
+#define __NR_chdir 12
+#define __NR_chmod 15
+#define __NR_chown 182
+#define __NR_chown32 212
+#define __NR_chroot 61
+#define __NR_clock_adjtime 372
+#define __NR_clock_getres 264
+#define __NR_clock_gettime 263
+#define __NR_clock_nanosleep 265
+#define __NR_clock_settime 262
+#define __NR_clone 120
+#define __NR_close 6
+#define __NR_connect 283
+#define __NR_copy_file_range 391
+#define __NR_creat 8
+#define __NR_delete_module 129
+#define __NR_dup 41
+#define __NR_dup2 63
+#define __NR_dup3 358
+#define __NR_epoll_create 250
+#define __NR_epoll_create1 357
+#define __NR_epoll_ctl 251
+#define __NR_epoll_pwait 346
+#define __NR_epoll_wait 252
+#define __NR_eventfd 351
+#define __NR_eventfd2 356
+#define __NR_execve 11
+#define __NR_execveat 387
+#define __NR_exit 1
+#define __NR_exit_group 248
+#define __NR_faccessat 334
+#define __NR_fallocate 352
+#define __NR_fanotify_init 367
+#define __NR_fanotify_mark 368
+#define __NR_fchdir 133
+#define __NR_fchmod 94
+#define __NR_fchmodat 333
+#define __NR_fchown 95
+#define __NR_fchown32 207
+#define __NR_fchownat 325
+#define __NR_fcntl 55
+#define __NR_fcntl64 221
+#define __NR_fdatasync 148
+#define __NR_fgetxattr 231
+#define __NR_finit_module 379
+#define __NR_flistxattr 234
+#define __NR_flock 143
+#define __NR_fork 2
+#define __NR_fremovexattr 237
+#define __NR_fsetxattr 228
+#define __NR_fstat 108
+#define __NR_fstat64 197
+#define __NR_fstatat64 327
+#define __NR_fstatfs 100
+#define __NR_fstatfs64 267
+#define __NR_fsync 118
+#define __NR_ftruncate 93
+#define __NR_ftruncate64 194
+#define __NR_futex 240
+#define __NR_futimesat 326
+#define __NR_get_mempolicy 320
+#define __NR_get_robust_list 339
+#define __NR_getcpu 345
+#define __NR_getcwd 183
+#define __NR_getdents 141
+#define __NR_getdents64 217
+#define __NR_getegid 50
+#define __NR_getegid32 202
+#define __NR_geteuid 49
+#define __NR_geteuid32 201
+#define __NR_getgid 47
+#define __NR_getgid32 200
+#define __NR_getgroups 80
+#define __NR_getgroups32 205
+#define __NR_getitimer 105
+#define __NR_getpeername 287
+#define __NR_getpgid 132
+#define __NR_getpgrp 65
+#define __NR_getpid 20
+#define __NR_getppid 64
+#define __NR_getpriority 96
+#define __NR_getrandom 384
+#define __NR_getresgid 171
+#define __NR_getresgid32 211
+#define __NR_getresuid 165
+#define __NR_getresuid32 209
+#define __NR_getrusage 77
+#define __NR_getsid 147
+#define __NR_getsockname 286
+#define __NR_getsockopt 295
+#define __NR_gettid 224
+#define __NR_gettimeofday 78
+#define __NR_getuid 24
+#define __NR_getuid32 199
+#define __NR_getxattr 229
+#define __NR_init_module 128
+#define __NR_inotify_add_watch 317
+#define __NR_inotify_init 316
+#define __NR_inotify_init1 360
+#define __NR_inotify_rm_watch 318
+#define __NR_io_cancel 247
+#define __NR_io_destroy 244
+#define __NR_io_getevents 245
+#define __NR_io_pgetevents 399
+#define __NR_io_setup 243
+#define __NR_io_submit 246
+#define __NR_ioctl 54
+#define __NR_ioprio_get 315
+#define __NR_ioprio_set 314
+#define __NR_kcmp 378
+#define __NR_kexec_load 347
+#define __NR_keyctl 311
+#define __NR_kill 37
+#define __NR_lchown 16
+#define __NR_lchown32 198
+#define __NR_lgetxattr 230
+#define __NR_link 9
+#define __NR_linkat 330
+#define __NR_listen 284
+#define __NR_listxattr 232
+#define __NR_llistxattr 233
+#define __NR_lookup_dcookie 249
+#define __NR_lremovexattr 236
+#define __NR_lseek 19
+#define __NR_lsetxattr 227
+#define __NR_lstat 107
+#define __NR_lstat64 196
+#define __NR_madvise 220
+#define __NR_mbind 319
+#define __NR_membarrier 389
+#define __NR_memfd_create 385
+#define __NR_mincore 219
+#define __NR_mkdir 39
+#define __NR_mkdirat 323
+#define __NR_mknod 14
+#define __NR_mknodat 324
+#define __NR_mlock 150
+#define __NR_mlock2 390
+#define __NR_mlockall 152
+#define __NR_mmap2 192
+#define __NR_mount 21
+#define __NR_move_pages 344
+#define __NR_mprotect 125
+#define __NR_mq_getsetattr 279
+#define __NR_mq_notify 278
+#define __NR_mq_open 274
+#define __NR_mq_timedreceive 277
+#define __NR_mq_timedsend 276
+#define __NR_mq_unlink 275
+#define __NR_mremap 163
+#define __NR_msgctl 304
+#define __NR_msgget 303
+#define __NR_msgrcv 302
+#define __NR_msgsnd 301
+#define __NR_msync 144
+#define __NR_munlock 151
+#define __NR_munlockall 153
+#define __NR_munmap 91
+#define __NR_name_to_handle_at 370
+#define __NR_nanosleep 162
+#define __NR_nfsservctl 169
+#define __NR_nice 34
+#define __NR_open 5
+#define __NR_open_by_handle_at 371
+#define __NR_openat 322
+#define __NR_pause 29
+#define __NR_pciconfig_iobase 271
+#define __NR_pciconfig_read 272
+#define __NR_pciconfig_write 273
+#define __NR_perf_event_open 364
+#define __NR_personality 136
+#define __NR_pipe 42
+#define __NR_pipe2 359
+#define __NR_pivot_root 218
+#define __NR_pkey_alloc 395
+#define __NR_pkey_free 396
+#define __NR_pkey_mprotect 394
+#define __NR_poll 168
+#define __NR_ppoll 336
+#define __NR_prctl 172
+#define __NR_pread64 180
+#define __NR_preadv 361
+#define __NR_preadv2 392
+#define __NR_prlimit64 369
+#define __NR_process_vm_readv 376
+#define __NR_process_vm_writev 377
+#define __NR_pselect6 335
+#define __NR_ptrace 26
+#define __NR_pwrite64 181
+#define __NR_pwritev 362
+#define __NR_pwritev2 393
+#define __NR_quotactl 131
+#define __NR_read 3
+#define __NR_readahead 225
+#define __NR_readlink 85
+#define __NR_readlinkat 332
+#define __NR_readv 145
+#define __NR_reboot 88
+#define __NR_recv 291
+#define __NR_recvfrom 292
+#define __NR_recvmmsg 365
+#define __NR_recvmsg 297
+#define __NR_remap_file_pages 253
+#define __NR_removexattr 235
+#define __NR_rename 38
+#define __NR_renameat 329
+#define __NR_renameat2 382
+#define __NR_request_key 310
+#define __NR_restart_syscall 0
+#define __NR_rmdir 40
+#define __NR_rseq 398
+#define __NR_rt_sigaction 174
+#define __NR_rt_sigpending 176
+#define __NR_rt_sigprocmask 175
+#define __NR_rt_sigqueueinfo 178
+#define __NR_rt_sigreturn 173
+#define __NR_rt_sigsuspend 179
+#define __NR_rt_sigtimedwait 177
+#define __NR_rt_tgsigqueueinfo 363
+#define __NR_sched_get_priority_max 159
+#define __NR_sched_get_priority_min 160
+#define __NR_sched_getaffinity 242
+#define __NR_sched_getattr 381
+#define __NR_sched_getparam 155
+#define __NR_sched_getscheduler 157
+#define __NR_sched_rr_get_interval 161
+#define __NR_sched_setaffinity 241
+#define __NR_sched_setattr 380
+#define __NR_sched_setparam 154
+#define __NR_sched_setscheduler 156
+#define __NR_sched_yield 158
+#define __NR_seccomp 383
+#define __NR_semctl 300
+#define __NR_semget 299
+#define __NR_semop 298
+#define __NR_semtimedop 312
+#define __NR_send 289
+#define __NR_sendfile 187
+#define __NR_sendfile64 239
+#define __NR_sendmmsg 374
+#define __NR_sendmsg 296
+#define __NR_sendto 290
+#define __NR_set_mempolicy 321
+#define __NR_set_robust_list 338
+#define __NR_set_tid_address 256
+#define __NR_set_tls 983045
+#define __NR_setdomainname 121
+#define __NR_setfsgid 139
+#define __NR_setfsgid32 216
+#define __NR_setfsuid 138
+#define __NR_setfsuid32 215
+#define __NR_setgid 46
+#define __NR_setgid32 214
+#define __NR_setgroups 81
+#define __NR_setgroups32 206
+#define __NR_sethostname 74
+#define __NR_setitimer 104
+#define __NR_setns 375
+#define __NR_setpgid 57
+#define __NR_setpriority 97
+#define __NR_setregid 71
+#define __NR_setregid32 204
+#define __NR_setresgid 170
+#define __NR_setresgid32 210
+#define __NR_setresuid 164
+#define __NR_setresuid32 208
+#define __NR_setreuid 70
+#define __NR_setreuid32 203
+#define __NR_setrlimit 75
+#define __NR_setsid 66
+#define __NR_setsockopt 294
+#define __NR_settimeofday 79
+#define __NR_setuid 23
+#define __NR_setuid32 213
+#define __NR_setxattr 226
+#define __NR_shmat 305
+#define __NR_shmctl 308
+#define __NR_shmdt 306
+#define __NR_shmget 307
+#define __NR_shutdown 293
+#define __NR_sigaction 67
+#define __NR_sigaltstack 186
+#define __NR_signalfd 349
+#define __NR_signalfd4 355
+#define __NR_sigpending 73
+#define __NR_sigprocmask 126
+#define __NR_sigreturn 119
+#define __NR_sigsuspend 72
+#define __NR_socket 281
+#define __NR_socketpair 288
+#define __NR_splice 340
+#define __NR_stat 106
+#define __NR_stat64 195
+#define __NR_statfs 99
+#define __NR_statfs64 266
+#define __NR_statx 397
+#define __NR_swapoff 115
+#define __NR_swapon 87
+#define __NR_symlink 83
+#define __NR_symlinkat 331
+#define __NR_sync 36
+#define __NR_sync_file_range2 341
+#define __NR_syncfs 373
+#define __NR_sysfs 135
+#define __NR_sysinfo 116
+#define __NR_syslog 103
+#define __NR_tee 342
+#define __NR_tgkill 268
+#define __NR_timer_create 257
+#define __NR_timer_delete 261
+#define __NR_timer_getoverrun 260
+#define __NR_timer_gettime 259
+#define __NR_timer_settime 258
+#define __NR_timerfd_create 350
+#define __NR_timerfd_gettime 354
+#define __NR_timerfd_settime 353
+#define __NR_times 43
+#define __NR_tkill 238
+#define __NR_truncate 92
+#define __NR_truncate64 193
+#define __NR_ugetrlimit 191
+#define __NR_umask 60
+#define __NR_umount2 52
+#define __NR_uname 122
+#define __NR_unlink 10
+#define __NR_unlinkat 328
+#define __NR_unshare 337
+#define __NR_uselib 86
+#define __NR_userfaultfd 388
+#define __NR_ustat 62
+#define __NR_utimensat 348
+#define __NR_utimes 269
+#define __NR_vfork 190
+#define __NR_vhangup 111
+#define __NR_vmsplice 343
+#define __NR_vserver 313
+#define __NR_wait4 114
+#define __NR_waitid 280
+#define __NR_write 4
+#define __NR_writev 146
diff --git a/sysdeps/unix/sysv/linux/arm/fixup-asm-unistd.h b/sysdeps/unix/sysv/linux/arm/fixup-asm-unistd.h
new file mode 100644
index 0000000000..6f236462a8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/fixup-asm-unistd.h
@@ -0,0 +1,24 @@
+/* Regularize <asm/unistd.h> definitions.  Arm version.
+   Copyright (C) 2019 Free Software Foundation, Inc.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* These system calls have iregular names and are used by glibc.  */
+#ifndef __NR_cacheflush
+# define __NR_cacheflush __ARM_NR_cacheflush
+#endif
+#ifndef __NR_set_tls
+# define __NR_set_tls    __ARM_NR_set_tls
+#endif
diff --git a/sysdeps/unix/sysv/linux/csky/arch-syscall.h b/sysdeps/unix/sysv/linux/csky/arch-syscall.h
new file mode 100644
index 0000000000..a409c7003e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/csky/arch-syscall.h
@@ -0,0 +1,278 @@
+#define __NR_accept 202
+#define __NR_accept4 242
+#define __NR_acct 89
+#define __NR_add_key 217
+#define __NR_adjtimex 171
+#define __NR_bind 200
+#define __NR_bpf 280
+#define __NR_brk 214
+#define __NR_cacheflush 245
+#define __NR_capget 90
+#define __NR_capset 91
+#define __NR_chdir 49
+#define __NR_chroot 51
+#define __NR_clock_adjtime 266
+#define __NR_clock_getres 114
+#define __NR_clock_gettime 113
+#define __NR_clock_nanosleep 115
+#define __NR_clock_settime 112
+#define __NR_clone 220
+#define __NR_close 57
+#define __NR_connect 203
+#define __NR_copy_file_range 285
+#define __NR_delete_module 106
+#define __NR_dup 23
+#define __NR_dup3 24
+#define __NR_epoll_create1 20
+#define __NR_epoll_ctl 21
+#define __NR_epoll_pwait 22
+#define __NR_eventfd2 19
+#define __NR_execve 221
+#define __NR_execveat 281
+#define __NR_exit 93
+#define __NR_exit_group 94
+#define __NR_faccessat 48
+#define __NR_fadvise64_64 223
+#define __NR_fallocate 47
+#define __NR_fanotify_init 262
+#define __NR_fanotify_mark 263
+#define __NR_fchdir 50
+#define __NR_fchmod 52
+#define __NR_fchmodat 53
+#define __NR_fchown 55
+#define __NR_fchownat 54
+#define __NR_fcntl64 25
+#define __NR_fdatasync 83
+#define __NR_fgetxattr 10
+#define __NR_finit_module 273
+#define __NR_flistxattr 13
+#define __NR_flock 32
+#define __NR_fremovexattr 16
+#define __NR_fsetxattr 7
+#define __NR_fstatfs64 44
+#define __NR_fsync 82
+#define __NR_ftruncate64 46
+#define __NR_futex 98
+#define __NR_get_mempolicy 236
+#define __NR_get_robust_list 100
+#define __NR_getcpu 168
+#define __NR_getcwd 17
+#define __NR_getdents64 61
+#define __NR_getegid 177
+#define __NR_geteuid 175
+#define __NR_getgid 176
+#define __NR_getgroups 158
+#define __NR_getitimer 102
+#define __NR_getpeername 205
+#define __NR_getpgid 155
+#define __NR_getpid 172
+#define __NR_getppid 173
+#define __NR_getpriority 141
+#define __NR_getrandom 278
+#define __NR_getresgid 150
+#define __NR_getresuid 148
+#define __NR_getrlimit 163
+#define __NR_getrusage 165
+#define __NR_getsid 156
+#define __NR_getsockname 204
+#define __NR_getsockopt 209
+#define __NR_gettid 178
+#define __NR_gettimeofday 169
+#define __NR_getuid 174
+#define __NR_getxattr 8
+#define __NR_init_module 105
+#define __NR_inotify_add_watch 27
+#define __NR_inotify_init1 26
+#define __NR_inotify_rm_watch 28
+#define __NR_io_cancel 3
+#define __NR_io_destroy 1
+#define __NR_io_getevents 4
+#define __NR_io_pgetevents 292
+#define __NR_io_setup 0
+#define __NR_io_submit 2
+#define __NR_ioctl 29
+#define __NR_ioprio_get 31
+#define __NR_ioprio_set 30
+#define __NR_kcmp 272
+#define __NR_kexec_file_load 294
+#define __NR_kexec_load 104
+#define __NR_keyctl 219
+#define __NR_kill 129
+#define __NR_lgetxattr 9
+#define __NR_linkat 37
+#define __NR_listen 201
+#define __NR_listxattr 11
+#define __NR_llistxattr 12
+#define __NR_llseek 62
+#define __NR_lookup_dcookie 18
+#define __NR_lremovexattr 15
+#define __NR_lsetxattr 6
+#define __NR_madvise 233
+#define __NR_mbind 235
+#define __NR_membarrier 283
+#define __NR_memfd_create 279
+#define __NR_migrate_pages 238
+#define __NR_mincore 232
+#define __NR_mkdirat 34
+#define __NR_mknodat 33
+#define __NR_mlock 228
+#define __NR_mlock2 284
+#define __NR_mlockall 230
+#define __NR_mmap2 222
+#define __NR_mount 40
+#define __NR_move_pages 239
+#define __NR_mprotect 226
+#define __NR_mq_getsetattr 185
+#define __NR_mq_notify 184
+#define __NR_mq_open 180
+#define __NR_mq_timedreceive 183
+#define __NR_mq_timedsend 182
+#define __NR_mq_unlink 181
+#define __NR_mremap 216
+#define __NR_msgctl 187
+#define __NR_msgget 186
+#define __NR_msgrcv 188
+#define __NR_msgsnd 189
+#define __NR_msync 227
+#define __NR_munlock 229
+#define __NR_munlockall 231
+#define __NR_munmap 215
+#define __NR_name_to_handle_at 264
+#define __NR_nanosleep 101
+#define __NR_nfsservctl 42
+#define __NR_open_by_handle_at 265
+#define __NR_openat 56
+#define __NR_perf_event_open 241
+#define __NR_personality 92
+#define __NR_pipe2 59
+#define __NR_pivot_root 41
+#define __NR_pkey_alloc 289
+#define __NR_pkey_free 290
+#define __NR_pkey_mprotect 288
+#define __NR_ppoll 73
+#define __NR_prctl 167
+#define __NR_pread64 67
+#define __NR_preadv 69
+#define __NR_preadv2 286
+#define __NR_prlimit64 261
+#define __NR_process_vm_readv 270
+#define __NR_process_vm_writev 271
+#define __NR_pselect6 72
+#define __NR_ptrace 117
+#define __NR_pwrite64 68
+#define __NR_pwritev 70
+#define __NR_pwritev2 287
+#define __NR_quotactl 60
+#define __NR_read 63
+#define __NR_readahead 213
+#define __NR_readlinkat 78
+#define __NR_readv 65
+#define __NR_reboot 142
+#define __NR_recvfrom 207
+#define __NR_recvmmsg 243
+#define __NR_recvmsg 212
+#define __NR_remap_file_pages 234
+#define __NR_removexattr 14
+#define __NR_renameat2 276
+#define __NR_request_key 218
+#define __NR_restart_syscall 128
+#define __NR_rseq 293
+#define __NR_rt_sigaction 134
+#define __NR_rt_sigpending 136
+#define __NR_rt_sigprocmask 135
+#define __NR_rt_sigqueueinfo 138
+#define __NR_rt_sigreturn 139
+#define __NR_rt_sigsuspend 133
+#define __NR_rt_sigtimedwait 137
+#define __NR_rt_tgsigqueueinfo 240
+#define __NR_sched_get_priority_max 125
+#define __NR_sched_get_priority_min 126
+#define __NR_sched_getaffinity 123
+#define __NR_sched_getattr 275
+#define __NR_sched_getparam 121
+#define __NR_sched_getscheduler 120
+#define __NR_sched_rr_get_interval 127
+#define __NR_sched_setaffinity 122
+#define __NR_sched_setattr 274
+#define __NR_sched_setparam 118
+#define __NR_sched_setscheduler 119
+#define __NR_sched_yield 124
+#define __NR_seccomp 277
+#define __NR_semctl 191
+#define __NR_semget 190
+#define __NR_semop 193
+#define __NR_semtimedop 192
+#define __NR_sendfile64 71
+#define __NR_sendmmsg 269
+#define __NR_sendmsg 211
+#define __NR_sendto 206
+#define __NR_set_mempolicy 237
+#define __NR_set_robust_list 99
+#define __NR_set_thread_area 244
+#define __NR_set_tid_address 96
+#define __NR_setdomainname 162
+#define __NR_setfsgid 152
+#define __NR_setfsuid 151
+#define __NR_setgid 144
+#define __NR_setgroups 159
+#define __NR_sethostname 161
+#define __NR_setitimer 103
+#define __NR_setns 268
+#define __NR_setpgid 154
+#define __NR_setpriority 140
+#define __NR_setregid 143
+#define __NR_setresgid 149
+#define __NR_setresuid 147
+#define __NR_setreuid 145
+#define __NR_setrlimit 164
+#define __NR_setsid 157
+#define __NR_setsockopt 208
+#define __NR_settimeofday 170
+#define __NR_setuid 146
+#define __NR_setxattr 5
+#define __NR_shmat 196
+#define __NR_shmctl 195
+#define __NR_shmdt 197
+#define __NR_shmget 194
+#define __NR_shutdown 210
+#define __NR_sigaltstack 132
+#define __NR_signalfd4 74
+#define __NR_socket 198
+#define __NR_socketpair 199
+#define __NR_splice 76
+#define __NR_statfs64 43
+#define __NR_statx 291
+#define __NR_swapoff 225
+#define __NR_swapon 224
+#define __NR_symlinkat 36
+#define __NR_sync 81
+#define __NR_sync_file_range 84
+#define __NR_syncfs 267
+#define __NR_sysinfo 179
+#define __NR_syslog 116
+#define __NR_tee 77
+#define __NR_tgkill 131
+#define __NR_timer_create 107
+#define __NR_timer_delete 111
+#define __NR_timer_getoverrun 109
+#define __NR_timer_gettime 108
+#define __NR_timer_settime 110
+#define __NR_timerfd_create 85
+#define __NR_timerfd_gettime 87
+#define __NR_timerfd_settime 86
+#define __NR_times 153
+#define __NR_tkill 130
+#define __NR_truncate64 45
+#define __NR_umask 166
+#define __NR_umount2 39
+#define __NR_uname 160
+#define __NR_unlinkat 35
+#define __NR_unshare 97
+#define __NR_userfaultfd 282
+#define __NR_utimensat 88
+#define __NR_vhangup 58
+#define __NR_vmsplice 75
+#define __NR_wait4 260
+#define __NR_waitid 95
+#define __NR_write 64
+#define __NR_writev 66
diff --git a/sysdeps/unix/sysv/linux/fixup-asm-unistd.h b/sysdeps/unix/sysv/linux/fixup-asm-unistd.h
new file mode 100644
index 0000000000..a5bd9822b7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/fixup-asm-unistd.h
@@ -0,0 +1,28 @@
+/* Regularize <asm/unistd.h> definitions.  Default version.
+   Copyright (C) 2019 Free Software Foundation, Inc.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* Some architectures have irregular system call names in
+   <asm/unistd.h>.  glibc assumes that system call numbers start with
+   __NR_* and lists the system calls under proper names in
+   <arch-syscall.h>.
+
+   During consistency tests, <fixup-asm-unistd.h> is included after
+   the kernel's <asm/unistd.h>, to introduce aliases as necessary to
+   match the glibc definitions in <arch-syscall.h>.
+
+   Most architectures do not need these fixups, so the default header
+   is empty.  */
diff --git a/sysdeps/unix/sysv/linux/glibcsyscalls.py b/sysdeps/unix/sysv/linux/glibcsyscalls.py
new file mode 100644
index 0000000000..b968229a48
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/glibcsyscalls.py
@@ -0,0 +1,165 @@
+#!/usr/bin/python3
+# Helpers for glibc system call list processing.
+# Copyright (C) 2018-2019 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+#
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+import re
+
+import glibcextract
+
+def extract_system_call_name(macro):
+    """Convert the macro name (with __NR_) to a system call name."""
+    prefix = '__NR_'
+    if macro.startswith(prefix):
+        return macro[len(prefix):]
+    else:
+        raise ValueError('invalid system call name: {!r}'.format(macro))
+
+# Matches macros for systme call names.
+RE_SYSCALL = re.compile('__NR_.*')
+
+# Some __NR_ constants are not real
+RE_PSEUDO_SYSCALL = re.compile(r"""__NR_(
+    # Reserved system call.
+    (unused|reserved)[0-9]+
+
+    # Pseudo-system call which describes a range.
+    |(syscalls|arch_specific_syscall|(OABI_)?SYSCALL_BASE)
+    |(|64_|[NO]32_)Linux(_syscalls)?
+   )""", re.X)
+
+def kernel_constants(cc):
+    """Return a dictionary with the kernel-defined system call numbers.
+
+    This come from <asm/unistd.h>.
+
+    """
+    return {extract_system_call_name(name) : int(value)
+            for name, value in glibcextract.compute_macro_consts(
+                    '#include <asm/unistd.h>\n'
+                    # Regularlize the kernel definitions if necessary.
+                    '#include <fixup-asm-unistd.h>',
+                    cc, macro_re=RE_SYSCALL, exclude_re=RE_PSEUDO_SYSCALL)
+            .items()}
+
+class SyscallNamesList:
+    """The list of known system call names.
+
+    glibc keeps a list of system call names.  The <sys/syscall.h>
+    header needs to provide a SYS_ name for each __NR_ macro,
+    and the generated <bits/syscall.h> header uses an
+    architecture-independent list, so that there is a chance that
+    system calls arriving late on certain architectures will automatically
+    get the expected SYS_ macro.
+
+    syscalls: list of strings with system call names
+    kernel_version: tuple of integers; the kernel version given in the file
+
+    """
+    def __init__(self, lines):
+        self.syscalls = []
+        old_name = None
+        self.kernel_version = None
+        self.__lines = tuple(lines)
+        for line in self.__lines:
+            line = line.strip()
+            if (not line) or line[0] == '#':
+                continue
+            comps = line.split()
+            if len(comps) == 1:
+                self.syscalls.append(comps[0])
+                if old_name is not None:
+                    if comps[0] < old_name:
+                        raise ValueError(
+                            'name list is not sorted: {!r} < {!r}'.format(
+                                comps[0], old_name))
+                old_name = comps[0]
+                continue
+            if len(comps) == 2 and comps[0] == "kernel":
+                if self.kernel_version is not None:
+                    raise ValueError(
+                        "multiple kernel versions: {!r} and !{r}".format(
+                            kernel_version, comps[1]))
+                self.kernel_version = tuple(map(int, comps[1].split(".")))
+                continue
+            raise ValueError("invalid line: !r".format(line))
+        if self.kernel_version is None:
+            raise ValueError("missing kernel version")
+
+    def merge(self, names):
+        """Merge sequence NAMES and return the lines of the new file."""
+        names = list(set(names) - set(self.syscalls))
+        names.sort()
+        names.reverse()
+        result = []
+        def emit_name():
+            result.append(names[-1] + "\n")
+            del names[-1]
+
+        for line in self.__lines:
+            comps = line.strip().split()
+            if len(comps) == 1 and not comps[0].startswith("#"):
+                # File has a system call at this position.  Insert all
+                # the names that come before the name in the file
+                # lexicographically.
+                while names and names[-1] < comps[0]:
+                    emit_name()
+            result.append(line)
+        while names:
+            emit_name()
+
+        return result
+
+def load_arch_syscall_header(path):
+    """"Load the system call header form the file PATH.
+
+    The file must consist of lines of this form:
+
+    #define __NR_exit 1
+
+    The file is parsed verbatim, without running it through a C
+    preprocessor or parser.  The intent is that the file can be
+    readily processed by tools.
+
+    """
+    with open(path) as inp:
+        result = {}
+        old_name = None
+        for line in inp:
+            line = line.strip()
+            define, name, number = line.split(' ', 2)
+            if define != '#define':
+                raise ValueError("invalid syscall header line: {!r}".format(
+                    line))
+            result[extract_system_call_name(name)] = int(number)
+
+            # Check list order.
+            if old_name is not None:
+                if name < old_name:
+                    raise ValueError(
+                        'system call list is not sorted: {!r} < {!r}'.format(
+                            name, old_name))
+            old_name = name
+        return result
+
+def linux_kernel_version(cc):
+    """Return the (major, minor) version of the Linux kernel headers."""
+    sym_data = ['#include <linux/version.h>', 'START',
+                ('LINUX_VERSION_CODE', 'LINUX_VERSION_CODE')]
+    val = glibcextract.compute_c_consts(sym_data, cc)['LINUX_VERSION_CODE']
+    val = int(val)
+    return ((val & 0xff0000) >> 16, (val & 0xff00) >> 8)
diff --git a/sysdeps/unix/sysv/linux/hppa/arch-syscall.h b/sysdeps/unix/sysv/linux/hppa/arch-syscall.h
new file mode 100644
index 0000000000..db1cfd7cd6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/arch-syscall.h
@@ -0,0 +1,334 @@
+#define __NR__llseek 140
+#define __NR__newselect 142
+#define __NR__sysctl 149
+#define __NR_accept 35
+#define __NR_accept4 320
+#define __NR_access 33
+#define __NR_acct 51
+#define __NR_add_key 264
+#define __NR_adjtimex 124
+#define __NR_alarm 27
+#define __NR_bdflush 134
+#define __NR_bind 22
+#define __NR_bpf 341
+#define __NR_brk 45
+#define __NR_capget 106
+#define __NR_capset 107
+#define __NR_chdir 12
+#define __NR_chmod 15
+#define __NR_chown 180
+#define __NR_chroot 61
+#define __NR_clock_adjtime 324
+#define __NR_clock_getres 257
+#define __NR_clock_gettime 256
+#define __NR_clock_nanosleep 258
+#define __NR_clock_settime 255
+#define __NR_clone 120
+#define __NR_close 6
+#define __NR_connect 31
+#define __NR_copy_file_range 346
+#define __NR_creat 8
+#define __NR_delete_module 129
+#define __NR_dup 41
+#define __NR_dup2 63
+#define __NR_dup3 312
+#define __NR_epoll_create 224
+#define __NR_epoll_create1 311
+#define __NR_epoll_ctl 225
+#define __NR_epoll_pwait 297
+#define __NR_epoll_wait 226
+#define __NR_eventfd 304
+#define __NR_eventfd2 310
+#define __NR_execve 11
+#define __NR_execveat 342
+#define __NR_exit 1
+#define __NR_exit_group 222
+#define __NR_faccessat 287
+#define __NR_fadvise64_64 236
+#define __NR_fallocate 305
+#define __NR_fanotify_init 322
+#define __NR_fanotify_mark 323
+#define __NR_fchdir 133
+#define __NR_fchmod 94
+#define __NR_fchmodat 286
+#define __NR_fchown 95
+#define __NR_fchownat 278
+#define __NR_fcntl 55
+#define __NR_fcntl64 202
+#define __NR_fdatasync 148
+#define __NR_fgetxattr 243
+#define __NR_finit_module 333
+#define __NR_flistxattr 246
+#define __NR_flock 143
+#define __NR_fork 2
+#define __NR_fremovexattr 249
+#define __NR_fsetxattr 240
+#define __NR_fstat 28
+#define __NR_fstat64 112
+#define __NR_fstatat64 280
+#define __NR_fstatfs 100
+#define __NR_fstatfs64 299
+#define __NR_fsync 118
+#define __NR_ftruncate 93
+#define __NR_ftruncate64 200
+#define __NR_futex 210
+#define __NR_futimesat 279
+#define __NR_get_mempolicy 261
+#define __NR_get_robust_list 290
+#define __NR_getcpu 296
+#define __NR_getcwd 110
+#define __NR_getdents 141
+#define __NR_getdents64 201
+#define __NR_getegid 50
+#define __NR_geteuid 49
+#define __NR_getgid 47
+#define __NR_getgroups 80
+#define __NR_getitimer 105
+#define __NR_getpeername 53
+#define __NR_getpgid 132
+#define __NR_getpgrp 65
+#define __NR_getpid 20
+#define __NR_getppid 64
+#define __NR_getpriority 96
+#define __NR_getrandom 339
+#define __NR_getresgid 171
+#define __NR_getresuid 165
+#define __NR_getrlimit 76
+#define __NR_getrusage 77
+#define __NR_getsid 147
+#define __NR_getsockname 44
+#define __NR_getsockopt 182
+#define __NR_gettid 206
+#define __NR_gettimeofday 78
+#define __NR_getuid 24
+#define __NR_getxattr 241
+#define __NR_init_module 128
+#define __NR_inotify_add_watch 270
+#define __NR_inotify_init 269
+#define __NR_inotify_init1 314
+#define __NR_inotify_rm_watch 271
+#define __NR_io_cancel 219
+#define __NR_io_destroy 216
+#define __NR_io_getevents 217
+#define __NR_io_pgetevents 350
+#define __NR_io_setup 215
+#define __NR_io_submit 218
+#define __NR_ioctl 54
+#define __NR_ioprio_get 268
+#define __NR_ioprio_set 267
+#define __NR_kcmp 332
+#define __NR_kexec_load 300
+#define __NR_keyctl 266
+#define __NR_kill 37
+#define __NR_lchown 16
+#define __NR_lgetxattr 242
+#define __NR_link 9
+#define __NR_linkat 283
+#define __NR_listen 32
+#define __NR_listxattr 244
+#define __NR_llistxattr 245
+#define __NR_lookup_dcookie 223
+#define __NR_lremovexattr 248
+#define __NR_lseek 19
+#define __NR_lsetxattr 239
+#define __NR_lstat 84
+#define __NR_lstat64 198
+#define __NR_madvise 119
+#define __NR_mbind 260
+#define __NR_membarrier 343
+#define __NR_memfd_create 340
+#define __NR_migrate_pages 272
+#define __NR_mincore 72
+#define __NR_mkdir 39
+#define __NR_mkdirat 276
+#define __NR_mknod 14
+#define __NR_mknodat 277
+#define __NR_mlock 150
+#define __NR_mlock2 345
+#define __NR_mlockall 152
+#define __NR_mmap 90
+#define __NR_mmap2 89
+#define __NR_mount 21
+#define __NR_move_pages 295
+#define __NR_mprotect 125
+#define __NR_mq_getsetattr 234
+#define __NR_mq_notify 233
+#define __NR_mq_open 229
+#define __NR_mq_timedreceive 232
+#define __NR_mq_timedsend 231
+#define __NR_mq_unlink 230
+#define __NR_mremap 163
+#define __NR_msgctl 191
+#define __NR_msgget 190
+#define __NR_msgrcv 189
+#define __NR_msgsnd 188
+#define __NR_msync 144
+#define __NR_munlock 151
+#define __NR_munlockall 153
+#define __NR_munmap 91
+#define __NR_name_to_handle_at 325
+#define __NR_nanosleep 162
+#define __NR_nice 34
+#define __NR_open 5
+#define __NR_open_by_handle_at 326
+#define __NR_openat 275
+#define __NR_pause 29
+#define __NR_perf_event_open 318
+#define __NR_personality 136
+#define __NR_pipe 42
+#define __NR_pipe2 313
+#define __NR_pivot_root 67
+#define __NR_poll 168
+#define __NR_ppoll 274
+#define __NR_prctl 172
+#define __NR_pread64 108
+#define __NR_preadv 315
+#define __NR_preadv2 347
+#define __NR_prlimit64 321
+#define __NR_process_vm_readv 330
+#define __NR_process_vm_writev 331
+#define __NR_pselect6 273
+#define __NR_ptrace 26
+#define __NR_pwrite64 109
+#define __NR_pwritev 316
+#define __NR_pwritev2 348
+#define __NR_quotactl 131
+#define __NR_read 3
+#define __NR_readahead 207
+#define __NR_readlink 85
+#define __NR_readlinkat 285
+#define __NR_readv 145
+#define __NR_reboot 88
+#define __NR_recv 98
+#define __NR_recvfrom 123
+#define __NR_recvmmsg 319
+#define __NR_recvmsg 184
+#define __NR_remap_file_pages 227
+#define __NR_removexattr 247
+#define __NR_rename 38
+#define __NR_renameat 282
+#define __NR_renameat2 337
+#define __NR_request_key 265
+#define __NR_restart_syscall 0
+#define __NR_rmdir 40
+#define __NR_rt_sigaction 174
+#define __NR_rt_sigpending 176
+#define __NR_rt_sigprocmask 175
+#define __NR_rt_sigqueueinfo 178
+#define __NR_rt_sigreturn 173
+#define __NR_rt_sigsuspend 179
+#define __NR_rt_sigtimedwait 177
+#define __NR_rt_tgsigqueueinfo 317
+#define __NR_sched_get_priority_max 159
+#define __NR_sched_get_priority_min 160
+#define __NR_sched_getaffinity 212
+#define __NR_sched_getattr 335
+#define __NR_sched_getparam 155
+#define __NR_sched_getscheduler 157
+#define __NR_sched_rr_get_interval 161
+#define __NR_sched_setaffinity 211
+#define __NR_sched_setattr 334
+#define __NR_sched_setparam 154
+#define __NR_sched_setscheduler 156
+#define __NR_sched_yield 158
+#define __NR_seccomp 338
+#define __NR_semctl 187
+#define __NR_semget 186
+#define __NR_semop 185
+#define __NR_semtimedop 228
+#define __NR_send 58
+#define __NR_sendfile 122
+#define __NR_sendfile64 209
+#define __NR_sendmmsg 329
+#define __NR_sendmsg 183
+#define __NR_sendto 82
+#define __NR_set_mempolicy 262
+#define __NR_set_robust_list 289
+#define __NR_set_tid_address 237
+#define __NR_setdomainname 121
+#define __NR_setfsgid 139
+#define __NR_setfsuid 138
+#define __NR_setgid 46
+#define __NR_setgroups 81
+#define __NR_sethostname 74
+#define __NR_setitimer 104
+#define __NR_setns 328
+#define __NR_setpgid 57
+#define __NR_setpriority 97
+#define __NR_setregid 71
+#define __NR_setresgid 170
+#define __NR_setresuid 164
+#define __NR_setreuid 70
+#define __NR_setrlimit 75
+#define __NR_setsid 66
+#define __NR_setsockopt 181
+#define __NR_settimeofday 79
+#define __NR_setuid 23
+#define __NR_setxattr 238
+#define __NR_sgetmask 68
+#define __NR_shmat 192
+#define __NR_shmctl 195
+#define __NR_shmdt 193
+#define __NR_shmget 194
+#define __NR_shutdown 117
+#define __NR_sigaltstack 166
+#define __NR_signal 48
+#define __NR_signalfd 302
+#define __NR_signalfd4 309
+#define __NR_sigpending 73
+#define __NR_sigprocmask 126
+#define __NR_socket 17
+#define __NR_socketpair 56
+#define __NR_splice 291
+#define __NR_ssetmask 69
+#define __NR_stat 18
+#define __NR_stat64 101
+#define __NR_statfs 99
+#define __NR_statfs64 298
+#define __NR_statx 349
+#define __NR_stime 25
+#define __NR_swapoff 115
+#define __NR_swapon 87
+#define __NR_symlink 83
+#define __NR_symlinkat 284
+#define __NR_sync 36
+#define __NR_sync_file_range 292
+#define __NR_syncfs 327
+#define __NR_sysfs 135
+#define __NR_sysinfo 116
+#define __NR_syslog 103
+#define __NR_tee 293
+#define __NR_tgkill 259
+#define __NR_time 13
+#define __NR_timer_create 250
+#define __NR_timer_delete 254
+#define __NR_timer_getoverrun 253
+#define __NR_timer_gettime 252
+#define __NR_timer_settime 251
+#define __NR_timerfd_create 306
+#define __NR_timerfd_gettime 308
+#define __NR_timerfd_settime 307
+#define __NR_times 43
+#define __NR_tkill 208
+#define __NR_truncate 92
+#define __NR_truncate64 199
+#define __NR_umask 60
+#define __NR_umount2 52
+#define __NR_uname 59
+#define __NR_unlink 10
+#define __NR_unlinkat 281
+#define __NR_unshare 288
+#define __NR_uselib 86
+#define __NR_userfaultfd 344
+#define __NR_ustat 62
+#define __NR_utime 30
+#define __NR_utimensat 301
+#define __NR_utimes 336
+#define __NR_vfork 113
+#define __NR_vhangup 111
+#define __NR_vmsplice 294
+#define __NR_wait4 114
+#define __NR_waitid 235
+#define __NR_waitpid 7
+#define __NR_write 4
+#define __NR_writev 146
diff --git a/sysdeps/unix/sysv/linux/i386/arch-syscall.h b/sysdeps/unix/sysv/linux/i386/arch-syscall.h
new file mode 100644
index 0000000000..e5d68061da
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/i386/arch-syscall.h
@@ -0,0 +1,383 @@
+#define __NR__llseek 140
+#define __NR__newselect 142
+#define __NR__sysctl 149
+#define __NR_accept4 364
+#define __NR_access 33
+#define __NR_acct 51
+#define __NR_add_key 286
+#define __NR_adjtimex 124
+#define __NR_afs_syscall 137
+#define __NR_alarm 27
+#define __NR_arch_prctl 384
+#define __NR_bdflush 134
+#define __NR_bind 361
+#define __NR_bpf 357
+#define __NR_break 17
+#define __NR_brk 45
+#define __NR_capget 184
+#define __NR_capset 185
+#define __NR_chdir 12
+#define __NR_chmod 15
+#define __NR_chown 182
+#define __NR_chown32 212
+#define __NR_chroot 61
+#define __NR_clock_adjtime 343
+#define __NR_clock_getres 266
+#define __NR_clock_gettime 265
+#define __NR_clock_nanosleep 267
+#define __NR_clock_settime 264
+#define __NR_clone 120
+#define __NR_close 6
+#define __NR_connect 362
+#define __NR_copy_file_range 377
+#define __NR_creat 8
+#define __NR_create_module 127
+#define __NR_delete_module 129
+#define __NR_dup 41
+#define __NR_dup2 63
+#define __NR_dup3 330
+#define __NR_epoll_create 254
+#define __NR_epoll_create1 329
+#define __NR_epoll_ctl 255
+#define __NR_epoll_pwait 319
+#define __NR_epoll_wait 256
+#define __NR_eventfd 323
+#define __NR_eventfd2 328
+#define __NR_execve 11
+#define __NR_execveat 358
+#define __NR_exit 1
+#define __NR_exit_group 252
+#define __NR_faccessat 307
+#define __NR_fadvise64 250
+#define __NR_fadvise64_64 272
+#define __NR_fallocate 324
+#define __NR_fanotify_init 338
+#define __NR_fanotify_mark 339
+#define __NR_fchdir 133
+#define __NR_fchmod 94
+#define __NR_fchmodat 306
+#define __NR_fchown 95
+#define __NR_fchown32 207
+#define __NR_fchownat 298
+#define __NR_fcntl 55
+#define __NR_fcntl64 221
+#define __NR_fdatasync 148
+#define __NR_fgetxattr 231
+#define __NR_finit_module 350
+#define __NR_flistxattr 234
+#define __NR_flock 143
+#define __NR_fork 2
+#define __NR_fremovexattr 237
+#define __NR_fsetxattr 228
+#define __NR_fstat 108
+#define __NR_fstat64 197
+#define __NR_fstatat64 300
+#define __NR_fstatfs 100
+#define __NR_fstatfs64 269
+#define __NR_fsync 118
+#define __NR_ftime 35
+#define __NR_ftruncate 93
+#define __NR_ftruncate64 194
+#define __NR_futex 240
+#define __NR_futimesat 299
+#define __NR_get_kernel_syms 130
+#define __NR_get_mempolicy 275
+#define __NR_get_robust_list 312
+#define __NR_get_thread_area 244
+#define __NR_getcpu 318
+#define __NR_getcwd 183
+#define __NR_getdents 141
+#define __NR_getdents64 220
+#define __NR_getegid 50
+#define __NR_getegid32 202
+#define __NR_geteuid 49
+#define __NR_geteuid32 201
+#define __NR_getgid 47
+#define __NR_getgid32 200
+#define __NR_getgroups 80
+#define __NR_getgroups32 205
+#define __NR_getitimer 105
+#define __NR_getpeername 368
+#define __NR_getpgid 132
+#define __NR_getpgrp 65
+#define __NR_getpid 20
+#define __NR_getpmsg 188
+#define __NR_getppid 64
+#define __NR_getpriority 96
+#define __NR_getrandom 355
+#define __NR_getresgid 171
+#define __NR_getresgid32 211
+#define __NR_getresuid 165
+#define __NR_getresuid32 209
+#define __NR_getrlimit 76
+#define __NR_getrusage 77
+#define __NR_getsid 147
+#define __NR_getsockname 367
+#define __NR_getsockopt 365
+#define __NR_gettid 224
+#define __NR_gettimeofday 78
+#define __NR_getuid 24
+#define __NR_getuid32 199
+#define __NR_getxattr 229
+#define __NR_gtty 32
+#define __NR_idle 112
+#define __NR_init_module 128
+#define __NR_inotify_add_watch 292
+#define __NR_inotify_init 291
+#define __NR_inotify_init1 332
+#define __NR_inotify_rm_watch 293
+#define __NR_io_cancel 249
+#define __NR_io_destroy 246
+#define __NR_io_getevents 247
+#define __NR_io_pgetevents 385
+#define __NR_io_setup 245
+#define __NR_io_submit 248
+#define __NR_ioctl 54
+#define __NR_ioperm 101
+#define __NR_iopl 110
+#define __NR_ioprio_get 290
+#define __NR_ioprio_set 289
+#define __NR_ipc 117
+#define __NR_kcmp 349
+#define __NR_kexec_load 283
+#define __NR_keyctl 288
+#define __NR_kill 37
+#define __NR_lchown 16
+#define __NR_lchown32 198
+#define __NR_lgetxattr 230
+#define __NR_link 9
+#define __NR_linkat 303
+#define __NR_listen 363
+#define __NR_listxattr 232
+#define __NR_llistxattr 233
+#define __NR_lock 53
+#define __NR_lookup_dcookie 253
+#define __NR_lremovexattr 236
+#define __NR_lseek 19
+#define __NR_lsetxattr 227
+#define __NR_lstat 107
+#define __NR_lstat64 196
+#define __NR_madvise 219
+#define __NR_mbind 274
+#define __NR_membarrier 375
+#define __NR_memfd_create 356
+#define __NR_migrate_pages 294
+#define __NR_mincore 218
+#define __NR_mkdir 39
+#define __NR_mkdirat 296
+#define __NR_mknod 14
+#define __NR_mknodat 297
+#define __NR_mlock 150
+#define __NR_mlock2 376
+#define __NR_mlockall 152
+#define __NR_mmap 90
+#define __NR_mmap2 192
+#define __NR_modify_ldt 123
+#define __NR_mount 21
+#define __NR_move_pages 317
+#define __NR_mprotect 125
+#define __NR_mpx 56
+#define __NR_mq_getsetattr 282
+#define __NR_mq_notify 281
+#define __NR_mq_open 277
+#define __NR_mq_timedreceive 280
+#define __NR_mq_timedsend 279
+#define __NR_mq_unlink 278
+#define __NR_mremap 163
+#define __NR_msync 144
+#define __NR_munlock 151
+#define __NR_munlockall 153
+#define __NR_munmap 91
+#define __NR_name_to_handle_at 341
+#define __NR_nanosleep 162
+#define __NR_nfsservctl 169
+#define __NR_nice 34
+#define __NR_oldfstat 28
+#define __NR_oldlstat 84
+#define __NR_oldolduname 59
+#define __NR_oldstat 18
+#define __NR_olduname 109
+#define __NR_open 5
+#define __NR_open_by_handle_at 342
+#define __NR_openat 295
+#define __NR_pause 29
+#define __NR_perf_event_open 336
+#define __NR_personality 136
+#define __NR_pipe 42
+#define __NR_pipe2 331
+#define __NR_pivot_root 217
+#define __NR_pkey_alloc 381
+#define __NR_pkey_free 382
+#define __NR_pkey_mprotect 380
+#define __NR_poll 168
+#define __NR_ppoll 309
+#define __NR_prctl 172
+#define __NR_pread64 180
+#define __NR_preadv 333
+#define __NR_preadv2 378
+#define __NR_prlimit64 340
+#define __NR_process_vm_readv 347
+#define __NR_process_vm_writev 348
+#define __NR_prof 44
+#define __NR_profil 98
+#define __NR_pselect6 308
+#define __NR_ptrace 26
+#define __NR_putpmsg 189
+#define __NR_pwrite64 181
+#define __NR_pwritev 334
+#define __NR_pwritev2 379
+#define __NR_query_module 167
+#define __NR_quotactl 131
+#define __NR_read 3
+#define __NR_readahead 225
+#define __NR_readdir 89
+#define __NR_readlink 85
+#define __NR_readlinkat 305
+#define __NR_readv 145
+#define __NR_reboot 88
+#define __NR_recvfrom 371
+#define __NR_recvmmsg 337
+#define __NR_recvmsg 372
+#define __NR_remap_file_pages 257
+#define __NR_removexattr 235
+#define __NR_rename 38
+#define __NR_renameat 302
+#define __NR_renameat2 353
+#define __NR_request_key 287
+#define __NR_restart_syscall 0
+#define __NR_rmdir 40
+#define __NR_rseq 386
+#define __NR_rt_sigaction 174
+#define __NR_rt_sigpending 176
+#define __NR_rt_sigprocmask 175
+#define __NR_rt_sigqueueinfo 178
+#define __NR_rt_sigreturn 173
+#define __NR_rt_sigsuspend 179
+#define __NR_rt_sigtimedwait 177
+#define __NR_rt_tgsigqueueinfo 335
+#define __NR_sched_get_priority_max 159
+#define __NR_sched_get_priority_min 160
+#define __NR_sched_getaffinity 242
+#define __NR_sched_getattr 352
+#define __NR_sched_getparam 155
+#define __NR_sched_getscheduler 157
+#define __NR_sched_rr_get_interval 161
+#define __NR_sched_setaffinity 241
+#define __NR_sched_setattr 351
+#define __NR_sched_setparam 154
+#define __NR_sched_setscheduler 156
+#define __NR_sched_yield 158
+#define __NR_seccomp 354
+#define __NR_select 82
+#define __NR_sendfile 187
+#define __NR_sendfile64 239
+#define __NR_sendmmsg 345
+#define __NR_sendmsg 370
+#define __NR_sendto 369
+#define __NR_set_mempolicy 276
+#define __NR_set_robust_list 311
+#define __NR_set_thread_area 243
+#define __NR_set_tid_address 258
+#define __NR_setdomainname 121
+#define __NR_setfsgid 139
+#define __NR_setfsgid32 216
+#define __NR_setfsuid 138
+#define __NR_setfsuid32 215
+#define __NR_setgid 46
+#define __NR_setgid32 214
+#define __NR_setgroups 81
+#define __NR_setgroups32 206
+#define __NR_sethostname 74
+#define __NR_setitimer 104
+#define __NR_setns 346
+#define __NR_setpgid 57
+#define __NR_setpriority 97
+#define __NR_setregid 71
+#define __NR_setregid32 204
+#define __NR_setresgid 170
+#define __NR_setresgid32 210
+#define __NR_setresuid 164
+#define __NR_setresuid32 208
+#define __NR_setreuid 70
+#define __NR_setreuid32 203
+#define __NR_setrlimit 75
+#define __NR_setsid 66
+#define __NR_setsockopt 366
+#define __NR_settimeofday 79
+#define __NR_setuid 23
+#define __NR_setuid32 213
+#define __NR_setxattr 226
+#define __NR_sgetmask 68
+#define __NR_shutdown 373
+#define __NR_sigaction 67
+#define __NR_sigaltstack 186
+#define __NR_signal 48
+#define __NR_signalfd 321
+#define __NR_signalfd4 327
+#define __NR_sigpending 73
+#define __NR_sigprocmask 126
+#define __NR_sigreturn 119
+#define __NR_sigsuspend 72
+#define __NR_socket 359
+#define __NR_socketcall 102
+#define __NR_socketpair 360
+#define __NR_splice 313
+#define __NR_ssetmask 69
+#define __NR_stat 106
+#define __NR_stat64 195
+#define __NR_statfs 99
+#define __NR_statfs64 268
+#define __NR_statx 383
+#define __NR_stime 25
+#define __NR_stty 31
+#define __NR_swapoff 115
+#define __NR_swapon 87
+#define __NR_symlink 83
+#define __NR_symlinkat 304
+#define __NR_sync 36
+#define __NR_sync_file_range 314
+#define __NR_syncfs 344
+#define __NR_sysfs 135
+#define __NR_sysinfo 116
+#define __NR_syslog 103
+#define __NR_tee 315
+#define __NR_tgkill 270
+#define __NR_time 13
+#define __NR_timer_create 259
+#define __NR_timer_delete 263
+#define __NR_timer_getoverrun 262
+#define __NR_timer_gettime 261
+#define __NR_timer_settime 260
+#define __NR_timerfd_create 322
+#define __NR_timerfd_gettime 326
+#define __NR_timerfd_settime 325
+#define __NR_times 43
+#define __NR_tkill 238
+#define __NR_truncate 92
+#define __NR_truncate64 193
+#define __NR_ugetrlimit 191
+#define __NR_ulimit 58
+#define __NR_umask 60
+#define __NR_umount 22
+#define __NR_umount2 52
+#define __NR_uname 122
+#define __NR_unlink 10
+#define __NR_unlinkat 301
+#define __NR_unshare 310
+#define __NR_uselib 86
+#define __NR_userfaultfd 374
+#define __NR_ustat 62
+#define __NR_utime 30
+#define __NR_utimensat 320
+#define __NR_utimes 271
+#define __NR_vfork 190
+#define __NR_vhangup 111
+#define __NR_vm86 166
+#define __NR_vm86old 113
+#define __NR_vmsplice 316
+#define __NR_vserver 273
+#define __NR_wait4 114
+#define __NR_waitid 284
+#define __NR_waitpid 7
+#define __NR_write 4
+#define __NR_writev 146
diff --git a/sysdeps/unix/sysv/linux/ia64/arch-syscall.h b/sysdeps/unix/sysv/linux/ia64/arch-syscall.h
new file mode 100644
index 0000000000..0481b89180
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/ia64/arch-syscall.h
@@ -0,0 +1,320 @@
+#define __NR__sysctl 1150
+#define __NR_accept 1194
+#define __NR_accept4 1334
+#define __NR_access 1049
+#define __NR_acct 1064
+#define __NR_add_key 1271
+#define __NR_adjtimex 1131
+#define __NR_afs_syscall 1141
+#define __NR_bdflush 1138
+#define __NR_bind 1191
+#define __NR_bpf 1341
+#define __NR_brk 1060
+#define __NR_capget 1185
+#define __NR_capset 1186
+#define __NR_chdir 1034
+#define __NR_chmod 1038
+#define __NR_chown 1039
+#define __NR_chroot 1068
+#define __NR_clock_adjtime 1328
+#define __NR_clock_getres 1255
+#define __NR_clock_gettime 1254
+#define __NR_clock_nanosleep 1256
+#define __NR_clock_settime 1253
+#define __NR_clone 1128
+#define __NR_clone2 1213
+#define __NR_close 1029
+#define __NR_connect 1192
+#define __NR_copy_file_range 1347
+#define __NR_creat 1030
+#define __NR_delete_module 1134
+#define __NR_dup 1057
+#define __NR_dup2 1070
+#define __NR_dup3 1316
+#define __NR_epoll_create 1243
+#define __NR_epoll_create1 1315
+#define __NR_epoll_ctl 1244
+#define __NR_epoll_pwait 1305
+#define __NR_epoll_wait 1245
+#define __NR_eventfd 1309
+#define __NR_eventfd2 1314
+#define __NR_execve 1033
+#define __NR_execveat 1342
+#define __NR_exit 1025
+#define __NR_exit_group 1236
+#define __NR_faccessat 1293
+#define __NR_fadvise64 1234
+#define __NR_fallocate 1303
+#define __NR_fanotify_init 1323
+#define __NR_fanotify_mark 1324
+#define __NR_fchdir 1035
+#define __NR_fchmod 1099
+#define __NR_fchmodat 1292
+#define __NR_fchown 1100
+#define __NR_fchownat 1284
+#define __NR_fcntl 1066
+#define __NR_fdatasync 1052
+#define __NR_fgetxattr 1222
+#define __NR_finit_module 1335
+#define __NR_flistxattr 1225
+#define __NR_flock 1145
+#define __NR_fremovexattr 1228
+#define __NR_fsetxattr 1219
+#define __NR_fstat 1212
+#define __NR_fstatfs 1104
+#define __NR_fstatfs64 1257
+#define __NR_fsync 1051
+#define __NR_ftruncate 1098
+#define __NR_futex 1230
+#define __NR_futimesat 1285
+#define __NR_get_mempolicy 1260
+#define __NR_get_robust_list 1299
+#define __NR_getcpu 1304
+#define __NR_getcwd 1184
+#define __NR_getdents 1144
+#define __NR_getdents64 1214
+#define __NR_getegid 1063
+#define __NR_geteuid 1047
+#define __NR_getgid 1062
+#define __NR_getgroups 1077
+#define __NR_getitimer 1119
+#define __NR_getpeername 1196
+#define __NR_getpgid 1079
+#define __NR_getpid 1041
+#define __NR_getpmsg 1188
+#define __NR_getppid 1042
+#define __NR_getpriority 1101
+#define __NR_getrandom 1339
+#define __NR_getresgid 1075
+#define __NR_getresuid 1073
+#define __NR_getrlimit 1085
+#define __NR_getrusage 1086
+#define __NR_getsid 1082
+#define __NR_getsockname 1195
+#define __NR_getsockopt 1204
+#define __NR_gettid 1105
+#define __NR_gettimeofday 1087
+#define __NR_getuid 1046
+#define __NR_getunwind 1215
+#define __NR_getxattr 1220
+#define __NR_init_module 1133
+#define __NR_inotify_add_watch 1278
+#define __NR_inotify_init 1277
+#define __NR_inotify_init1 1318
+#define __NR_inotify_rm_watch 1279
+#define __NR_io_cancel 1242
+#define __NR_io_destroy 1239
+#define __NR_io_getevents 1240
+#define __NR_io_setup 1238
+#define __NR_io_submit 1241
+#define __NR_ioctl 1065
+#define __NR_ioprio_get 1275
+#define __NR_ioprio_set 1274
+#define __NR_kcmp 1345
+#define __NR_kexec_load 1268
+#define __NR_keyctl 1273
+#define __NR_kill 1053
+#define __NR_lchown 1124
+#define __NR_lgetxattr 1221
+#define __NR_link 1031
+#define __NR_linkat 1289
+#define __NR_listen 1193
+#define __NR_listxattr 1223
+#define __NR_llistxattr 1224
+#define __NR_lookup_dcookie 1237
+#define __NR_lremovexattr 1227
+#define __NR_lseek 1040
+#define __NR_lsetxattr 1218
+#define __NR_lstat 1211
+#define __NR_madvise 1209
+#define __NR_mbind 1259
+#define __NR_membarrier 1344
+#define __NR_memfd_create 1340
+#define __NR_migrate_pages 1280
+#define __NR_mincore 1208
+#define __NR_mkdir 1055
+#define __NR_mkdirat 1282
+#define __NR_mknod 1037
+#define __NR_mknodat 1283
+#define __NR_mlock 1153
+#define __NR_mlock2 1346
+#define __NR_mlockall 1154
+#define __NR_mmap 1151
+#define __NR_mmap2 1172
+#define __NR_mount 1043
+#define __NR_move_pages 1276
+#define __NR_mprotect 1155
+#define __NR_mq_getsetattr 1267
+#define __NR_mq_notify 1266
+#define __NR_mq_open 1262
+#define __NR_mq_timedreceive 1265
+#define __NR_mq_timedsend 1264
+#define __NR_mq_unlink 1263
+#define __NR_mremap 1156
+#define __NR_msgctl 1112
+#define __NR_msgget 1109
+#define __NR_msgrcv 1111
+#define __NR_msgsnd 1110
+#define __NR_msync 1157
+#define __NR_munlock 1158
+#define __NR_munlockall 1159
+#define __NR_munmap 1152
+#define __NR_name_to_handle_at 1326
+#define __NR_nanosleep 1168
+#define __NR_newfstatat 1286
+#define __NR_nfsservctl 1169
+#define __NR_ni_syscall 1024
+#define __NR_old_getpagesize 1171
+#define __NR_open 1028
+#define __NR_open_by_handle_at 1327
+#define __NR_openat 1281
+#define __NR_pciconfig_read 1173
+#define __NR_pciconfig_write 1174
+#define __NR_perfmonctl 1175
+#define __NR_personality 1140
+#define __NR_pipe 1058
+#define __NR_pipe2 1317
+#define __NR_pivot_root 1207
+#define __NR_poll 1090
+#define __NR_ppoll 1295
+#define __NR_prctl 1170
+#define __NR_pread64 1148
+#define __NR_preadv 1319
+#define __NR_preadv2 1348
+#define __NR_prlimit64 1325
+#define __NR_process_vm_readv 1332
+#define __NR_process_vm_writev 1333
+#define __NR_pselect6 1294
+#define __NR_ptrace 1048
+#define __NR_putpmsg 1189
+#define __NR_pwrite64 1149
+#define __NR_pwritev 1320
+#define __NR_pwritev2 1349
+#define __NR_quotactl 1137
+#define __NR_read 1026
+#define __NR_readahead 1216
+#define __NR_readlink 1092
+#define __NR_readlinkat 1291
+#define __NR_readv 1146
+#define __NR_reboot 1096
+#define __NR_recv 1200
+#define __NR_recvfrom 1201
+#define __NR_recvmmsg 1322
+#define __NR_recvmsg 1206
+#define __NR_remap_file_pages 1125
+#define __NR_removexattr 1226
+#define __NR_rename 1054
+#define __NR_renameat 1288
+#define __NR_renameat2 1338
+#define __NR_request_key 1272
+#define __NR_restart_syscall 1246
+#define __NR_rmdir 1056
+#define __NR_rt_sigaction 1177
+#define __NR_rt_sigpending 1178
+#define __NR_rt_sigprocmask 1179
+#define __NR_rt_sigqueueinfo 1180
+#define __NR_rt_sigreturn 1181
+#define __NR_rt_sigsuspend 1182
+#define __NR_rt_sigtimedwait 1183
+#define __NR_rt_tgsigqueueinfo 1321
+#define __NR_sched_get_priority_max 1165
+#define __NR_sched_get_priority_min 1166
+#define __NR_sched_getaffinity 1232
+#define __NR_sched_getattr 1337
+#define __NR_sched_getparam 1160
+#define __NR_sched_getscheduler 1162
+#define __NR_sched_rr_get_interval 1167
+#define __NR_sched_setaffinity 1231
+#define __NR_sched_setattr 1336
+#define __NR_sched_setparam 1161
+#define __NR_sched_setscheduler 1163
+#define __NR_sched_yield 1164
+#define __NR_select 1089
+#define __NR_semctl 1108
+#define __NR_semget 1106
+#define __NR_semop 1107
+#define __NR_semtimedop 1247
+#define __NR_send 1198
+#define __NR_sendfile 1187
+#define __NR_sendmmsg 1331
+#define __NR_sendmsg 1205
+#define __NR_sendto 1199
+#define __NR_set_mempolicy 1261
+#define __NR_set_robust_list 1298
+#define __NR_set_tid_address 1233
+#define __NR_setdomainname 1129
+#define __NR_setfsgid 1143
+#define __NR_setfsuid 1142
+#define __NR_setgid 1061
+#define __NR_setgroups 1078
+#define __NR_sethostname 1083
+#define __NR_setitimer 1118
+#define __NR_setns 1330
+#define __NR_setpgid 1080
+#define __NR_setpriority 1102
+#define __NR_setregid 1072
+#define __NR_setresgid 1076
+#define __NR_setresuid 1074
+#define __NR_setreuid 1071
+#define __NR_setrlimit 1084
+#define __NR_setsid 1081
+#define __NR_setsockopt 1203
+#define __NR_settimeofday 1088
+#define __NR_setuid 1045
+#define __NR_setxattr 1217
+#define __NR_shmat 1114
+#define __NR_shmctl 1116
+#define __NR_shmdt 1115
+#define __NR_shmget 1113
+#define __NR_shutdown 1202
+#define __NR_sigaltstack 1176
+#define __NR_signalfd 1307
+#define __NR_signalfd4 1313
+#define __NR_socket 1190
+#define __NR_socketpair 1197
+#define __NR_splice 1297
+#define __NR_stat 1210
+#define __NR_statfs 1103
+#define __NR_statfs64 1258
+#define __NR_swapoff 1095
+#define __NR_swapon 1094
+#define __NR_symlink 1091
+#define __NR_symlinkat 1290
+#define __NR_sync 1050
+#define __NR_sync_file_range 1300
+#define __NR_syncfs 1329
+#define __NR_sysfs 1139
+#define __NR_sysinfo 1127
+#define __NR_syslog 1117
+#define __NR_tee 1301
+#define __NR_tgkill 1235
+#define __NR_timer_create 1248
+#define __NR_timer_delete 1252
+#define __NR_timer_getoverrun 1251
+#define __NR_timer_gettime 1250
+#define __NR_timer_settime 1249
+#define __NR_timerfd 1308
+#define __NR_timerfd_create 1310
+#define __NR_timerfd_gettime 1312
+#define __NR_timerfd_settime 1311
+#define __NR_times 1059
+#define __NR_tkill 1229
+#define __NR_truncate 1097
+#define __NR_umask 1067
+#define __NR_umount 1044
+#define __NR_uname 1130
+#define __NR_unlink 1032
+#define __NR_unlinkat 1287
+#define __NR_unshare 1296
+#define __NR_uselib 1093
+#define __NR_userfaultfd 1343
+#define __NR_ustat 1069
+#define __NR_utimensat 1306
+#define __NR_utimes 1036
+#define __NR_vhangup 1123
+#define __NR_vmsplice 1302
+#define __NR_vserver 1269
+#define __NR_wait4 1126
+#define __NR_waitid 1270
+#define __NR_write 1027
+#define __NR_writev 1147
diff --git a/sysdeps/unix/sysv/linux/m68k/arch-syscall.h b/sysdeps/unix/sysv/linux/m68k/arch-syscall.h
new file mode 100644
index 0000000000..f38c9578bd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/arch-syscall.h
@@ -0,0 +1,361 @@
+#define __NR__llseek 140
+#define __NR__newselect 142
+#define __NR__sysctl 149
+#define __NR_accept4 361
+#define __NR_access 33
+#define __NR_acct 51
+#define __NR_add_key 279
+#define __NR_adjtimex 124
+#define __NR_alarm 27
+#define __NR_atomic_barrier 336
+#define __NR_atomic_cmpxchg_32 335
+#define __NR_bdflush 134
+#define __NR_bind 358
+#define __NR_bpf 354
+#define __NR_brk 45
+#define __NR_cacheflush 123
+#define __NR_capget 184
+#define __NR_capset 185
+#define __NR_chdir 12
+#define __NR_chmod 15
+#define __NR_chown 16
+#define __NR_chown32 198
+#define __NR_chroot 61
+#define __NR_clock_adjtime 342
+#define __NR_clock_getres 261
+#define __NR_clock_gettime 260
+#define __NR_clock_nanosleep 262
+#define __NR_clock_settime 259
+#define __NR_clone 120
+#define __NR_close 6
+#define __NR_connect 359
+#define __NR_copy_file_range 376
+#define __NR_creat 8
+#define __NR_create_module 127
+#define __NR_delete_module 129
+#define __NR_dup 41
+#define __NR_dup2 63
+#define __NR_dup3 326
+#define __NR_epoll_create 249
+#define __NR_epoll_create1 325
+#define __NR_epoll_ctl 250
+#define __NR_epoll_pwait 315
+#define __NR_epoll_wait 251
+#define __NR_eventfd 319
+#define __NR_eventfd2 324
+#define __NR_execve 11
+#define __NR_execveat 355
+#define __NR_exit 1
+#define __NR_exit_group 247
+#define __NR_faccessat 300
+#define __NR_fadvise64 246
+#define __NR_fadvise64_64 267
+#define __NR_fallocate 320
+#define __NR_fanotify_init 337
+#define __NR_fanotify_mark 338
+#define __NR_fchdir 133
+#define __NR_fchmod 94
+#define __NR_fchmodat 299
+#define __NR_fchown 95
+#define __NR_fchown32 207
+#define __NR_fchownat 291
+#define __NR_fcntl 55
+#define __NR_fcntl64 239
+#define __NR_fdatasync 148
+#define __NR_fgetxattr 228
+#define __NR_finit_module 348
+#define __NR_flistxattr 231
+#define __NR_flock 143
+#define __NR_fork 2
+#define __NR_fremovexattr 234
+#define __NR_fsetxattr 225
+#define __NR_fstat 108
+#define __NR_fstat64 197
+#define __NR_fstatat64 293
+#define __NR_fstatfs 100
+#define __NR_fstatfs64 264
+#define __NR_fsync 118
+#define __NR_ftruncate 93
+#define __NR_ftruncate64 194
+#define __NR_futex 235
+#define __NR_futimesat 292
+#define __NR_get_kernel_syms 130
+#define __NR_get_mempolicy 269
+#define __NR_get_robust_list 305
+#define __NR_get_thread_area 333
+#define __NR_getcpu 314
+#define __NR_getcwd 183
+#define __NR_getdents 141
+#define __NR_getdents64 220
+#define __NR_getegid 50
+#define __NR_getegid32 202
+#define __NR_geteuid 49
+#define __NR_geteuid32 201
+#define __NR_getgid 47
+#define __NR_getgid32 200
+#define __NR_getgroups 80
+#define __NR_getgroups32 205
+#define __NR_getitimer 105
+#define __NR_getpagesize 166
+#define __NR_getpeername 365
+#define __NR_getpgid 132
+#define __NR_getpgrp 65
+#define __NR_getpid 20
+#define __NR_getpmsg 188
+#define __NR_getppid 64
+#define __NR_getpriority 96
+#define __NR_getrandom 352
+#define __NR_getresgid 171
+#define __NR_getresgid32 211
+#define __NR_getresuid 165
+#define __NR_getresuid32 209
+#define __NR_getrlimit 76
+#define __NR_getrusage 77
+#define __NR_getsid 147
+#define __NR_getsockname 364
+#define __NR_getsockopt 362
+#define __NR_gettid 221
+#define __NR_gettimeofday 78
+#define __NR_getuid 24
+#define __NR_getuid32 199
+#define __NR_getxattr 226
+#define __NR_init_module 128
+#define __NR_inotify_add_watch 285
+#define __NR_inotify_init 284
+#define __NR_inotify_init1 328
+#define __NR_inotify_rm_watch 286
+#define __NR_io_cancel 245
+#define __NR_io_destroy 242
+#define __NR_io_getevents 243
+#define __NR_io_setup 241
+#define __NR_io_submit 244
+#define __NR_ioctl 54
+#define __NR_ioprio_get 283
+#define __NR_ioprio_set 282
+#define __NR_ipc 117
+#define __NR_kcmp 347
+#define __NR_kexec_load 313
+#define __NR_keyctl 281
+#define __NR_kill 37
+#define __NR_lchown 182
+#define __NR_lchown32 212
+#define __NR_lgetxattr 227
+#define __NR_link 9
+#define __NR_linkat 296
+#define __NR_listen 360
+#define __NR_listxattr 229
+#define __NR_llistxattr 230
+#define __NR_lookup_dcookie 248
+#define __NR_lremovexattr 233
+#define __NR_lseek 19
+#define __NR_lsetxattr 224
+#define __NR_lstat 107
+#define __NR_lstat64 196
+#define __NR_madvise 238
+#define __NR_mbind 268
+#define __NR_membarrier 374
+#define __NR_memfd_create 353
+#define __NR_migrate_pages 287
+#define __NR_mincore 237
+#define __NR_mkdir 39
+#define __NR_mkdirat 289
+#define __NR_mknod 14
+#define __NR_mknodat 290
+#define __NR_mlock 150
+#define __NR_mlock2 375
+#define __NR_mlockall 152
+#define __NR_mmap 90
+#define __NR_mmap2 192
+#define __NR_mount 21
+#define __NR_move_pages 310
+#define __NR_mprotect 125
+#define __NR_mq_getsetattr 276
+#define __NR_mq_notify 275
+#define __NR_mq_open 271
+#define __NR_mq_timedreceive 274
+#define __NR_mq_timedsend 273
+#define __NR_mq_unlink 272
+#define __NR_mremap 163
+#define __NR_msync 144
+#define __NR_munlock 151
+#define __NR_munlockall 153
+#define __NR_munmap 91
+#define __NR_name_to_handle_at 340
+#define __NR_nanosleep 162
+#define __NR_nfsservctl 169
+#define __NR_nice 34
+#define __NR_oldfstat 28
+#define __NR_oldlstat 84
+#define __NR_oldstat 18
+#define __NR_open 5
+#define __NR_open_by_handle_at 341
+#define __NR_openat 288
+#define __NR_pause 29
+#define __NR_perf_event_open 332
+#define __NR_personality 136
+#define __NR_pipe 42
+#define __NR_pipe2 327
+#define __NR_pivot_root 217
+#define __NR_poll 168
+#define __NR_ppoll 302
+#define __NR_prctl 172
+#define __NR_pread64 180
+#define __NR_preadv 329
+#define __NR_preadv2 377
+#define __NR_prlimit64 339
+#define __NR_process_vm_readv 345
+#define __NR_process_vm_writev 346
+#define __NR_pselect6 301
+#define __NR_ptrace 26
+#define __NR_putpmsg 189
+#define __NR_pwrite64 181
+#define __NR_pwritev 330
+#define __NR_pwritev2 378
+#define __NR_query_module 167
+#define __NR_quotactl 131
+#define __NR_read 3
+#define __NR_readahead 240
+#define __NR_readdir 89
+#define __NR_readlink 85
+#define __NR_readlinkat 298
+#define __NR_readv 145
+#define __NR_reboot 88
+#define __NR_recvfrom 368
+#define __NR_recvmmsg 371
+#define __NR_recvmsg 369
+#define __NR_remap_file_pages 252
+#define __NR_removexattr 232
+#define __NR_rename 38
+#define __NR_renameat 295
+#define __NR_renameat2 351
+#define __NR_request_key 280
+#define __NR_restart_syscall 0
+#define __NR_rmdir 40
+#define __NR_rt_sigaction 174
+#define __NR_rt_sigpending 176
+#define __NR_rt_sigprocmask 175
+#define __NR_rt_sigqueueinfo 178
+#define __NR_rt_sigreturn 173
+#define __NR_rt_sigsuspend 179
+#define __NR_rt_sigtimedwait 177
+#define __NR_rt_tgsigqueueinfo 331
+#define __NR_sched_get_priority_max 159
+#define __NR_sched_get_priority_min 160
+#define __NR_sched_getaffinity 312
+#define __NR_sched_getattr 350
+#define __NR_sched_getparam 155
+#define __NR_sched_getscheduler 157
+#define __NR_sched_rr_get_interval 161
+#define __NR_sched_setaffinity 311
+#define __NR_sched_setattr 349
+#define __NR_sched_setparam 154
+#define __NR_sched_setscheduler 156
+#define __NR_sched_yield 158
+#define __NR_select 82
+#define __NR_sendfile 187
+#define __NR_sendfile64 236
+#define __NR_sendmmsg 372
+#define __NR_sendmsg 367
+#define __NR_sendto 366
+#define __NR_set_mempolicy 270
+#define __NR_set_robust_list 304
+#define __NR_set_thread_area 334
+#define __NR_set_tid_address 253
+#define __NR_setdomainname 121
+#define __NR_setfsgid 139
+#define __NR_setfsgid32 216
+#define __NR_setfsuid 138
+#define __NR_setfsuid32 215
+#define __NR_setgid 46
+#define __NR_setgid32 214
+#define __NR_setgroups 81
+#define __NR_setgroups32 206
+#define __NR_sethostname 74
+#define __NR_setitimer 104
+#define __NR_setns 344
+#define __NR_setpgid 57
+#define __NR_setpriority 97
+#define __NR_setregid 71
+#define __NR_setregid32 204
+#define __NR_setresgid 170
+#define __NR_setresgid32 210
+#define __NR_setresuid 164
+#define __NR_setresuid32 208
+#define __NR_setreuid 70
+#define __NR_setreuid32 203
+#define __NR_setrlimit 75
+#define __NR_setsid 66
+#define __NR_setsockopt 363
+#define __NR_settimeofday 79
+#define __NR_setuid 23
+#define __NR_setuid32 213
+#define __NR_setxattr 223
+#define __NR_sgetmask 68
+#define __NR_shutdown 370
+#define __NR_sigaction 67
+#define __NR_sigaltstack 186
+#define __NR_signal 48
+#define __NR_signalfd 317
+#define __NR_signalfd4 323
+#define __NR_sigpending 73
+#define __NR_sigprocmask 126
+#define __NR_sigreturn 119
+#define __NR_sigsuspend 72
+#define __NR_socket 356
+#define __NR_socketcall 102
+#define __NR_socketpair 357
+#define __NR_splice 306
+#define __NR_ssetmask 69
+#define __NR_stat 106
+#define __NR_stat64 195
+#define __NR_statfs 99
+#define __NR_statfs64 263
+#define __NR_statx 379
+#define __NR_stime 25
+#define __NR_swapoff 115
+#define __NR_swapon 87
+#define __NR_symlink 83
+#define __NR_symlinkat 297
+#define __NR_sync 36
+#define __NR_sync_file_range 307
+#define __NR_syncfs 343
+#define __NR_sysfs 135
+#define __NR_sysinfo 116
+#define __NR_syslog 103
+#define __NR_tee 308
+#define __NR_tgkill 265
+#define __NR_time 13
+#define __NR_timer_create 254
+#define __NR_timer_delete 258
+#define __NR_timer_getoverrun 257
+#define __NR_timer_gettime 256
+#define __NR_timer_settime 255
+#define __NR_timerfd_create 318
+#define __NR_timerfd_gettime 322
+#define __NR_timerfd_settime 321
+#define __NR_times 43
+#define __NR_tkill 222
+#define __NR_truncate 92
+#define __NR_truncate64 193
+#define __NR_ugetrlimit 191
+#define __NR_umask 60
+#define __NR_umount 22
+#define __NR_umount2 52
+#define __NR_uname 122
+#define __NR_unlink 10
+#define __NR_unlinkat 294
+#define __NR_unshare 303
+#define __NR_uselib 86
+#define __NR_userfaultfd 373
+#define __NR_ustat 62
+#define __NR_utime 30
+#define __NR_utimensat 316
+#define __NR_utimes 266
+#define __NR_vfork 190
+#define __NR_vhangup 111
+#define __NR_vmsplice 309
+#define __NR_wait4 114
+#define __NR_waitid 277
+#define __NR_waitpid 7
+#define __NR_write 4
+#define __NR_writev 146
diff --git a/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h b/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h
new file mode 100644
index 0000000000..786898cfac
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h
@@ -0,0 +1,397 @@
+#define __NR__llseek 140
+#define __NR__newselect 142
+#define __NR__sysctl 149
+#define __NR_accept 349
+#define __NR_accept4 362
+#define __NR_access 33
+#define __NR_acct 51
+#define __NR_add_key 286
+#define __NR_adjtimex 124
+#define __NR_afs_syscall 137
+#define __NR_alarm 27
+#define __NR_bdflush 134
+#define __NR_bind 347
+#define __NR_bpf 387
+#define __NR_break 17
+#define __NR_brk 45
+#define __NR_capget 184
+#define __NR_capset 185
+#define __NR_chdir 12
+#define __NR_chmod 15
+#define __NR_chown 182
+#define __NR_chown32 212
+#define __NR_chroot 61
+#define __NR_clock_adjtime 373
+#define __NR_clock_getres 266
+#define __NR_clock_gettime 265
+#define __NR_clock_nanosleep 267
+#define __NR_clock_settime 264
+#define __NR_clone 120
+#define __NR_close 6
+#define __NR_connect 350
+#define __NR_copy_file_range 392
+#define __NR_creat 8
+#define __NR_create_module 127
+#define __NR_delete_module 129
+#define __NR_dup 41
+#define __NR_dup2 63
+#define __NR_dup3 342
+#define __NR_epoll_create 254
+#define __NR_epoll_create1 341
+#define __NR_epoll_ctl 255
+#define __NR_epoll_pwait 319
+#define __NR_epoll_wait 256
+#define __NR_eventfd 323
+#define __NR_eventfd2 340
+#define __NR_execve 11
+#define __NR_execveat 388
+#define __NR_exit 1
+#define __NR_exit_group 252
+#define __NR_faccessat 307
+#define __NR_fadvise64 250
+#define __NR_fadvise64_64 272
+#define __NR_fallocate 324
+#define __NR_fanotify_init 368
+#define __NR_fanotify_mark 369
+#define __NR_fchdir 133
+#define __NR_fchmod 94
+#define __NR_fchmodat 306
+#define __NR_fchown 95
+#define __NR_fchown32 207
+#define __NR_fchownat 298
+#define __NR_fcntl 55
+#define __NR_fcntl64 221
+#define __NR_fdatasync 148
+#define __NR_fgetxattr 231
+#define __NR_finit_module 380
+#define __NR_flistxattr 234
+#define __NR_flock 143
+#define __NR_fork 2
+#define __NR_fremovexattr 237
+#define __NR_fsetxattr 228
+#define __NR_fstat 108
+#define __NR_fstat64 197
+#define __NR_fstatat64 300
+#define __NR_fstatfs 100
+#define __NR_fstatfs64 269
+#define __NR_fsync 118
+#define __NR_ftime 35
+#define __NR_ftruncate 93
+#define __NR_ftruncate64 194
+#define __NR_futex 240
+#define __NR_futimesat 299
+#define __NR_get_kernel_syms 130
+#define __NR_get_mempolicy 275
+#define __NR_get_robust_list 312
+#define __NR_get_thread_area 244
+#define __NR_getcpu 318
+#define __NR_getcwd 183
+#define __NR_getdents 141
+#define __NR_getdents64 220
+#define __NR_getegid 50
+#define __NR_getegid32 202
+#define __NR_geteuid 49
+#define __NR_geteuid32 201
+#define __NR_getgid 47
+#define __NR_getgid32 200
+#define __NR_getgroups 80
+#define __NR_getgroups32 205
+#define __NR_getitimer 105
+#define __NR_getpeername 352
+#define __NR_getpgid 132
+#define __NR_getpgrp 65
+#define __NR_getpid 20
+#define __NR_getpmsg 188
+#define __NR_getppid 64
+#define __NR_getpriority 96
+#define __NR_getrandom 385
+#define __NR_getresgid 171
+#define __NR_getresgid32 211
+#define __NR_getresuid 165
+#define __NR_getresuid32 209
+#define __NR_getrlimit 76
+#define __NR_getrusage 77
+#define __NR_getsid 147
+#define __NR_getsockname 351
+#define __NR_getsockopt 358
+#define __NR_gettid 224
+#define __NR_gettimeofday 78
+#define __NR_getuid 24
+#define __NR_getuid32 199
+#define __NR_getxattr 229
+#define __NR_gtty 32
+#define __NR_idle 112
+#define __NR_init_module 128
+#define __NR_inotify_add_watch 292
+#define __NR_inotify_init 291
+#define __NR_inotify_init1 344
+#define __NR_inotify_rm_watch 293
+#define __NR_io_cancel 249
+#define __NR_io_destroy 246
+#define __NR_io_getevents 247
+#define __NR_io_pgetevents 399
+#define __NR_io_setup 245
+#define __NR_io_submit 248
+#define __NR_ioctl 54
+#define __NR_ioperm 101
+#define __NR_iopl 110
+#define __NR_ioprio_get 290
+#define __NR_ioprio_set 289
+#define __NR_ipc 117
+#define __NR_kcmp 379
+#define __NR_kexec_load 283
+#define __NR_keyctl 288
+#define __NR_kill 37
+#define __NR_lchown 16
+#define __NR_lchown32 198
+#define __NR_lgetxattr 230
+#define __NR_link 9
+#define __NR_linkat 303
+#define __NR_listen 348
+#define __NR_listxattr 232
+#define __NR_llistxattr 233
+#define __NR_lock 53
+#define __NR_lookup_dcookie 253
+#define __NR_lremovexattr 236
+#define __NR_lseek 19
+#define __NR_lsetxattr 227
+#define __NR_lstat 107
+#define __NR_lstat64 196
+#define __NR_madvise 219
+#define __NR_mbind 274
+#define __NR_membarrier 390
+#define __NR_memfd_create 386
+#define __NR_migrate_pages 294
+#define __NR_mincore 218
+#define __NR_mkdir 39
+#define __NR_mkdirat 296
+#define __NR_mknod 14
+#define __NR_mknodat 297
+#define __NR_mlock 150
+#define __NR_mlock2 391
+#define __NR_mlockall 152
+#define __NR_mmap 90
+#define __NR_mmap2 192
+#define __NR_modify_ldt 123
+#define __NR_mount 21
+#define __NR_move_pages 317
+#define __NR_mprotect 125
+#define __NR_mpx 56
+#define __NR_mq_getsetattr 282
+#define __NR_mq_notify 281
+#define __NR_mq_open 277
+#define __NR_mq_timedreceive 280
+#define __NR_mq_timedsend 279
+#define __NR_mq_unlink 278
+#define __NR_mremap 163
+#define __NR_msgctl 331
+#define __NR_msgget 332
+#define __NR_msgrcv 333
+#define __NR_msgsnd 334
+#define __NR_msync 144
+#define __NR_munlock 151
+#define __NR_munlockall 153
+#define __NR_munmap 91
+#define __NR_name_to_handle_at 371
+#define __NR_nanosleep 162
+#define __NR_nfsservctl 169
+#define __NR_nice 34
+#define __NR_oldfstat 28
+#define __NR_oldlstat 84
+#define __NR_oldolduname 59
+#define __NR_oldstat 18
+#define __NR_olduname 109
+#define __NR_open 5
+#define __NR_open_by_handle_at 372
+#define __NR_openat 295
+#define __NR_pause 29
+#define __NR_perf_event_open 366
+#define __NR_personality 136
+#define __NR_pipe 42
+#define __NR_pipe2 343
+#define __NR_pivot_root 217
+#define __NR_pkey_alloc 396
+#define __NR_pkey_free 397
+#define __NR_pkey_mprotect 395
+#define __NR_poll 168
+#define __NR_ppoll 309
+#define __NR_prctl 172
+#define __NR_pread64 180
+#define __NR_preadv 363
+#define __NR_preadv2 393
+#define __NR_prlimit64 370
+#define __NR_process_vm_readv 377
+#define __NR_process_vm_writev 378
+#define __NR_prof 44
+#define __NR_profil 98
+#define __NR_pselect6 308
+#define __NR_ptrace 26
+#define __NR_putpmsg 189
+#define __NR_pwrite64 181
+#define __NR_pwritev 364
+#define __NR_pwritev2 394
+#define __NR_query_module 167
+#define __NR_quotactl 131
+#define __NR_read 3
+#define __NR_readahead 225
+#define __NR_readdir 89
+#define __NR_readlink 85
+#define __NR_readlinkat 305
+#define __NR_readv 145
+#define __NR_reboot 88
+#define __NR_recv 356
+#define __NR_recvfrom 355
+#define __NR_recvmmsg 367
+#define __NR_recvmsg 361
+#define __NR_remap_file_pages 257
+#define __NR_removexattr 235
+#define __NR_rename 38
+#define __NR_renameat 302
+#define __NR_renameat2 383
+#define __NR_request_key 287
+#define __NR_restart_syscall 0
+#define __NR_rmdir 40
+#define __NR_rseq 400
+#define __NR_rt_sigaction 174
+#define __NR_rt_sigpending 176
+#define __NR_rt_sigprocmask 175
+#define __NR_rt_sigqueueinfo 178
+#define __NR_rt_sigreturn 173
+#define __NR_rt_sigsuspend 179
+#define __NR_rt_sigtimedwait 177
+#define __NR_rt_tgsigqueueinfo 365
+#define __NR_sched_get_priority_max 159
+#define __NR_sched_get_priority_min 160
+#define __NR_sched_getaffinity 242
+#define __NR_sched_getattr 382
+#define __NR_sched_getparam 155
+#define __NR_sched_getscheduler 157
+#define __NR_sched_rr_get_interval 161
+#define __NR_sched_setaffinity 241
+#define __NR_sched_setattr 381
+#define __NR_sched_setparam 154
+#define __NR_sched_setscheduler 156
+#define __NR_sched_yield 158
+#define __NR_seccomp 384
+#define __NR_select 82
+#define __NR_semctl 328
+#define __NR_semget 329
+#define __NR_semop 330
+#define __NR_semtimedop 325
+#define __NR_send 354
+#define __NR_sendfile 187
+#define __NR_sendfile64 239
+#define __NR_sendmmsg 376
+#define __NR_sendmsg 360
+#define __NR_sendto 353
+#define __NR_set_mempolicy 276
+#define __NR_set_robust_list 311
+#define __NR_set_thread_area 243
+#define __NR_set_tid_address 258
+#define __NR_setdomainname 121
+#define __NR_setfsgid 139
+#define __NR_setfsgid32 216
+#define __NR_setfsuid 138
+#define __NR_setfsuid32 215
+#define __NR_setgid 46
+#define __NR_setgid32 214
+#define __NR_setgroups 81
+#define __NR_setgroups32 206
+#define __NR_sethostname 74
+#define __NR_setitimer 104
+#define __NR_setns 375
+#define __NR_setpgid 57
+#define __NR_setpriority 97
+#define __NR_setregid 71
+#define __NR_setregid32 204
+#define __NR_setresgid 170
+#define __NR_setresgid32 210
+#define __NR_setresuid 164
+#define __NR_setresuid32 208
+#define __NR_setreuid 70
+#define __NR_setreuid32 203
+#define __NR_setrlimit 75
+#define __NR_setsid 66
+#define __NR_setsockopt 357
+#define __NR_settimeofday 79
+#define __NR_setuid 23
+#define __NR_setuid32 213
+#define __NR_setxattr 226
+#define __NR_sgetmask 68
+#define __NR_shmat 335
+#define __NR_shmctl 336
+#define __NR_shmdt 337
+#define __NR_shmget 338
+#define __NR_shutdown 359
+#define __NR_sigaction 67
+#define __NR_sigaltstack 186
+#define __NR_signal 48
+#define __NR_signalfd 321
+#define __NR_signalfd4 339
+#define __NR_sigpending 73
+#define __NR_sigprocmask 126
+#define __NR_sigreturn 119
+#define __NR_sigsuspend 72
+#define __NR_socket 345
+#define __NR_socketcall 102
+#define __NR_socketpair 346
+#define __NR_splice 313
+#define __NR_ssetmask 69
+#define __NR_stat 106
+#define __NR_stat64 195
+#define __NR_statfs 99
+#define __NR_statfs64 268
+#define __NR_statx 398
+#define __NR_stime 25
+#define __NR_stty 31
+#define __NR_swapoff 115
+#define __NR_swapon 87
+#define __NR_symlink 83
+#define __NR_symlinkat 304
+#define __NR_sync 36
+#define __NR_sync_file_range 314
+#define __NR_syncfs 374
+#define __NR_sysfs 135
+#define __NR_sysinfo 116
+#define __NR_syslog 103
+#define __NR_tee 315
+#define __NR_tgkill 270
+#define __NR_time 13
+#define __NR_timer_create 259
+#define __NR_timer_delete 263
+#define __NR_timer_getoverrun 262
+#define __NR_timer_gettime 261
+#define __NR_timer_settime 260
+#define __NR_timerfd_create 322
+#define __NR_timerfd_gettime 327
+#define __NR_timerfd_settime 326
+#define __NR_times 43
+#define __NR_tkill 238
+#define __NR_truncate 92
+#define __NR_truncate64 193
+#define __NR_ugetrlimit 191
+#define __NR_ulimit 58
+#define __NR_umask 60
+#define __NR_umount 22
+#define __NR_umount2 52
+#define __NR_uname 122
+#define __NR_unlink 10
+#define __NR_unlinkat 301
+#define __NR_unshare 310
+#define __NR_uselib 86
+#define __NR_userfaultfd 389
+#define __NR_ustat 62
+#define __NR_utime 30
+#define __NR_utimensat 320
+#define __NR_utimes 271
+#define __NR_vfork 190
+#define __NR_vhangup 111
+#define __NR_vm86 166
+#define __NR_vm86old 113
+#define __NR_vmsplice 316
+#define __NR_vserver 273
+#define __NR_wait4 114
+#define __NR_waitid 284
+#define __NR_waitpid 7
+#define __NR_write 4
+#define __NR_writev 146
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h
new file mode 100644
index 0000000000..749d413555
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h
@@ -0,0 +1,360 @@
+#define __NR__llseek 4140
+#define __NR__newselect 4142
+#define __NR__sysctl 4153
+#define __NR_accept 4168
+#define __NR_accept4 4334
+#define __NR_access 4033
+#define __NR_acct 4051
+#define __NR_add_key 4280
+#define __NR_adjtimex 4124
+#define __NR_afs_syscall 4137
+#define __NR_alarm 4027
+#define __NR_bdflush 4134
+#define __NR_bind 4169
+#define __NR_bpf 4355
+#define __NR_break 4017
+#define __NR_brk 4045
+#define __NR_cachectl 4148
+#define __NR_cacheflush 4147
+#define __NR_capget 4204
+#define __NR_capset 4205
+#define __NR_chdir 4012
+#define __NR_chmod 4015
+#define __NR_chown 4202
+#define __NR_chroot 4061
+#define __NR_clock_adjtime 4341
+#define __NR_clock_getres 4264
+#define __NR_clock_gettime 4263
+#define __NR_clock_nanosleep 4265
+#define __NR_clock_settime 4262
+#define __NR_clone 4120
+#define __NR_close 4006
+#define __NR_connect 4170
+#define __NR_copy_file_range 4360
+#define __NR_creat 4008
+#define __NR_create_module 4127
+#define __NR_delete_module 4129
+#define __NR_dup 4041
+#define __NR_dup2 4063
+#define __NR_dup3 4327
+#define __NR_epoll_create 4248
+#define __NR_epoll_create1 4326
+#define __NR_epoll_ctl 4249
+#define __NR_epoll_pwait 4313
+#define __NR_epoll_wait 4250
+#define __NR_eventfd 4319
+#define __NR_eventfd2 4325
+#define __NR_execve 4011
+#define __NR_execveat 4356
+#define __NR_exit 4001
+#define __NR_exit_group 4246
+#define __NR_faccessat 4300
+#define __NR_fadvise64 4254
+#define __NR_fallocate 4320
+#define __NR_fanotify_init 4336
+#define __NR_fanotify_mark 4337
+#define __NR_fchdir 4133
+#define __NR_fchmod 4094
+#define __NR_fchmodat 4299
+#define __NR_fchown 4095
+#define __NR_fchownat 4291
+#define __NR_fcntl 4055
+#define __NR_fcntl64 4220
+#define __NR_fdatasync 4152
+#define __NR_fgetxattr 4229
+#define __NR_finit_module 4348
+#define __NR_flistxattr 4232
+#define __NR_flock 4143
+#define __NR_fork 4002
+#define __NR_fremovexattr 4235
+#define __NR_fsetxattr 4226
+#define __NR_fstat 4108
+#define __NR_fstat64 4215
+#define __NR_fstatat64 4293
+#define __NR_fstatfs 4100
+#define __NR_fstatfs64 4256
+#define __NR_fsync 4118
+#define __NR_ftime 4035
+#define __NR_ftruncate 4093
+#define __NR_ftruncate64 4212
+#define __NR_futex 4238
+#define __NR_futimesat 4292
+#define __NR_get_kernel_syms 4130
+#define __NR_get_mempolicy 4269
+#define __NR_get_robust_list 4310
+#define __NR_getcpu 4312
+#define __NR_getcwd 4203
+#define __NR_getdents 4141
+#define __NR_getdents64 4219
+#define __NR_getegid 4050
+#define __NR_geteuid 4049
+#define __NR_getgid 4047
+#define __NR_getgroups 4080
+#define __NR_getitimer 4105
+#define __NR_getpeername 4171
+#define __NR_getpgid 4132
+#define __NR_getpgrp 4065
+#define __NR_getpid 4020
+#define __NR_getpmsg 4208
+#define __NR_getppid 4064
+#define __NR_getpriority 4096
+#define __NR_getrandom 4353
+#define __NR_getresgid 4191
+#define __NR_getresuid 4186
+#define __NR_getrlimit 4076
+#define __NR_getrusage 4077
+#define __NR_getsid 4151
+#define __NR_getsockname 4172
+#define __NR_getsockopt 4173
+#define __NR_gettid 4222
+#define __NR_gettimeofday 4078
+#define __NR_getuid 4024
+#define __NR_getxattr 4227
+#define __NR_gtty 4032
+#define __NR_idle 4112
+#define __NR_init_module 4128
+#define __NR_inotify_add_watch 4285
+#define __NR_inotify_init 4284
+#define __NR_inotify_init1 4329
+#define __NR_inotify_rm_watch 4286
+#define __NR_io_cancel 4245
+#define __NR_io_destroy 4242
+#define __NR_io_getevents 4243
+#define __NR_io_pgetevents 4368
+#define __NR_io_setup 4241
+#define __NR_io_submit 4244
+#define __NR_ioctl 4054
+#define __NR_ioperm 4101
+#define __NR_iopl 4110
+#define __NR_ioprio_get 4315
+#define __NR_ioprio_set 4314
+#define __NR_ipc 4117
+#define __NR_kcmp 4347
+#define __NR_kexec_load 4311
+#define __NR_keyctl 4282
+#define __NR_kill 4037
+#define __NR_lchown 4016
+#define __NR_lgetxattr 4228
+#define __NR_link 4009
+#define __NR_linkat 4296
+#define __NR_listen 4174
+#define __NR_listxattr 4230
+#define __NR_llistxattr 4231
+#define __NR_lock 4053
+#define __NR_lookup_dcookie 4247
+#define __NR_lremovexattr 4234
+#define __NR_lseek 4019
+#define __NR_lsetxattr 4225
+#define __NR_lstat 4107
+#define __NR_lstat64 4214
+#define __NR_madvise 4218
+#define __NR_mbind 4268
+#define __NR_membarrier 4358
+#define __NR_memfd_create 4354
+#define __NR_migrate_pages 4287
+#define __NR_mincore 4217
+#define __NR_mkdir 4039
+#define __NR_mkdirat 4289
+#define __NR_mknod 4014
+#define __NR_mknodat 4290
+#define __NR_mlock 4154
+#define __NR_mlock2 4359
+#define __NR_mlockall 4156
+#define __NR_mmap 4090
+#define __NR_mmap2 4210
+#define __NR_modify_ldt 4123
+#define __NR_mount 4021
+#define __NR_move_pages 4308
+#define __NR_mprotect 4125
+#define __NR_mpx 4056
+#define __NR_mq_getsetattr 4276
+#define __NR_mq_notify 4275
+#define __NR_mq_open 4271
+#define __NR_mq_timedreceive 4274
+#define __NR_mq_timedsend 4273
+#define __NR_mq_unlink 4272
+#define __NR_mremap 4167
+#define __NR_msync 4144
+#define __NR_munlock 4155
+#define __NR_munlockall 4157
+#define __NR_munmap 4091
+#define __NR_name_to_handle_at 4339
+#define __NR_nanosleep 4166
+#define __NR_nfsservctl 4189
+#define __NR_nice 4034
+#define __NR_open 4005
+#define __NR_open_by_handle_at 4340
+#define __NR_openat 4288
+#define __NR_pause 4029
+#define __NR_perf_event_open 4333
+#define __NR_personality 4136
+#define __NR_pipe 4042
+#define __NR_pipe2 4328
+#define __NR_pivot_root 4216
+#define __NR_pkey_alloc 4364
+#define __NR_pkey_free 4365
+#define __NR_pkey_mprotect 4363
+#define __NR_poll 4188
+#define __NR_ppoll 4302
+#define __NR_prctl 4192
+#define __NR_pread64 4200
+#define __NR_preadv 4330
+#define __NR_preadv2 4361
+#define __NR_prlimit64 4338
+#define __NR_process_vm_readv 4345
+#define __NR_process_vm_writev 4346
+#define __NR_prof 4044
+#define __NR_profil 4098
+#define __NR_pselect6 4301
+#define __NR_ptrace 4026
+#define __NR_putpmsg 4209
+#define __NR_pwrite64 4201
+#define __NR_pwritev 4331
+#define __NR_pwritev2 4362
+#define __NR_query_module 4187
+#define __NR_quotactl 4131
+#define __NR_read 4003
+#define __NR_readahead 4223
+#define __NR_readdir 4089
+#define __NR_readlink 4085
+#define __NR_readlinkat 4298
+#define __NR_readv 4145
+#define __NR_reboot 4088
+#define __NR_recv 4175
+#define __NR_recvfrom 4176
+#define __NR_recvmmsg 4335
+#define __NR_recvmsg 4177
+#define __NR_remap_file_pages 4251
+#define __NR_removexattr 4233
+#define __NR_rename 4038
+#define __NR_renameat 4295
+#define __NR_renameat2 4351
+#define __NR_request_key 4281
+#define __NR_restart_syscall 4253
+#define __NR_rmdir 4040
+#define __NR_rseq 4367
+#define __NR_rt_sigaction 4194
+#define __NR_rt_sigpending 4196
+#define __NR_rt_sigprocmask 4195
+#define __NR_rt_sigqueueinfo 4198
+#define __NR_rt_sigreturn 4193
+#define __NR_rt_sigsuspend 4199
+#define __NR_rt_sigtimedwait 4197
+#define __NR_rt_tgsigqueueinfo 4332
+#define __NR_sched_get_priority_max 4163
+#define __NR_sched_get_priority_min 4164
+#define __NR_sched_getaffinity 4240
+#define __NR_sched_getattr 4350
+#define __NR_sched_getparam 4159
+#define __NR_sched_getscheduler 4161
+#define __NR_sched_rr_get_interval 4165
+#define __NR_sched_setaffinity 4239
+#define __NR_sched_setattr 4349
+#define __NR_sched_setparam 4158
+#define __NR_sched_setscheduler 4160
+#define __NR_sched_yield 4162
+#define __NR_seccomp 4352
+#define __NR_send 4178
+#define __NR_sendfile 4207
+#define __NR_sendfile64 4237
+#define __NR_sendmmsg 4343
+#define __NR_sendmsg 4179
+#define __NR_sendto 4180
+#define __NR_set_mempolicy 4270
+#define __NR_set_robust_list 4309
+#define __NR_set_thread_area 4283
+#define __NR_set_tid_address 4252
+#define __NR_setdomainname 4121
+#define __NR_setfsgid 4139
+#define __NR_setfsuid 4138
+#define __NR_setgid 4046
+#define __NR_setgroups 4081
+#define __NR_sethostname 4074
+#define __NR_setitimer 4104
+#define __NR_setns 4344
+#define __NR_setpgid 4057
+#define __NR_setpriority 4097
+#define __NR_setregid 4071
+#define __NR_setresgid 4190
+#define __NR_setresuid 4185
+#define __NR_setreuid 4070
+#define __NR_setrlimit 4075
+#define __NR_setsid 4066
+#define __NR_setsockopt 4181
+#define __NR_settimeofday 4079
+#define __NR_setuid 4023
+#define __NR_setxattr 4224
+#define __NR_sgetmask 4068
+#define __NR_shutdown 4182
+#define __NR_sigaction 4067
+#define __NR_sigaltstack 4206
+#define __NR_signal 4048
+#define __NR_signalfd 4317
+#define __NR_signalfd4 4324
+#define __NR_sigpending 4073
+#define __NR_sigprocmask 4126
+#define __NR_sigreturn 4119
+#define __NR_sigsuspend 4072
+#define __NR_socket 4183
+#define __NR_socketcall 4102
+#define __NR_socketpair 4184
+#define __NR_splice 4304
+#define __NR_ssetmask 4069
+#define __NR_stat 4106
+#define __NR_stat64 4213
+#define __NR_statfs 4099
+#define __NR_statfs64 4255
+#define __NR_statx 4366
+#define __NR_stime 4025
+#define __NR_stty 4031
+#define __NR_swapoff 4115
+#define __NR_swapon 4087
+#define __NR_symlink 4083
+#define __NR_symlinkat 4297
+#define __NR_sync 4036
+#define __NR_sync_file_range 4305
+#define __NR_syncfs 4342
+#define __NR_syscall 4000
+#define __NR_sysfs 4135
+#define __NR_sysinfo 4116
+#define __NR_syslog 4103
+#define __NR_sysmips 4149
+#define __NR_tee 4306
+#define __NR_tgkill 4266
+#define __NR_time 4013
+#define __NR_timer_create 4257
+#define __NR_timer_delete 4261
+#define __NR_timer_getoverrun 4260
+#define __NR_timer_gettime 4259
+#define __NR_timer_settime 4258
+#define __NR_timerfd 4318
+#define __NR_timerfd_create 4321
+#define __NR_timerfd_gettime 4322
+#define __NR_timerfd_settime 4323
+#define __NR_times 4043
+#define __NR_tkill 4236
+#define __NR_truncate 4092
+#define __NR_truncate64 4211
+#define __NR_ulimit 4058
+#define __NR_umask 4060
+#define __NR_umount 4022
+#define __NR_umount2 4052
+#define __NR_uname 4122
+#define __NR_unlink 4010
+#define __NR_unlinkat 4294
+#define __NR_unshare 4303
+#define __NR_uselib 4086
+#define __NR_userfaultfd 4357
+#define __NR_ustat 4062
+#define __NR_utime 4030
+#define __NR_utimensat 4316
+#define __NR_utimes 4267
+#define __NR_vhangup 4111
+#define __NR_vm86 4113
+#define __NR_vmsplice 4307
+#define __NR_vserver 4277
+#define __NR_wait4 4114
+#define __NR_waitid 4278
+#define __NR_waitpid 4007
+#define __NR_write 4004
+#define __NR_writev 4146
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h
new file mode 100644
index 0000000000..103927d49c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h
@@ -0,0 +1,330 @@
+#define __NR__newselect 6022
+#define __NR__sysctl 6152
+#define __NR_accept 6042
+#define __NR_accept4 6297
+#define __NR_access 6020
+#define __NR_acct 6158
+#define __NR_add_key 6243
+#define __NR_adjtimex 6154
+#define __NR_afs_syscall 6176
+#define __NR_alarm 6037
+#define __NR_bind 6048
+#define __NR_bpf 6319
+#define __NR_brk 6012
+#define __NR_cachectl 6198
+#define __NR_cacheflush 6197
+#define __NR_capget 6123
+#define __NR_capset 6124
+#define __NR_chdir 6078
+#define __NR_chmod 6088
+#define __NR_chown 6090
+#define __NR_chroot 6156
+#define __NR_clock_adjtime 6305
+#define __NR_clock_getres 6227
+#define __NR_clock_gettime 6226
+#define __NR_clock_nanosleep 6228
+#define __NR_clock_settime 6225
+#define __NR_clone 6055
+#define __NR_close 6003
+#define __NR_connect 6041
+#define __NR_copy_file_range 6324
+#define __NR_creat 6083
+#define __NR_create_module 6167
+#define __NR_delete_module 6169
+#define __NR_dup 6031
+#define __NR_dup2 6032
+#define __NR_dup3 6290
+#define __NR_epoll_create 6207
+#define __NR_epoll_create1 6289
+#define __NR_epoll_ctl 6208
+#define __NR_epoll_pwait 6276
+#define __NR_epoll_wait 6209
+#define __NR_eventfd 6282
+#define __NR_eventfd2 6288
+#define __NR_execve 6057
+#define __NR_execveat 6320
+#define __NR_exit 6058
+#define __NR_exit_group 6205
+#define __NR_faccessat 6263
+#define __NR_fadvise64 6216
+#define __NR_fallocate 6283
+#define __NR_fanotify_init 6300
+#define __NR_fanotify_mark 6301
+#define __NR_fchdir 6079
+#define __NR_fchmod 6089
+#define __NR_fchmodat 6262
+#define __NR_fchown 6091
+#define __NR_fchownat 6254
+#define __NR_fcntl 6070
+#define __NR_fcntl64 6212
+#define __NR_fdatasync 6073
+#define __NR_fgetxattr 6185
+#define __NR_finit_module 6312
+#define __NR_flistxattr 6188
+#define __NR_flock 6071
+#define __NR_fork 6056
+#define __NR_fremovexattr 6191
+#define __NR_fsetxattr 6182
+#define __NR_fstat 6005
+#define __NR_fstatfs 6135
+#define __NR_fstatfs64 6218
+#define __NR_fsync 6072
+#define __NR_ftruncate 6075
+#define __NR_futex 6194
+#define __NR_futimesat 6255
+#define __NR_get_kernel_syms 6170
+#define __NR_get_mempolicy 6232
+#define __NR_get_robust_list 6273
+#define __NR_getcpu 6275
+#define __NR_getcwd 6077
+#define __NR_getdents 6076
+#define __NR_getdents64 6299
+#define __NR_getegid 6106
+#define __NR_geteuid 6105
+#define __NR_getgid 6102
+#define __NR_getgroups 6113
+#define __NR_getitimer 6035
+#define __NR_getpeername 6051
+#define __NR_getpgid 6119
+#define __NR_getpgrp 6109
+#define __NR_getpid 6038
+#define __NR_getpmsg 6174
+#define __NR_getppid 6108
+#define __NR_getpriority 6137
+#define __NR_getrandom 6317
+#define __NR_getresgid 6118
+#define __NR_getresuid 6116
+#define __NR_getrlimit 6095
+#define __NR_getrusage 6096
+#define __NR_getsid 6122
+#define __NR_getsockname 6050
+#define __NR_getsockopt 6054
+#define __NR_gettid 6178
+#define __NR_gettimeofday 6094
+#define __NR_getuid 6100
+#define __NR_getxattr 6183
+#define __NR_init_module 6168
+#define __NR_inotify_add_watch 6248
+#define __NR_inotify_init 6247
+#define __NR_inotify_init1 6292
+#define __NR_inotify_rm_watch 6249
+#define __NR_io_cancel 6204
+#define __NR_io_destroy 6201
+#define __NR_io_getevents 6202
+#define __NR_io_pgetevents 6332
+#define __NR_io_setup 6200
+#define __NR_io_submit 6203
+#define __NR_ioctl 6015
+#define __NR_ioprio_get 6278
+#define __NR_ioprio_set 6277
+#define __NR_kcmp 6311
+#define __NR_kexec_load 6274
+#define __NR_keyctl 6245
+#define __NR_kill 6060
+#define __NR_lchown 6092
+#define __NR_lgetxattr 6184
+#define __NR_link 6084
+#define __NR_linkat 6259
+#define __NR_listen 6049
+#define __NR_listxattr 6186
+#define __NR_llistxattr 6187
+#define __NR_lookup_dcookie 6206
+#define __NR_lremovexattr 6190
+#define __NR_lseek 6008
+#define __NR_lsetxattr 6181
+#define __NR_lstat 6006
+#define __NR_madvise 6027
+#define __NR_mbind 6231
+#define __NR_membarrier 6322
+#define __NR_memfd_create 6318
+#define __NR_migrate_pages 6250
+#define __NR_mincore 6026
+#define __NR_mkdir 6081
+#define __NR_mkdirat 6252
+#define __NR_mknod 6131
+#define __NR_mknodat 6253
+#define __NR_mlock 6146
+#define __NR_mlock2 6323
+#define __NR_mlockall 6148
+#define __NR_mmap 6009
+#define __NR_mount 6160
+#define __NR_move_pages 6271
+#define __NR_mprotect 6010
+#define __NR_mq_getsetattr 6239
+#define __NR_mq_notify 6238
+#define __NR_mq_open 6234
+#define __NR_mq_timedreceive 6237
+#define __NR_mq_timedsend 6236
+#define __NR_mq_unlink 6235
+#define __NR_mremap 6024
+#define __NR_msgctl 6069
+#define __NR_msgget 6066
+#define __NR_msgrcv 6068
+#define __NR_msgsnd 6067
+#define __NR_msync 6025
+#define __NR_munlock 6147
+#define __NR_munlockall 6149
+#define __NR_munmap 6011
+#define __NR_name_to_handle_at 6303
+#define __NR_nanosleep 6034
+#define __NR_newfstatat 6256
+#define __NR_nfsservctl 6173
+#define __NR_open 6002
+#define __NR_open_by_handle_at 6304
+#define __NR_openat 6251
+#define __NR_pause 6033
+#define __NR_perf_event_open 6296
+#define __NR_personality 6132
+#define __NR_pipe 6021
+#define __NR_pipe2 6291
+#define __NR_pivot_root 6151
+#define __NR_pkey_alloc 6328
+#define __NR_pkey_free 6329
+#define __NR_pkey_mprotect 6327
+#define __NR_poll 6007
+#define __NR_ppoll 6265
+#define __NR_prctl 6153
+#define __NR_pread64 6016
+#define __NR_preadv 6293
+#define __NR_preadv2 6325
+#define __NR_prlimit64 6302
+#define __NR_process_vm_readv 6309
+#define __NR_process_vm_writev 6310
+#define __NR_pselect6 6264
+#define __NR_ptrace 6099
+#define __NR_putpmsg 6175
+#define __NR_pwrite64 6017
+#define __NR_pwritev 6294
+#define __NR_pwritev2 6326
+#define __NR_query_module 6171
+#define __NR_quotactl 6172
+#define __NR_read 6000
+#define __NR_readahead 6179
+#define __NR_readlink 6087
+#define __NR_readlinkat 6261
+#define __NR_readv 6018
+#define __NR_reboot 6164
+#define __NR_recvfrom 6044
+#define __NR_recvmmsg 6298
+#define __NR_recvmsg 6046
+#define __NR_remap_file_pages 6210
+#define __NR_removexattr 6189
+#define __NR_rename 6080
+#define __NR_renameat 6258
+#define __NR_renameat2 6315
+#define __NR_request_key 6244
+#define __NR_restart_syscall 6214
+#define __NR_rmdir 6082
+#define __NR_rseq 6331
+#define __NR_rt_sigaction 6013
+#define __NR_rt_sigpending 6125
+#define __NR_rt_sigprocmask 6014
+#define __NR_rt_sigqueueinfo 6127
+#define __NR_rt_sigreturn 6211
+#define __NR_rt_sigsuspend 6128
+#define __NR_rt_sigtimedwait 6126
+#define __NR_rt_tgsigqueueinfo 6295
+#define __NR_sched_get_priority_max 6143
+#define __NR_sched_get_priority_min 6144
+#define __NR_sched_getaffinity 6196
+#define __NR_sched_getattr 6314
+#define __NR_sched_getparam 6140
+#define __NR_sched_getscheduler 6142
+#define __NR_sched_rr_get_interval 6145
+#define __NR_sched_setaffinity 6195
+#define __NR_sched_setattr 6313
+#define __NR_sched_setparam 6139
+#define __NR_sched_setscheduler 6141
+#define __NR_sched_yield 6023
+#define __NR_seccomp 6316
+#define __NR_semctl 6064
+#define __NR_semget 6062
+#define __NR_semop 6063
+#define __NR_semtimedop 6215
+#define __NR_sendfile 6039
+#define __NR_sendfile64 6219
+#define __NR_sendmmsg 6307
+#define __NR_sendmsg 6045
+#define __NR_sendto 6043
+#define __NR_set_mempolicy 6233
+#define __NR_set_robust_list 6272
+#define __NR_set_thread_area 6246
+#define __NR_set_tid_address 6213
+#define __NR_setdomainname 6166
+#define __NR_setfsgid 6121
+#define __NR_setfsuid 6120
+#define __NR_setgid 6104
+#define __NR_setgroups 6114
+#define __NR_sethostname 6165
+#define __NR_setitimer 6036
+#define __NR_setns 6308
+#define __NR_setpgid 6107
+#define __NR_setpriority 6138
+#define __NR_setregid 6112
+#define __NR_setresgid 6117
+#define __NR_setresuid 6115
+#define __NR_setreuid 6111
+#define __NR_setrlimit 6155
+#define __NR_setsid 6110
+#define __NR_setsockopt 6053
+#define __NR_settimeofday 6159
+#define __NR_setuid 6103
+#define __NR_setxattr 6180
+#define __NR_shmat 6029
+#define __NR_shmctl 6030
+#define __NR_shmdt 6065
+#define __NR_shmget 6028
+#define __NR_shutdown 6047
+#define __NR_sigaltstack 6129
+#define __NR_signalfd 6280
+#define __NR_signalfd4 6287
+#define __NR_socket 6040
+#define __NR_socketpair 6052
+#define __NR_splice 6267
+#define __NR_stat 6004
+#define __NR_statfs 6134
+#define __NR_statfs64 6217
+#define __NR_statx 6330
+#define __NR_swapoff 6163
+#define __NR_swapon 6162
+#define __NR_symlink 6086
+#define __NR_symlinkat 6260
+#define __NR_sync 6157
+#define __NR_sync_file_range 6268
+#define __NR_syncfs 6306
+#define __NR_sysfs 6136
+#define __NR_sysinfo 6097
+#define __NR_syslog 6101
+#define __NR_sysmips 6199
+#define __NR_tee 6269
+#define __NR_tgkill 6229
+#define __NR_timer_create 6220
+#define __NR_timer_delete 6224
+#define __NR_timer_getoverrun 6223
+#define __NR_timer_gettime 6222
+#define __NR_timer_settime 6221
+#define __NR_timerfd 6281
+#define __NR_timerfd_create 6284
+#define __NR_timerfd_gettime 6285
+#define __NR_timerfd_settime 6286
+#define __NR_times 6098
+#define __NR_tkill 6192
+#define __NR_truncate 6074
+#define __NR_umask 6093
+#define __NR_umount2 6161
+#define __NR_uname 6061
+#define __NR_unlink 6085
+#define __NR_unlinkat 6257
+#define __NR_unshare 6266
+#define __NR_userfaultfd 6321
+#define __NR_ustat 6133
+#define __NR_utime 6130
+#define __NR_utimensat 6279
+#define __NR_utimes 6230
+#define __NR_vhangup 6150
+#define __NR_vmsplice 6270
+#define __NR_vserver 6240
+#define __NR_wait4 6059
+#define __NR_waitid 6241
+#define __NR_write 6001
+#define __NR_writev 6019
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h
new file mode 100644
index 0000000000..e8682bf8de
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h
@@ -0,0 +1,326 @@
+#define __NR__newselect 5022
+#define __NR__sysctl 5152
+#define __NR_accept 5042
+#define __NR_accept4 5293
+#define __NR_access 5020
+#define __NR_acct 5158
+#define __NR_add_key 5239
+#define __NR_adjtimex 5154
+#define __NR_afs_syscall 5176
+#define __NR_alarm 5037
+#define __NR_bind 5048
+#define __NR_bpf 5315
+#define __NR_brk 5012
+#define __NR_cachectl 5198
+#define __NR_cacheflush 5197
+#define __NR_capget 5123
+#define __NR_capset 5124
+#define __NR_chdir 5078
+#define __NR_chmod 5088
+#define __NR_chown 5090
+#define __NR_chroot 5156
+#define __NR_clock_adjtime 5300
+#define __NR_clock_getres 5223
+#define __NR_clock_gettime 5222
+#define __NR_clock_nanosleep 5224
+#define __NR_clock_settime 5221
+#define __NR_clone 5055
+#define __NR_close 5003
+#define __NR_connect 5041
+#define __NR_copy_file_range 5320
+#define __NR_creat 5083
+#define __NR_create_module 5167
+#define __NR_delete_module 5169
+#define __NR_dup 5031
+#define __NR_dup2 5032
+#define __NR_dup3 5286
+#define __NR_epoll_create 5207
+#define __NR_epoll_create1 5285
+#define __NR_epoll_ctl 5208
+#define __NR_epoll_pwait 5272
+#define __NR_epoll_wait 5209
+#define __NR_eventfd 5278
+#define __NR_eventfd2 5284
+#define __NR_execve 5057
+#define __NR_execveat 5316
+#define __NR_exit 5058
+#define __NR_exit_group 5205
+#define __NR_faccessat 5259
+#define __NR_fadvise64 5215
+#define __NR_fallocate 5279
+#define __NR_fanotify_init 5295
+#define __NR_fanotify_mark 5296
+#define __NR_fchdir 5079
+#define __NR_fchmod 5089
+#define __NR_fchmodat 5258
+#define __NR_fchown 5091
+#define __NR_fchownat 5250
+#define __NR_fcntl 5070
+#define __NR_fdatasync 5073
+#define __NR_fgetxattr 5185
+#define __NR_finit_module 5307
+#define __NR_flistxattr 5188
+#define __NR_flock 5071
+#define __NR_fork 5056
+#define __NR_fremovexattr 5191
+#define __NR_fsetxattr 5182
+#define __NR_fstat 5005
+#define __NR_fstatfs 5135
+#define __NR_fsync 5072
+#define __NR_ftruncate 5075
+#define __NR_futex 5194
+#define __NR_futimesat 5251
+#define __NR_get_kernel_syms 5170
+#define __NR_get_mempolicy 5228
+#define __NR_get_robust_list 5269
+#define __NR_getcpu 5271
+#define __NR_getcwd 5077
+#define __NR_getdents 5076
+#define __NR_getdents64 5308
+#define __NR_getegid 5106
+#define __NR_geteuid 5105
+#define __NR_getgid 5102
+#define __NR_getgroups 5113
+#define __NR_getitimer 5035
+#define __NR_getpeername 5051
+#define __NR_getpgid 5119
+#define __NR_getpgrp 5109
+#define __NR_getpid 5038
+#define __NR_getpmsg 5174
+#define __NR_getppid 5108
+#define __NR_getpriority 5137
+#define __NR_getrandom 5313
+#define __NR_getresgid 5118
+#define __NR_getresuid 5116
+#define __NR_getrlimit 5095
+#define __NR_getrusage 5096
+#define __NR_getsid 5122
+#define __NR_getsockname 5050
+#define __NR_getsockopt 5054
+#define __NR_gettid 5178
+#define __NR_gettimeofday 5094
+#define __NR_getuid 5100
+#define __NR_getxattr 5183
+#define __NR_init_module 5168
+#define __NR_inotify_add_watch 5244
+#define __NR_inotify_init 5243
+#define __NR_inotify_init1 5288
+#define __NR_inotify_rm_watch 5245
+#define __NR_io_cancel 5204
+#define __NR_io_destroy 5201
+#define __NR_io_getevents 5202
+#define __NR_io_pgetevents 5328
+#define __NR_io_setup 5200
+#define __NR_io_submit 5203
+#define __NR_ioctl 5015
+#define __NR_ioprio_get 5274
+#define __NR_ioprio_set 5273
+#define __NR_kcmp 5306
+#define __NR_kexec_load 5270
+#define __NR_keyctl 5241
+#define __NR_kill 5060
+#define __NR_lchown 5092
+#define __NR_lgetxattr 5184
+#define __NR_link 5084
+#define __NR_linkat 5255
+#define __NR_listen 5049
+#define __NR_listxattr 5186
+#define __NR_llistxattr 5187
+#define __NR_lookup_dcookie 5206
+#define __NR_lremovexattr 5190
+#define __NR_lseek 5008
+#define __NR_lsetxattr 5181
+#define __NR_lstat 5006
+#define __NR_madvise 5027
+#define __NR_mbind 5227
+#define __NR_membarrier 5318
+#define __NR_memfd_create 5314
+#define __NR_migrate_pages 5246
+#define __NR_mincore 5026
+#define __NR_mkdir 5081
+#define __NR_mkdirat 5248
+#define __NR_mknod 5131
+#define __NR_mknodat 5249
+#define __NR_mlock 5146
+#define __NR_mlock2 5319
+#define __NR_mlockall 5148
+#define __NR_mmap 5009
+#define __NR_mount 5160
+#define __NR_move_pages 5267
+#define __NR_mprotect 5010
+#define __NR_mq_getsetattr 5235
+#define __NR_mq_notify 5234
+#define __NR_mq_open 5230
+#define __NR_mq_timedreceive 5233
+#define __NR_mq_timedsend 5232
+#define __NR_mq_unlink 5231
+#define __NR_mremap 5024
+#define __NR_msgctl 5069
+#define __NR_msgget 5066
+#define __NR_msgrcv 5068
+#define __NR_msgsnd 5067
+#define __NR_msync 5025
+#define __NR_munlock 5147
+#define __NR_munlockall 5149
+#define __NR_munmap 5011
+#define __NR_name_to_handle_at 5298
+#define __NR_nanosleep 5034
+#define __NR_newfstatat 5252
+#define __NR_nfsservctl 5173
+#define __NR_open 5002
+#define __NR_open_by_handle_at 5299
+#define __NR_openat 5247
+#define __NR_pause 5033
+#define __NR_perf_event_open 5292
+#define __NR_personality 5132
+#define __NR_pipe 5021
+#define __NR_pipe2 5287
+#define __NR_pivot_root 5151
+#define __NR_pkey_alloc 5324
+#define __NR_pkey_free 5325
+#define __NR_pkey_mprotect 5323
+#define __NR_poll 5007
+#define __NR_ppoll 5261
+#define __NR_prctl 5153
+#define __NR_pread64 5016
+#define __NR_preadv 5289
+#define __NR_preadv2 5321
+#define __NR_prlimit64 5297
+#define __NR_process_vm_readv 5304
+#define __NR_process_vm_writev 5305
+#define __NR_pselect6 5260
+#define __NR_ptrace 5099
+#define __NR_putpmsg 5175
+#define __NR_pwrite64 5017
+#define __NR_pwritev 5290
+#define __NR_pwritev2 5322
+#define __NR_query_module 5171
+#define __NR_quotactl 5172
+#define __NR_read 5000
+#define __NR_readahead 5179
+#define __NR_readlink 5087
+#define __NR_readlinkat 5257
+#define __NR_readv 5018
+#define __NR_reboot 5164
+#define __NR_recvfrom 5044
+#define __NR_recvmmsg 5294
+#define __NR_recvmsg 5046
+#define __NR_remap_file_pages 5210
+#define __NR_removexattr 5189
+#define __NR_rename 5080
+#define __NR_renameat 5254
+#define __NR_renameat2 5311
+#define __NR_request_key 5240
+#define __NR_restart_syscall 5213
+#define __NR_rmdir 5082
+#define __NR_rseq 5327
+#define __NR_rt_sigaction 5013
+#define __NR_rt_sigpending 5125
+#define __NR_rt_sigprocmask 5014
+#define __NR_rt_sigqueueinfo 5127
+#define __NR_rt_sigreturn 5211
+#define __NR_rt_sigsuspend 5128
+#define __NR_rt_sigtimedwait 5126
+#define __NR_rt_tgsigqueueinfo 5291
+#define __NR_sched_get_priority_max 5143
+#define __NR_sched_get_priority_min 5144
+#define __NR_sched_getaffinity 5196
+#define __NR_sched_getattr 5310
+#define __NR_sched_getparam 5140
+#define __NR_sched_getscheduler 5142
+#define __NR_sched_rr_get_interval 5145
+#define __NR_sched_setaffinity 5195
+#define __NR_sched_setattr 5309
+#define __NR_sched_setparam 5139
+#define __NR_sched_setscheduler 5141
+#define __NR_sched_yield 5023
+#define __NR_seccomp 5312
+#define __NR_semctl 5064
+#define __NR_semget 5062
+#define __NR_semop 5063
+#define __NR_semtimedop 5214
+#define __NR_sendfile 5039
+#define __NR_sendmmsg 5302
+#define __NR_sendmsg 5045
+#define __NR_sendto 5043
+#define __NR_set_mempolicy 5229
+#define __NR_set_robust_list 5268
+#define __NR_set_thread_area 5242
+#define __NR_set_tid_address 5212
+#define __NR_setdomainname 5166
+#define __NR_setfsgid 5121
+#define __NR_setfsuid 5120
+#define __NR_setgid 5104
+#define __NR_setgroups 5114
+#define __NR_sethostname 5165
+#define __NR_setitimer 5036
+#define __NR_setns 5303
+#define __NR_setpgid 5107
+#define __NR_setpriority 5138
+#define __NR_setregid 5112
+#define __NR_setresgid 5117
+#define __NR_setresuid 5115
+#define __NR_setreuid 5111
+#define __NR_setrlimit 5155
+#define __NR_setsid 5110
+#define __NR_setsockopt 5053
+#define __NR_settimeofday 5159
+#define __NR_setuid 5103
+#define __NR_setxattr 5180
+#define __NR_shmat 5029
+#define __NR_shmctl 5030
+#define __NR_shmdt 5065
+#define __NR_shmget 5028
+#define __NR_shutdown 5047
+#define __NR_sigaltstack 5129
+#define __NR_signalfd 5276
+#define __NR_signalfd4 5283
+#define __NR_socket 5040
+#define __NR_socketpair 5052
+#define __NR_splice 5263
+#define __NR_stat 5004
+#define __NR_statfs 5134
+#define __NR_statx 5326
+#define __NR_swapoff 5163
+#define __NR_swapon 5162
+#define __NR_symlink 5086
+#define __NR_symlinkat 5256
+#define __NR_sync 5157
+#define __NR_sync_file_range 5264
+#define __NR_syncfs 5301
+#define __NR_sysfs 5136
+#define __NR_sysinfo 5097
+#define __NR_syslog 5101
+#define __NR_sysmips 5199
+#define __NR_tee 5265
+#define __NR_tgkill 5225
+#define __NR_timer_create 5216
+#define __NR_timer_delete 5220
+#define __NR_timer_getoverrun 5219
+#define __NR_timer_gettime 5218
+#define __NR_timer_settime 5217
+#define __NR_timerfd 5277
+#define __NR_timerfd_create 5280
+#define __NR_timerfd_gettime 5281
+#define __NR_timerfd_settime 5282
+#define __NR_times 5098
+#define __NR_tkill 5192
+#define __NR_truncate 5074
+#define __NR_umask 5093
+#define __NR_umount2 5161
+#define __NR_uname 5061
+#define __NR_unlink 5085
+#define __NR_unlinkat 5253
+#define __NR_unshare 5262
+#define __NR_userfaultfd 5317
+#define __NR_ustat 5133
+#define __NR_utime 5130
+#define __NR_utimensat 5275
+#define __NR_utimes 5226
+#define __NR_vhangup 5150
+#define __NR_vmsplice 5266
+#define __NR_vserver 5236
+#define __NR_wait4 5059
+#define __NR_waitid 5237
+#define __NR_write 5001
+#define __NR_writev 5019
diff --git a/sysdeps/unix/sysv/linux/nios2/arch-syscall.h b/sysdeps/unix/sysv/linux/nios2/arch-syscall.h
new file mode 100644
index 0000000000..a6ad42c916
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/nios2/arch-syscall.h
@@ -0,0 +1,280 @@
+#define __NR_accept 202
+#define __NR_accept4 242
+#define __NR_acct 89
+#define __NR_add_key 217
+#define __NR_adjtimex 171
+#define __NR_bind 200
+#define __NR_bpf 280
+#define __NR_brk 214
+#define __NR_cacheflush 244
+#define __NR_capget 90
+#define __NR_capset 91
+#define __NR_chdir 49
+#define __NR_chroot 51
+#define __NR_clock_adjtime 266
+#define __NR_clock_getres 114
+#define __NR_clock_gettime 113
+#define __NR_clock_nanosleep 115
+#define __NR_clock_settime 112
+#define __NR_clone 220
+#define __NR_close 57
+#define __NR_connect 203
+#define __NR_copy_file_range 285
+#define __NR_delete_module 106
+#define __NR_dup 23
+#define __NR_dup3 24
+#define __NR_epoll_create1 20
+#define __NR_epoll_ctl 21
+#define __NR_epoll_pwait 22
+#define __NR_eventfd2 19
+#define __NR_execve 221
+#define __NR_execveat 281
+#define __NR_exit 93
+#define __NR_exit_group 94
+#define __NR_faccessat 48
+#define __NR_fadvise64_64 223
+#define __NR_fallocate 47
+#define __NR_fanotify_init 262
+#define __NR_fanotify_mark 263
+#define __NR_fchdir 50
+#define __NR_fchmod 52
+#define __NR_fchmodat 53
+#define __NR_fchown 55
+#define __NR_fchownat 54
+#define __NR_fcntl64 25
+#define __NR_fdatasync 83
+#define __NR_fgetxattr 10
+#define __NR_finit_module 273
+#define __NR_flistxattr 13
+#define __NR_flock 32
+#define __NR_fremovexattr 16
+#define __NR_fsetxattr 7
+#define __NR_fstat64 80
+#define __NR_fstatat64 79
+#define __NR_fstatfs64 44
+#define __NR_fsync 82
+#define __NR_ftruncate64 46
+#define __NR_futex 98
+#define __NR_get_mempolicy 236
+#define __NR_get_robust_list 100
+#define __NR_getcpu 168
+#define __NR_getcwd 17
+#define __NR_getdents64 61
+#define __NR_getegid 177
+#define __NR_geteuid 175
+#define __NR_getgid 176
+#define __NR_getgroups 158
+#define __NR_getitimer 102
+#define __NR_getpeername 205
+#define __NR_getpgid 155
+#define __NR_getpid 172
+#define __NR_getppid 173
+#define __NR_getpriority 141
+#define __NR_getrandom 278
+#define __NR_getresgid 150
+#define __NR_getresuid 148
+#define __NR_getrlimit 163
+#define __NR_getrusage 165
+#define __NR_getsid 156
+#define __NR_getsockname 204
+#define __NR_getsockopt 209
+#define __NR_gettid 178
+#define __NR_gettimeofday 169
+#define __NR_getuid 174
+#define __NR_getxattr 8
+#define __NR_init_module 105
+#define __NR_inotify_add_watch 27
+#define __NR_inotify_init1 26
+#define __NR_inotify_rm_watch 28
+#define __NR_io_cancel 3
+#define __NR_io_destroy 1
+#define __NR_io_getevents 4
+#define __NR_io_pgetevents 292
+#define __NR_io_setup 0
+#define __NR_io_submit 2
+#define __NR_ioctl 29
+#define __NR_ioprio_get 31
+#define __NR_ioprio_set 30
+#define __NR_kcmp 272
+#define __NR_kexec_file_load 294
+#define __NR_kexec_load 104
+#define __NR_keyctl 219
+#define __NR_kill 129
+#define __NR_lgetxattr 9
+#define __NR_linkat 37
+#define __NR_listen 201
+#define __NR_listxattr 11
+#define __NR_llistxattr 12
+#define __NR_llseek 62
+#define __NR_lookup_dcookie 18
+#define __NR_lremovexattr 15
+#define __NR_lsetxattr 6
+#define __NR_madvise 233
+#define __NR_mbind 235
+#define __NR_membarrier 283
+#define __NR_memfd_create 279
+#define __NR_migrate_pages 238
+#define __NR_mincore 232
+#define __NR_mkdirat 34
+#define __NR_mknodat 33
+#define __NR_mlock 228
+#define __NR_mlock2 284
+#define __NR_mlockall 230
+#define __NR_mmap2 222
+#define __NR_mount 40
+#define __NR_move_pages 239
+#define __NR_mprotect 226
+#define __NR_mq_getsetattr 185
+#define __NR_mq_notify 184
+#define __NR_mq_open 180
+#define __NR_mq_timedreceive 183
+#define __NR_mq_timedsend 182
+#define __NR_mq_unlink 181
+#define __NR_mremap 216
+#define __NR_msgctl 187
+#define __NR_msgget 186
+#define __NR_msgrcv 188
+#define __NR_msgsnd 189
+#define __NR_msync 227
+#define __NR_munlock 229
+#define __NR_munlockall 231
+#define __NR_munmap 215
+#define __NR_name_to_handle_at 264
+#define __NR_nanosleep 101
+#define __NR_nfsservctl 42
+#define __NR_open_by_handle_at 265
+#define __NR_openat 56
+#define __NR_perf_event_open 241
+#define __NR_personality 92
+#define __NR_pipe2 59
+#define __NR_pivot_root 41
+#define __NR_pkey_alloc 289
+#define __NR_pkey_free 290
+#define __NR_pkey_mprotect 288
+#define __NR_ppoll 73
+#define __NR_prctl 167
+#define __NR_pread64 67
+#define __NR_preadv 69
+#define __NR_preadv2 286
+#define __NR_prlimit64 261
+#define __NR_process_vm_readv 270
+#define __NR_process_vm_writev 271
+#define __NR_pselect6 72
+#define __NR_ptrace 117
+#define __NR_pwrite64 68
+#define __NR_pwritev 70
+#define __NR_pwritev2 287
+#define __NR_quotactl 60
+#define __NR_read 63
+#define __NR_readahead 213
+#define __NR_readlinkat 78
+#define __NR_readv 65
+#define __NR_reboot 142
+#define __NR_recvfrom 207
+#define __NR_recvmmsg 243
+#define __NR_recvmsg 212
+#define __NR_remap_file_pages 234
+#define __NR_removexattr 14
+#define __NR_renameat 38
+#define __NR_renameat2 276
+#define __NR_request_key 218
+#define __NR_restart_syscall 128
+#define __NR_rseq 293
+#define __NR_rt_sigaction 134
+#define __NR_rt_sigpending 136
+#define __NR_rt_sigprocmask 135
+#define __NR_rt_sigqueueinfo 138
+#define __NR_rt_sigreturn 139
+#define __NR_rt_sigsuspend 133
+#define __NR_rt_sigtimedwait 137
+#define __NR_rt_tgsigqueueinfo 240
+#define __NR_sched_get_priority_max 125
+#define __NR_sched_get_priority_min 126
+#define __NR_sched_getaffinity 123
+#define __NR_sched_getattr 275
+#define __NR_sched_getparam 121
+#define __NR_sched_getscheduler 120
+#define __NR_sched_rr_get_interval 127
+#define __NR_sched_setaffinity 122
+#define __NR_sched_setattr 274
+#define __NR_sched_setparam 118
+#define __NR_sched_setscheduler 119
+#define __NR_sched_yield 124
+#define __NR_seccomp 277
+#define __NR_semctl 191
+#define __NR_semget 190
+#define __NR_semop 193
+#define __NR_semtimedop 192
+#define __NR_sendfile64 71
+#define __NR_sendmmsg 269
+#define __NR_sendmsg 211
+#define __NR_sendto 206
+#define __NR_set_mempolicy 237
+#define __NR_set_robust_list 99
+#define __NR_set_tid_address 96
+#define __NR_setdomainname 162
+#define __NR_setfsgid 152
+#define __NR_setfsuid 151
+#define __NR_setgid 144
+#define __NR_setgroups 159
+#define __NR_sethostname 161
+#define __NR_setitimer 103
+#define __NR_setns 268
+#define __NR_setpgid 154
+#define __NR_setpriority 140
+#define __NR_setregid 143
+#define __NR_setresgid 149
+#define __NR_setresuid 147
+#define __NR_setreuid 145
+#define __NR_setrlimit 164
+#define __NR_setsid 157
+#define __NR_setsockopt 208
+#define __NR_settimeofday 170
+#define __NR_setuid 146
+#define __NR_setxattr 5
+#define __NR_shmat 196
+#define __NR_shmctl 195
+#define __NR_shmdt 197
+#define __NR_shmget 194
+#define __NR_shutdown 210
+#define __NR_sigaltstack 132
+#define __NR_signalfd4 74
+#define __NR_socket 198
+#define __NR_socketpair 199
+#define __NR_splice 76
+#define __NR_statfs64 43
+#define __NR_statx 291
+#define __NR_swapoff 225
+#define __NR_swapon 224
+#define __NR_symlinkat 36
+#define __NR_sync 81
+#define __NR_sync_file_range 84
+#define __NR_syncfs 267
+#define __NR_sysinfo 179
+#define __NR_syslog 116
+#define __NR_tee 77
+#define __NR_tgkill 131
+#define __NR_timer_create 107
+#define __NR_timer_delete 111
+#define __NR_timer_getoverrun 109
+#define __NR_timer_gettime 108
+#define __NR_timer_settime 110
+#define __NR_timerfd_create 85
+#define __NR_timerfd_gettime 87
+#define __NR_timerfd_settime 86
+#define __NR_times 153
+#define __NR_tkill 130
+#define __NR_truncate64 45
+#define __NR_umask 166
+#define __NR_umount2 39
+#define __NR_uname 160
+#define __NR_unlinkat 35
+#define __NR_unshare 97
+#define __NR_userfaultfd 282
+#define __NR_utimensat 88
+#define __NR_vhangup 58
+#define __NR_vmsplice 75
+#define __NR_wait4 260
+#define __NR_waitid 95
+#define __NR_write 64
+#define __NR_writev 66
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h
new file mode 100644
index 0000000000..50e501b188
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h
@@ -0,0 +1,375 @@
+#define __NR__llseek 140
+#define __NR__newselect 142
+#define __NR__sysctl 149
+#define __NR_accept 330
+#define __NR_accept4 344
+#define __NR_access 33
+#define __NR_acct 51
+#define __NR_add_key 269
+#define __NR_adjtimex 124
+#define __NR_afs_syscall 137
+#define __NR_alarm 27
+#define __NR_bdflush 134
+#define __NR_bind 327
+#define __NR_bpf 361
+#define __NR_break 17
+#define __NR_brk 45
+#define __NR_capget 183
+#define __NR_capset 184
+#define __NR_chdir 12
+#define __NR_chmod 15
+#define __NR_chown 181
+#define __NR_chroot 61
+#define __NR_clock_adjtime 347
+#define __NR_clock_getres 247
+#define __NR_clock_gettime 246
+#define __NR_clock_nanosleep 248
+#define __NR_clock_settime 245
+#define __NR_clone 120
+#define __NR_close 6
+#define __NR_connect 328
+#define __NR_copy_file_range 379
+#define __NR_creat 8
+#define __NR_create_module 127
+#define __NR_delete_module 129
+#define __NR_dup 41
+#define __NR_dup2 63
+#define __NR_dup3 316
+#define __NR_epoll_create 236
+#define __NR_epoll_create1 315
+#define __NR_epoll_ctl 237
+#define __NR_epoll_pwait 303
+#define __NR_epoll_wait 238
+#define __NR_eventfd 307
+#define __NR_eventfd2 314
+#define __NR_execve 11
+#define __NR_execveat 362
+#define __NR_exit 1
+#define __NR_exit_group 234
+#define __NR_faccessat 298
+#define __NR_fadvise64 233
+#define __NR_fadvise64_64 254
+#define __NR_fallocate 309
+#define __NR_fanotify_init 323
+#define __NR_fanotify_mark 324
+#define __NR_fchdir 133
+#define __NR_fchmod 94
+#define __NR_fchmodat 297
+#define __NR_fchown 95
+#define __NR_fchownat 289
+#define __NR_fcntl 55
+#define __NR_fcntl64 204
+#define __NR_fdatasync 148
+#define __NR_fgetxattr 214
+#define __NR_finit_module 353
+#define __NR_flistxattr 217
+#define __NR_flock 143
+#define __NR_fork 2
+#define __NR_fremovexattr 220
+#define __NR_fsetxattr 211
+#define __NR_fstat 108
+#define __NR_fstat64 197
+#define __NR_fstatat64 291
+#define __NR_fstatfs 100
+#define __NR_fstatfs64 253
+#define __NR_fsync 118
+#define __NR_ftime 35
+#define __NR_ftruncate 93
+#define __NR_ftruncate64 194
+#define __NR_futex 221
+#define __NR_futimesat 290
+#define __NR_get_kernel_syms 130
+#define __NR_get_mempolicy 260
+#define __NR_get_robust_list 299
+#define __NR_getcpu 302
+#define __NR_getcwd 182
+#define __NR_getdents 141
+#define __NR_getdents64 202
+#define __NR_getegid 50
+#define __NR_geteuid 49
+#define __NR_getgid 47
+#define __NR_getgroups 80
+#define __NR_getitimer 105
+#define __NR_getpeername 332
+#define __NR_getpgid 132
+#define __NR_getpgrp 65
+#define __NR_getpid 20
+#define __NR_getpmsg 187
+#define __NR_getppid 64
+#define __NR_getpriority 96
+#define __NR_getrandom 359
+#define __NR_getresgid 170
+#define __NR_getresuid 165
+#define __NR_getrlimit 76
+#define __NR_getrusage 77
+#define __NR_getsid 147
+#define __NR_getsockname 331
+#define __NR_getsockopt 340
+#define __NR_gettid 207
+#define __NR_gettimeofday 78
+#define __NR_getuid 24
+#define __NR_getxattr 212
+#define __NR_gtty 32
+#define __NR_idle 112
+#define __NR_init_module 128
+#define __NR_inotify_add_watch 276
+#define __NR_inotify_init 275
+#define __NR_inotify_init1 318
+#define __NR_inotify_rm_watch 277
+#define __NR_io_cancel 231
+#define __NR_io_destroy 228
+#define __NR_io_getevents 229
+#define __NR_io_pgetevents 388
+#define __NR_io_setup 227
+#define __NR_io_submit 230
+#define __NR_ioctl 54
+#define __NR_ioperm 101
+#define __NR_iopl 110
+#define __NR_ioprio_get 274
+#define __NR_ioprio_set 273
+#define __NR_ipc 117
+#define __NR_kcmp 354
+#define __NR_kexec_file_load 382
+#define __NR_kexec_load 268
+#define __NR_keyctl 271
+#define __NR_kill 37
+#define __NR_lchown 16
+#define __NR_lgetxattr 213
+#define __NR_link 9
+#define __NR_linkat 294
+#define __NR_listen 329
+#define __NR_listxattr 215
+#define __NR_llistxattr 216
+#define __NR_lock 53
+#define __NR_lookup_dcookie 235
+#define __NR_lremovexattr 219
+#define __NR_lseek 19
+#define __NR_lsetxattr 210
+#define __NR_lstat 107
+#define __NR_lstat64 196
+#define __NR_madvise 205
+#define __NR_mbind 259
+#define __NR_membarrier 365
+#define __NR_memfd_create 360
+#define __NR_migrate_pages 258
+#define __NR_mincore 206
+#define __NR_mkdir 39
+#define __NR_mkdirat 287
+#define __NR_mknod 14
+#define __NR_mknodat 288
+#define __NR_mlock 150
+#define __NR_mlock2 378
+#define __NR_mlockall 152
+#define __NR_mmap 90
+#define __NR_mmap2 192
+#define __NR_modify_ldt 123
+#define __NR_mount 21
+#define __NR_move_pages 301
+#define __NR_mprotect 125
+#define __NR_mpx 56
+#define __NR_mq_getsetattr 267
+#define __NR_mq_notify 266
+#define __NR_mq_open 262
+#define __NR_mq_timedreceive 265
+#define __NR_mq_timedsend 264
+#define __NR_mq_unlink 263
+#define __NR_mremap 163
+#define __NR_msync 144
+#define __NR_multiplexer 201
+#define __NR_munlock 151
+#define __NR_munlockall 153
+#define __NR_munmap 91
+#define __NR_name_to_handle_at 345
+#define __NR_nanosleep 162
+#define __NR_nfsservctl 168
+#define __NR_nice 34
+#define __NR_oldfstat 28
+#define __NR_oldlstat 84
+#define __NR_oldolduname 59
+#define __NR_oldstat 18
+#define __NR_olduname 109
+#define __NR_open 5
+#define __NR_open_by_handle_at 346
+#define __NR_openat 286
+#define __NR_pause 29
+#define __NR_pciconfig_iobase 200
+#define __NR_pciconfig_read 198
+#define __NR_pciconfig_write 199
+#define __NR_perf_event_open 319
+#define __NR_personality 136
+#define __NR_pipe 42
+#define __NR_pipe2 317
+#define __NR_pivot_root 203
+#define __NR_pkey_alloc 384
+#define __NR_pkey_free 385
+#define __NR_pkey_mprotect 386
+#define __NR_poll 167
+#define __NR_ppoll 281
+#define __NR_prctl 171
+#define __NR_pread64 179
+#define __NR_preadv 320
+#define __NR_preadv2 380
+#define __NR_prlimit64 325
+#define __NR_process_vm_readv 351
+#define __NR_process_vm_writev 352
+#define __NR_prof 44
+#define __NR_profil 98
+#define __NR_pselect6 280
+#define __NR_ptrace 26
+#define __NR_putpmsg 188
+#define __NR_pwrite64 180
+#define __NR_pwritev 321
+#define __NR_pwritev2 381
+#define __NR_query_module 166
+#define __NR_quotactl 131
+#define __NR_read 3
+#define __NR_readahead 191
+#define __NR_readdir 89
+#define __NR_readlink 85
+#define __NR_readlinkat 296
+#define __NR_readv 145
+#define __NR_reboot 88
+#define __NR_recv 336
+#define __NR_recvfrom 337
+#define __NR_recvmmsg 343
+#define __NR_recvmsg 342
+#define __NR_remap_file_pages 239
+#define __NR_removexattr 218
+#define __NR_rename 38
+#define __NR_renameat 293
+#define __NR_renameat2 357
+#define __NR_request_key 270
+#define __NR_restart_syscall 0
+#define __NR_rmdir 40
+#define __NR_rseq 387
+#define __NR_rt_sigaction 173
+#define __NR_rt_sigpending 175
+#define __NR_rt_sigprocmask 174
+#define __NR_rt_sigqueueinfo 177
+#define __NR_rt_sigreturn 172
+#define __NR_rt_sigsuspend 178
+#define __NR_rt_sigtimedwait 176
+#define __NR_rt_tgsigqueueinfo 322
+#define __NR_rtas 255
+#define __NR_sched_get_priority_max 159
+#define __NR_sched_get_priority_min 160
+#define __NR_sched_getaffinity 223
+#define __NR_sched_getattr 356
+#define __NR_sched_getparam 155
+#define __NR_sched_getscheduler 157
+#define __NR_sched_rr_get_interval 161
+#define __NR_sched_setaffinity 222
+#define __NR_sched_setattr 355
+#define __NR_sched_setparam 154
+#define __NR_sched_setscheduler 156
+#define __NR_sched_yield 158
+#define __NR_seccomp 358
+#define __NR_select 82
+#define __NR_send 334
+#define __NR_sendfile 186
+#define __NR_sendfile64 226
+#define __NR_sendmmsg 349
+#define __NR_sendmsg 341
+#define __NR_sendto 335
+#define __NR_set_mempolicy 261
+#define __NR_set_robust_list 300
+#define __NR_set_tid_address 232
+#define __NR_setdomainname 121
+#define __NR_setfsgid 139
+#define __NR_setfsuid 138
+#define __NR_setgid 46
+#define __NR_setgroups 81
+#define __NR_sethostname 74
+#define __NR_setitimer 104
+#define __NR_setns 350
+#define __NR_setpgid 57
+#define __NR_setpriority 97
+#define __NR_setregid 71
+#define __NR_setresgid 169
+#define __NR_setresuid 164
+#define __NR_setreuid 70
+#define __NR_setrlimit 75
+#define __NR_setsid 66
+#define __NR_setsockopt 339
+#define __NR_settimeofday 79
+#define __NR_setuid 23
+#define __NR_setxattr 209
+#define __NR_sgetmask 68
+#define __NR_shutdown 338
+#define __NR_sigaction 67
+#define __NR_sigaltstack 185
+#define __NR_signal 48
+#define __NR_signalfd 305
+#define __NR_signalfd4 313
+#define __NR_sigpending 73
+#define __NR_sigprocmask 126
+#define __NR_sigreturn 119
+#define __NR_sigsuspend 72
+#define __NR_socket 326
+#define __NR_socketcall 102
+#define __NR_socketpair 333
+#define __NR_splice 283
+#define __NR_spu_create 279
+#define __NR_spu_run 278
+#define __NR_ssetmask 69
+#define __NR_stat 106
+#define __NR_stat64 195
+#define __NR_statfs 99
+#define __NR_statfs64 252
+#define __NR_statx 383
+#define __NR_stime 25
+#define __NR_stty 31
+#define __NR_subpage_prot 310
+#define __NR_swapcontext 249
+#define __NR_swapoff 115
+#define __NR_swapon 87
+#define __NR_switch_endian 363
+#define __NR_symlink 83
+#define __NR_symlinkat 295
+#define __NR_sync 36
+#define __NR_sync_file_range2 308
+#define __NR_syncfs 348
+#define __NR_sys_debug_setcontext 256
+#define __NR_sysfs 135
+#define __NR_sysinfo 116
+#define __NR_syslog 103
+#define __NR_tee 284
+#define __NR_tgkill 250
+#define __NR_time 13
+#define __NR_timer_create 240
+#define __NR_timer_delete 244
+#define __NR_timer_getoverrun 243
+#define __NR_timer_gettime 242
+#define __NR_timer_settime 241
+#define __NR_timerfd_create 306
+#define __NR_timerfd_gettime 312
+#define __NR_timerfd_settime 311
+#define __NR_times 43
+#define __NR_tkill 208
+#define __NR_truncate 92
+#define __NR_truncate64 193
+#define __NR_tuxcall 225
+#define __NR_ugetrlimit 190
+#define __NR_ulimit 58
+#define __NR_umask 60
+#define __NR_umount 22
+#define __NR_umount2 52
+#define __NR_uname 122
+#define __NR_unlink 10
+#define __NR_unlinkat 292
+#define __NR_unshare 282
+#define __NR_uselib 86
+#define __NR_userfaultfd 364
+#define __NR_ustat 62
+#define __NR_utime 30
+#define __NR_utimensat 304
+#define __NR_utimes 251
+#define __NR_vfork 189
+#define __NR_vhangup 111
+#define __NR_vm86 113
+#define __NR_vmsplice 285
+#define __NR_wait4 114
+#define __NR_waitid 272
+#define __NR_waitpid 7
+#define __NR_write 4
+#define __NR_writev 146
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h
new file mode 100644
index 0000000000..c2f5a515c6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h
@@ -0,0 +1,366 @@
+#define __NR__llseek 140
+#define __NR__newselect 142
+#define __NR__sysctl 149
+#define __NR_accept 330
+#define __NR_accept4 344
+#define __NR_access 33
+#define __NR_acct 51
+#define __NR_add_key 269
+#define __NR_adjtimex 124
+#define __NR_afs_syscall 137
+#define __NR_alarm 27
+#define __NR_bdflush 134
+#define __NR_bind 327
+#define __NR_bpf 361
+#define __NR_break 17
+#define __NR_brk 45
+#define __NR_capget 183
+#define __NR_capset 184
+#define __NR_chdir 12
+#define __NR_chmod 15
+#define __NR_chown 181
+#define __NR_chroot 61
+#define __NR_clock_adjtime 347
+#define __NR_clock_getres 247
+#define __NR_clock_gettime 246
+#define __NR_clock_nanosleep 248
+#define __NR_clock_settime 245
+#define __NR_clone 120
+#define __NR_close 6
+#define __NR_connect 328
+#define __NR_copy_file_range 379
+#define __NR_creat 8
+#define __NR_create_module 127
+#define __NR_delete_module 129
+#define __NR_dup 41
+#define __NR_dup2 63
+#define __NR_dup3 316
+#define __NR_epoll_create 236
+#define __NR_epoll_create1 315
+#define __NR_epoll_ctl 237
+#define __NR_epoll_pwait 303
+#define __NR_epoll_wait 238
+#define __NR_eventfd 307
+#define __NR_eventfd2 314
+#define __NR_execve 11
+#define __NR_execveat 362
+#define __NR_exit 1
+#define __NR_exit_group 234
+#define __NR_faccessat 298
+#define __NR_fadvise64 233
+#define __NR_fallocate 309
+#define __NR_fanotify_init 323
+#define __NR_fanotify_mark 324
+#define __NR_fchdir 133
+#define __NR_fchmod 94
+#define __NR_fchmodat 297
+#define __NR_fchown 95
+#define __NR_fchownat 289
+#define __NR_fcntl 55
+#define __NR_fdatasync 148
+#define __NR_fgetxattr 214
+#define __NR_finit_module 353
+#define __NR_flistxattr 217
+#define __NR_flock 143
+#define __NR_fork 2
+#define __NR_fremovexattr 220
+#define __NR_fsetxattr 211
+#define __NR_fstat 108
+#define __NR_fstatfs 100
+#define __NR_fstatfs64 253
+#define __NR_fsync 118
+#define __NR_ftime 35
+#define __NR_ftruncate 93
+#define __NR_futex 221
+#define __NR_futimesat 290
+#define __NR_get_kernel_syms 130
+#define __NR_get_mempolicy 260
+#define __NR_get_robust_list 299
+#define __NR_getcpu 302
+#define __NR_getcwd 182
+#define __NR_getdents 141
+#define __NR_getdents64 202
+#define __NR_getegid 50
+#define __NR_geteuid 49
+#define __NR_getgid 47
+#define __NR_getgroups 80
+#define __NR_getitimer 105
+#define __NR_getpeername 332
+#define __NR_getpgid 132
+#define __NR_getpgrp 65
+#define __NR_getpid 20
+#define __NR_getpmsg 187
+#define __NR_getppid 64
+#define __NR_getpriority 96
+#define __NR_getrandom 359
+#define __NR_getresgid 170
+#define __NR_getresuid 165
+#define __NR_getrlimit 76
+#define __NR_getrusage 77
+#define __NR_getsid 147
+#define __NR_getsockname 331
+#define __NR_getsockopt 340
+#define __NR_gettid 207
+#define __NR_gettimeofday 78
+#define __NR_getuid 24
+#define __NR_getxattr 212
+#define __NR_gtty 32
+#define __NR_idle 112
+#define __NR_init_module 128
+#define __NR_inotify_add_watch 276
+#define __NR_inotify_init 275
+#define __NR_inotify_init1 318
+#define __NR_inotify_rm_watch 277
+#define __NR_io_cancel 231
+#define __NR_io_destroy 228
+#define __NR_io_getevents 229
+#define __NR_io_pgetevents 388
+#define __NR_io_setup 227
+#define __NR_io_submit 230
+#define __NR_ioctl 54
+#define __NR_ioperm 101
+#define __NR_iopl 110
+#define __NR_ioprio_get 274
+#define __NR_ioprio_set 273
+#define __NR_ipc 117
+#define __NR_kcmp 354
+#define __NR_kexec_file_load 382
+#define __NR_kexec_load 268
+#define __NR_keyctl 271
+#define __NR_kill 37
+#define __NR_lchown 16
+#define __NR_lgetxattr 213
+#define __NR_link 9
+#define __NR_linkat 294
+#define __NR_listen 329
+#define __NR_listxattr 215
+#define __NR_llistxattr 216
+#define __NR_lock 53
+#define __NR_lookup_dcookie 235
+#define __NR_lremovexattr 219
+#define __NR_lseek 19
+#define __NR_lsetxattr 210
+#define __NR_lstat 107
+#define __NR_madvise 205
+#define __NR_mbind 259
+#define __NR_membarrier 365
+#define __NR_memfd_create 360
+#define __NR_migrate_pages 258
+#define __NR_mincore 206
+#define __NR_mkdir 39
+#define __NR_mkdirat 287
+#define __NR_mknod 14
+#define __NR_mknodat 288
+#define __NR_mlock 150
+#define __NR_mlock2 378
+#define __NR_mlockall 152
+#define __NR_mmap 90
+#define __NR_modify_ldt 123
+#define __NR_mount 21
+#define __NR_move_pages 301
+#define __NR_mprotect 125
+#define __NR_mpx 56
+#define __NR_mq_getsetattr 267
+#define __NR_mq_notify 266
+#define __NR_mq_open 262
+#define __NR_mq_timedreceive 265
+#define __NR_mq_timedsend 264
+#define __NR_mq_unlink 263
+#define __NR_mremap 163
+#define __NR_msync 144
+#define __NR_multiplexer 201
+#define __NR_munlock 151
+#define __NR_munlockall 153
+#define __NR_munmap 91
+#define __NR_name_to_handle_at 345
+#define __NR_nanosleep 162
+#define __NR_newfstatat 291
+#define __NR_nfsservctl 168
+#define __NR_nice 34
+#define __NR_oldfstat 28
+#define __NR_oldlstat 84
+#define __NR_oldolduname 59
+#define __NR_oldstat 18
+#define __NR_olduname 109
+#define __NR_open 5
+#define __NR_open_by_handle_at 346
+#define __NR_openat 286
+#define __NR_pause 29
+#define __NR_pciconfig_iobase 200
+#define __NR_pciconfig_read 198
+#define __NR_pciconfig_write 199
+#define __NR_perf_event_open 319
+#define __NR_personality 136
+#define __NR_pipe 42
+#define __NR_pipe2 317
+#define __NR_pivot_root 203
+#define __NR_pkey_alloc 384
+#define __NR_pkey_free 385
+#define __NR_pkey_mprotect 386
+#define __NR_poll 167
+#define __NR_ppoll 281
+#define __NR_prctl 171
+#define __NR_pread64 179
+#define __NR_preadv 320
+#define __NR_preadv2 380
+#define __NR_prlimit64 325
+#define __NR_process_vm_readv 351
+#define __NR_process_vm_writev 352
+#define __NR_prof 44
+#define __NR_profil 98
+#define __NR_pselect6 280
+#define __NR_ptrace 26
+#define __NR_putpmsg 188
+#define __NR_pwrite64 180
+#define __NR_pwritev 321
+#define __NR_pwritev2 381
+#define __NR_query_module 166
+#define __NR_quotactl 131
+#define __NR_read 3
+#define __NR_readahead 191
+#define __NR_readdir 89
+#define __NR_readlink 85
+#define __NR_readlinkat 296
+#define __NR_readv 145
+#define __NR_reboot 88
+#define __NR_recv 336
+#define __NR_recvfrom 337
+#define __NR_recvmmsg 343
+#define __NR_recvmsg 342
+#define __NR_remap_file_pages 239
+#define __NR_removexattr 218
+#define __NR_rename 38
+#define __NR_renameat 293
+#define __NR_renameat2 357
+#define __NR_request_key 270
+#define __NR_restart_syscall 0
+#define __NR_rmdir 40
+#define __NR_rseq 387
+#define __NR_rt_sigaction 173
+#define __NR_rt_sigpending 175
+#define __NR_rt_sigprocmask 174
+#define __NR_rt_sigqueueinfo 177
+#define __NR_rt_sigreturn 172
+#define __NR_rt_sigsuspend 178
+#define __NR_rt_sigtimedwait 176
+#define __NR_rt_tgsigqueueinfo 322
+#define __NR_rtas 255
+#define __NR_sched_get_priority_max 159
+#define __NR_sched_get_priority_min 160
+#define __NR_sched_getaffinity 223
+#define __NR_sched_getattr 356
+#define __NR_sched_getparam 155
+#define __NR_sched_getscheduler 157
+#define __NR_sched_rr_get_interval 161
+#define __NR_sched_setaffinity 222
+#define __NR_sched_setattr 355
+#define __NR_sched_setparam 154
+#define __NR_sched_setscheduler 156
+#define __NR_sched_yield 158
+#define __NR_seccomp 358
+#define __NR_select 82
+#define __NR_send 334
+#define __NR_sendfile 186
+#define __NR_sendmmsg 349
+#define __NR_sendmsg 341
+#define __NR_sendto 335
+#define __NR_set_mempolicy 261
+#define __NR_set_robust_list 300
+#define __NR_set_tid_address 232
+#define __NR_setdomainname 121
+#define __NR_setfsgid 139
+#define __NR_setfsuid 138
+#define __NR_setgid 46
+#define __NR_setgroups 81
+#define __NR_sethostname 74
+#define __NR_setitimer 104
+#define __NR_setns 350
+#define __NR_setpgid 57
+#define __NR_setpriority 97
+#define __NR_setregid 71
+#define __NR_setresgid 169
+#define __NR_setresuid 164
+#define __NR_setreuid 70
+#define __NR_setrlimit 75
+#define __NR_setsid 66
+#define __NR_setsockopt 339
+#define __NR_settimeofday 79
+#define __NR_setuid 23
+#define __NR_setxattr 209
+#define __NR_sgetmask 68
+#define __NR_shutdown 338
+#define __NR_sigaction 67
+#define __NR_sigaltstack 185
+#define __NR_signal 48
+#define __NR_signalfd 305
+#define __NR_signalfd4 313
+#define __NR_sigpending 73
+#define __NR_sigprocmask 126
+#define __NR_sigreturn 119
+#define __NR_sigsuspend 72
+#define __NR_socket 326
+#define __NR_socketcall 102
+#define __NR_socketpair 333
+#define __NR_splice 283
+#define __NR_spu_create 279
+#define __NR_spu_run 278
+#define __NR_ssetmask 69
+#define __NR_stat 106
+#define __NR_statfs 99
+#define __NR_statfs64 252
+#define __NR_statx 383
+#define __NR_stime 25
+#define __NR_stty 31
+#define __NR_subpage_prot 310
+#define __NR_swapcontext 249
+#define __NR_swapoff 115
+#define __NR_swapon 87
+#define __NR_switch_endian 363
+#define __NR_symlink 83
+#define __NR_symlinkat 295
+#define __NR_sync 36
+#define __NR_sync_file_range2 308
+#define __NR_syncfs 348
+#define __NR_sys_debug_setcontext 256
+#define __NR_sysfs 135
+#define __NR_sysinfo 116
+#define __NR_syslog 103
+#define __NR_tee 284
+#define __NR_tgkill 250
+#define __NR_time 13
+#define __NR_timer_create 240
+#define __NR_timer_delete 244
+#define __NR_timer_getoverrun 243
+#define __NR_timer_gettime 242
+#define __NR_timer_settime 241
+#define __NR_timerfd_create 306
+#define __NR_timerfd_gettime 312
+#define __NR_timerfd_settime 311
+#define __NR_times 43
+#define __NR_tkill 208
+#define __NR_truncate 92
+#define __NR_tuxcall 225
+#define __NR_ugetrlimit 190
+#define __NR_ulimit 58
+#define __NR_umask 60
+#define __NR_umount 22
+#define __NR_umount2 52
+#define __NR_uname 122
+#define __NR_unlink 10
+#define __NR_unlinkat 292
+#define __NR_unshare 282
+#define __NR_uselib 86
+#define __NR_userfaultfd 364
+#define __NR_ustat 62
+#define __NR_utime 30
+#define __NR_utimensat 304
+#define __NR_utimes 251
+#define __NR_vfork 189
+#define __NR_vhangup 111
+#define __NR_vm86 113
+#define __NR_vmsplice 285
+#define __NR_wait4 114
+#define __NR_waitid 272
+#define __NR_waitpid 7
+#define __NR_write 4
+#define __NR_writev 146
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h
new file mode 100644
index 0000000000..633586de37
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h
@@ -0,0 +1,279 @@
+#define __NR_accept 202
+#define __NR_accept4 242
+#define __NR_acct 89
+#define __NR_add_key 217
+#define __NR_adjtimex 171
+#define __NR_bind 200
+#define __NR_bpf 280
+#define __NR_brk 214
+#define __NR_capget 90
+#define __NR_capset 91
+#define __NR_chdir 49
+#define __NR_chroot 51
+#define __NR_clock_adjtime 266
+#define __NR_clock_getres 114
+#define __NR_clock_gettime 113
+#define __NR_clock_nanosleep 115
+#define __NR_clock_settime 112
+#define __NR_clone 220
+#define __NR_close 57
+#define __NR_connect 203
+#define __NR_copy_file_range 285
+#define __NR_delete_module 106
+#define __NR_dup 23
+#define __NR_dup3 24
+#define __NR_epoll_create1 20
+#define __NR_epoll_ctl 21
+#define __NR_epoll_pwait 22
+#define __NR_eventfd2 19
+#define __NR_execve 221
+#define __NR_execveat 281
+#define __NR_exit 93
+#define __NR_exit_group 94
+#define __NR_faccessat 48
+#define __NR_fadvise64 223
+#define __NR_fallocate 47
+#define __NR_fanotify_init 262
+#define __NR_fanotify_mark 263
+#define __NR_fchdir 50
+#define __NR_fchmod 52
+#define __NR_fchmodat 53
+#define __NR_fchown 55
+#define __NR_fchownat 54
+#define __NR_fcntl 25
+#define __NR_fdatasync 83
+#define __NR_fgetxattr 10
+#define __NR_finit_module 273
+#define __NR_flistxattr 13
+#define __NR_flock 32
+#define __NR_fremovexattr 16
+#define __NR_fsetxattr 7
+#define __NR_fstat 80
+#define __NR_fstatfs 44
+#define __NR_fsync 82
+#define __NR_ftruncate 46
+#define __NR_futex 98
+#define __NR_get_mempolicy 236
+#define __NR_get_robust_list 100
+#define __NR_getcpu 168
+#define __NR_getcwd 17
+#define __NR_getdents64 61
+#define __NR_getegid 177
+#define __NR_geteuid 175
+#define __NR_getgid 176
+#define __NR_getgroups 158
+#define __NR_getitimer 102
+#define __NR_getpeername 205
+#define __NR_getpgid 155
+#define __NR_getpid 172
+#define __NR_getppid 173
+#define __NR_getpriority 141
+#define __NR_getrandom 278
+#define __NR_getresgid 150
+#define __NR_getresuid 148
+#define __NR_getrlimit 163
+#define __NR_getrusage 165
+#define __NR_getsid 156
+#define __NR_getsockname 204
+#define __NR_getsockopt 209
+#define __NR_gettid 178
+#define __NR_gettimeofday 169
+#define __NR_getuid 174
+#define __NR_getxattr 8
+#define __NR_init_module 105
+#define __NR_inotify_add_watch 27
+#define __NR_inotify_init1 26
+#define __NR_inotify_rm_watch 28
+#define __NR_io_cancel 3
+#define __NR_io_destroy 1
+#define __NR_io_getevents 4
+#define __NR_io_pgetevents 292
+#define __NR_io_setup 0
+#define __NR_io_submit 2
+#define __NR_ioctl 29
+#define __NR_ioprio_get 31
+#define __NR_ioprio_set 30
+#define __NR_kcmp 272
+#define __NR_kexec_file_load 294
+#define __NR_kexec_load 104
+#define __NR_keyctl 219
+#define __NR_kill 129
+#define __NR_lgetxattr 9
+#define __NR_linkat 37
+#define __NR_listen 201
+#define __NR_listxattr 11
+#define __NR_llistxattr 12
+#define __NR_lookup_dcookie 18
+#define __NR_lremovexattr 15
+#define __NR_lseek 62
+#define __NR_lsetxattr 6
+#define __NR_madvise 233
+#define __NR_mbind 235
+#define __NR_membarrier 283
+#define __NR_memfd_create 279
+#define __NR_migrate_pages 238
+#define __NR_mincore 232
+#define __NR_mkdirat 34
+#define __NR_mknodat 33
+#define __NR_mlock 228
+#define __NR_mlock2 284
+#define __NR_mlockall 230
+#define __NR_mmap 222
+#define __NR_mount 40
+#define __NR_move_pages 239
+#define __NR_mprotect 226
+#define __NR_mq_getsetattr 185
+#define __NR_mq_notify 184
+#define __NR_mq_open 180
+#define __NR_mq_timedreceive 183
+#define __NR_mq_timedsend 182
+#define __NR_mq_unlink 181
+#define __NR_mremap 216
+#define __NR_msgctl 187
+#define __NR_msgget 186
+#define __NR_msgrcv 188
+#define __NR_msgsnd 189
+#define __NR_msync 227
+#define __NR_munlock 229
+#define __NR_munlockall 231
+#define __NR_munmap 215
+#define __NR_name_to_handle_at 264
+#define __NR_nanosleep 101
+#define __NR_newfstatat 79
+#define __NR_nfsservctl 42
+#define __NR_open_by_handle_at 265
+#define __NR_openat 56
+#define __NR_perf_event_open 241
+#define __NR_personality 92
+#define __NR_pipe2 59
+#define __NR_pivot_root 41
+#define __NR_pkey_alloc 289
+#define __NR_pkey_free 290
+#define __NR_pkey_mprotect 288
+#define __NR_ppoll 73
+#define __NR_prctl 167
+#define __NR_pread64 67
+#define __NR_preadv 69
+#define __NR_preadv2 286
+#define __NR_prlimit64 261
+#define __NR_process_vm_readv 270
+#define __NR_process_vm_writev 271
+#define __NR_pselect6 72
+#define __NR_ptrace 117
+#define __NR_pwrite64 68
+#define __NR_pwritev 70
+#define __NR_pwritev2 287
+#define __NR_quotactl 60
+#define __NR_read 63
+#define __NR_readahead 213
+#define __NR_readlinkat 78
+#define __NR_readv 65
+#define __NR_reboot 142
+#define __NR_recvfrom 207
+#define __NR_recvmmsg 243
+#define __NR_recvmsg 212
+#define __NR_remap_file_pages 234
+#define __NR_removexattr 14
+#define __NR_renameat2 276
+#define __NR_request_key 218
+#define __NR_restart_syscall 128
+#define __NR_riscv_flush_icache 259
+#define __NR_rseq 293
+#define __NR_rt_sigaction 134
+#define __NR_rt_sigpending 136
+#define __NR_rt_sigprocmask 135
+#define __NR_rt_sigqueueinfo 138
+#define __NR_rt_sigreturn 139
+#define __NR_rt_sigsuspend 133
+#define __NR_rt_sigtimedwait 137
+#define __NR_rt_tgsigqueueinfo 240
+#define __NR_sched_get_priority_max 125
+#define __NR_sched_get_priority_min 126
+#define __NR_sched_getaffinity 123
+#define __NR_sched_getattr 275
+#define __NR_sched_getparam 121
+#define __NR_sched_getscheduler 120
+#define __NR_sched_rr_get_interval 127
+#define __NR_sched_setaffinity 122
+#define __NR_sched_setattr 274
+#define __NR_sched_setparam 118
+#define __NR_sched_setscheduler 119
+#define __NR_sched_yield 124
+#define __NR_seccomp 277
+#define __NR_semctl 191
+#define __NR_semget 190
+#define __NR_semop 193
+#define __NR_semtimedop 192
+#define __NR_sendfile 71
+#define __NR_sendmmsg 269
+#define __NR_sendmsg 211
+#define __NR_sendto 206
+#define __NR_set_mempolicy 237
+#define __NR_set_robust_list 99
+#define __NR_set_tid_address 96
+#define __NR_setdomainname 162
+#define __NR_setfsgid 152
+#define __NR_setfsuid 151
+#define __NR_setgid 144
+#define __NR_setgroups 159
+#define __NR_sethostname 161
+#define __NR_setitimer 103
+#define __NR_setns 268
+#define __NR_setpgid 154
+#define __NR_setpriority 140
+#define __NR_setregid 143
+#define __NR_setresgid 149
+#define __NR_setresuid 147
+#define __NR_setreuid 145
+#define __NR_setrlimit 164
+#define __NR_setsid 157
+#define __NR_setsockopt 208
+#define __NR_settimeofday 170
+#define __NR_setuid 146
+#define __NR_setxattr 5
+#define __NR_shmat 196
+#define __NR_shmctl 195
+#define __NR_shmdt 197
+#define __NR_shmget 194
+#define __NR_shutdown 210
+#define __NR_sigaltstack 132
+#define __NR_signalfd4 74
+#define __NR_socket 198
+#define __NR_socketpair 199
+#define __NR_splice 76
+#define __NR_statfs 43
+#define __NR_statx 291
+#define __NR_swapoff 225
+#define __NR_swapon 224
+#define __NR_symlinkat 36
+#define __NR_sync 81
+#define __NR_sync_file_range 84
+#define __NR_syncfs 267
+#define __NR_sysinfo 179
+#define __NR_syslog 116
+#define __NR_tee 77
+#define __NR_tgkill 131
+#define __NR_timer_create 107
+#define __NR_timer_delete 111
+#define __NR_timer_getoverrun 109
+#define __NR_timer_gettime 108
+#define __NR_timer_settime 110
+#define __NR_timerfd_create 85
+#define __NR_timerfd_gettime 87
+#define __NR_timerfd_settime 86
+#define __NR_times 153
+#define __NR_tkill 130
+#define __NR_truncate 45
+#define __NR_umask 166
+#define __NR_umount2 39
+#define __NR_uname 160
+#define __NR_unlinkat 35
+#define __NR_unshare 97
+#define __NR_userfaultfd 282
+#define __NR_utimensat 88
+#define __NR_vhangup 58
+#define __NR_vmsplice 75
+#define __NR_wait4 260
+#define __NR_waitid 95
+#define __NR_write 64
+#define __NR_writev 66
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h b/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h
new file mode 100644
index 0000000000..a372537b1d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h
@@ -0,0 +1,361 @@
+#define __NR__llseek 140
+#define __NR__newselect 142
+#define __NR__sysctl 149
+#define __NR_accept4 364
+#define __NR_access 33
+#define __NR_acct 51
+#define __NR_add_key 278
+#define __NR_adjtimex 124
+#define __NR_afs_syscall 137
+#define __NR_alarm 27
+#define __NR_bdflush 134
+#define __NR_bind 361
+#define __NR_bpf 351
+#define __NR_brk 45
+#define __NR_capget 184
+#define __NR_capset 185
+#define __NR_chdir 12
+#define __NR_chmod 15
+#define __NR_chown 182
+#define __NR_chown32 212
+#define __NR_chroot 61
+#define __NR_clock_adjtime 337
+#define __NR_clock_getres 261
+#define __NR_clock_gettime 260
+#define __NR_clock_nanosleep 262
+#define __NR_clock_settime 259
+#define __NR_clone 120
+#define __NR_close 6
+#define __NR_connect 362
+#define __NR_copy_file_range 375
+#define __NR_creat 8
+#define __NR_create_module 127
+#define __NR_delete_module 129
+#define __NR_dup 41
+#define __NR_dup2 63
+#define __NR_dup3 326
+#define __NR_epoll_create 249
+#define __NR_epoll_create1 327
+#define __NR_epoll_ctl 250
+#define __NR_epoll_pwait 312
+#define __NR_epoll_wait 251
+#define __NR_eventfd 318
+#define __NR_eventfd2 323
+#define __NR_execve 11
+#define __NR_execveat 354
+#define __NR_exit 1
+#define __NR_exit_group 248
+#define __NR_faccessat 300
+#define __NR_fadvise64 253
+#define __NR_fadvise64_64 264
+#define __NR_fallocate 314
+#define __NR_fanotify_init 332
+#define __NR_fanotify_mark 333
+#define __NR_fchdir 133
+#define __NR_fchmod 94
+#define __NR_fchmodat 299
+#define __NR_fchown 95
+#define __NR_fchown32 207
+#define __NR_fchownat 291
+#define __NR_fcntl 55
+#define __NR_fcntl64 221
+#define __NR_fdatasync 148
+#define __NR_fgetxattr 229
+#define __NR_finit_module 344
+#define __NR_flistxattr 232
+#define __NR_flock 143
+#define __NR_fork 2
+#define __NR_fremovexattr 235
+#define __NR_fsetxattr 226
+#define __NR_fstat 108
+#define __NR_fstat64 197
+#define __NR_fstatat64 293
+#define __NR_fstatfs 100
+#define __NR_fstatfs64 266
+#define __NR_fsync 118
+#define __NR_ftruncate 93
+#define __NR_ftruncate64 194
+#define __NR_futex 238
+#define __NR_futimesat 292
+#define __NR_get_kernel_syms 130
+#define __NR_get_mempolicy 269
+#define __NR_get_robust_list 305
+#define __NR_getcpu 311
+#define __NR_getcwd 183
+#define __NR_getdents 141
+#define __NR_getdents64 220
+#define __NR_getegid 50
+#define __NR_getegid32 202
+#define __NR_geteuid 49
+#define __NR_geteuid32 201
+#define __NR_getgid 47
+#define __NR_getgid32 200
+#define __NR_getgroups 80
+#define __NR_getgroups32 205
+#define __NR_getitimer 105
+#define __NR_getpeername 368
+#define __NR_getpgid 132
+#define __NR_getpgrp 65
+#define __NR_getpid 20
+#define __NR_getpmsg 188
+#define __NR_getppid 64
+#define __NR_getpriority 96
+#define __NR_getrandom 349
+#define __NR_getresgid 171
+#define __NR_getresgid32 211
+#define __NR_getresuid 165
+#define __NR_getresuid32 209
+#define __NR_getrlimit 76
+#define __NR_getrusage 77
+#define __NR_getsid 147
+#define __NR_getsockname 367
+#define __NR_getsockopt 365
+#define __NR_gettid 236
+#define __NR_gettimeofday 78
+#define __NR_getuid 24
+#define __NR_getuid32 199
+#define __NR_getxattr 227
+#define __NR_idle 112
+#define __NR_init_module 128
+#define __NR_inotify_add_watch 285
+#define __NR_inotify_init 284
+#define __NR_inotify_init1 324
+#define __NR_inotify_rm_watch 286
+#define __NR_io_cancel 247
+#define __NR_io_destroy 244
+#define __NR_io_getevents 245
+#define __NR_io_pgetevents 382
+#define __NR_io_setup 243
+#define __NR_io_submit 246
+#define __NR_ioctl 54
+#define __NR_ioperm 101
+#define __NR_ioprio_get 283
+#define __NR_ioprio_set 282
+#define __NR_ipc 117
+#define __NR_kcmp 343
+#define __NR_kexec_file_load 381
+#define __NR_kexec_load 277
+#define __NR_keyctl 280
+#define __NR_kill 37
+#define __NR_lchown 16
+#define __NR_lchown32 198
+#define __NR_lgetxattr 228
+#define __NR_link 9
+#define __NR_linkat 296
+#define __NR_listen 363
+#define __NR_listxattr 230
+#define __NR_llistxattr 231
+#define __NR_lookup_dcookie 110
+#define __NR_lremovexattr 234
+#define __NR_lseek 19
+#define __NR_lsetxattr 225
+#define __NR_lstat 107
+#define __NR_lstat64 196
+#define __NR_madvise 219
+#define __NR_mbind 268
+#define __NR_membarrier 356
+#define __NR_memfd_create 350
+#define __NR_migrate_pages 287
+#define __NR_mincore 218
+#define __NR_mkdir 39
+#define __NR_mkdirat 289
+#define __NR_mknod 14
+#define __NR_mknodat 290
+#define __NR_mlock 150
+#define __NR_mlock2 374
+#define __NR_mlockall 152
+#define __NR_mmap 90
+#define __NR_mmap2 192
+#define __NR_mount 21
+#define __NR_move_pages 310
+#define __NR_mprotect 125
+#define __NR_mq_getsetattr 276
+#define __NR_mq_notify 275
+#define __NR_mq_open 271
+#define __NR_mq_timedreceive 274
+#define __NR_mq_timedsend 273
+#define __NR_mq_unlink 272
+#define __NR_mremap 163
+#define __NR_msync 144
+#define __NR_munlock 151
+#define __NR_munlockall 153
+#define __NR_munmap 91
+#define __NR_name_to_handle_at 335
+#define __NR_nanosleep 162
+#define __NR_nfsservctl 169
+#define __NR_nice 34
+#define __NR_open 5
+#define __NR_open_by_handle_at 336
+#define __NR_openat 288
+#define __NR_pause 29
+#define __NR_perf_event_open 331
+#define __NR_personality 136
+#define __NR_pipe 42
+#define __NR_pipe2 325
+#define __NR_pivot_root 217
+#define __NR_poll 168
+#define __NR_ppoll 302
+#define __NR_prctl 172
+#define __NR_pread64 180
+#define __NR_preadv 328
+#define __NR_preadv2 376
+#define __NR_prlimit64 334
+#define __NR_process_vm_readv 340
+#define __NR_process_vm_writev 341
+#define __NR_pselect6 301
+#define __NR_ptrace 26
+#define __NR_putpmsg 189
+#define __NR_pwrite64 181
+#define __NR_pwritev 329
+#define __NR_pwritev2 377
+#define __NR_query_module 167
+#define __NR_quotactl 131
+#define __NR_read 3
+#define __NR_readahead 222
+#define __NR_readdir 89
+#define __NR_readlink 85
+#define __NR_readlinkat 298
+#define __NR_readv 145
+#define __NR_reboot 88
+#define __NR_recvfrom 371
+#define __NR_recvmmsg 357
+#define __NR_recvmsg 372
+#define __NR_remap_file_pages 267
+#define __NR_removexattr 233
+#define __NR_rename 38
+#define __NR_renameat 295
+#define __NR_renameat2 347
+#define __NR_request_key 279
+#define __NR_restart_syscall 7
+#define __NR_rmdir 40
+#define __NR_rseq 383
+#define __NR_rt_sigaction 174
+#define __NR_rt_sigpending 176
+#define __NR_rt_sigprocmask 175
+#define __NR_rt_sigqueueinfo 178
+#define __NR_rt_sigreturn 173
+#define __NR_rt_sigsuspend 179
+#define __NR_rt_sigtimedwait 177
+#define __NR_rt_tgsigqueueinfo 330
+#define __NR_s390_guarded_storage 378
+#define __NR_s390_pci_mmio_read 353
+#define __NR_s390_pci_mmio_write 352
+#define __NR_s390_runtime_instr 342
+#define __NR_s390_sthyi 380
+#define __NR_sched_get_priority_max 159
+#define __NR_sched_get_priority_min 160
+#define __NR_sched_getaffinity 240
+#define __NR_sched_getattr 346
+#define __NR_sched_getparam 155
+#define __NR_sched_getscheduler 157
+#define __NR_sched_rr_get_interval 161
+#define __NR_sched_setaffinity 239
+#define __NR_sched_setattr 345
+#define __NR_sched_setparam 154
+#define __NR_sched_setscheduler 156
+#define __NR_sched_yield 158
+#define __NR_seccomp 348
+#define __NR_sendfile 187
+#define __NR_sendfile64 223
+#define __NR_sendmmsg 358
+#define __NR_sendmsg 370
+#define __NR_sendto 369
+#define __NR_set_mempolicy 270
+#define __NR_set_robust_list 304
+#define __NR_set_tid_address 252
+#define __NR_setdomainname 121
+#define __NR_setfsgid 139
+#define __NR_setfsgid32 216
+#define __NR_setfsuid 138
+#define __NR_setfsuid32 215
+#define __NR_setgid 46
+#define __NR_setgid32 214
+#define __NR_setgroups 81
+#define __NR_setgroups32 206
+#define __NR_sethostname 74
+#define __NR_setitimer 104
+#define __NR_setns 339
+#define __NR_setpgid 57
+#define __NR_setpriority 97
+#define __NR_setregid 71
+#define __NR_setregid32 204
+#define __NR_setresgid 170
+#define __NR_setresgid32 210
+#define __NR_setresuid 164
+#define __NR_setresuid32 208
+#define __NR_setreuid 70
+#define __NR_setreuid32 203
+#define __NR_setrlimit 75
+#define __NR_setsid 66
+#define __NR_setsockopt 366
+#define __NR_settimeofday 79
+#define __NR_setuid 23
+#define __NR_setuid32 213
+#define __NR_setxattr 224
+#define __NR_shutdown 373
+#define __NR_sigaction 67
+#define __NR_sigaltstack 186
+#define __NR_signal 48
+#define __NR_signalfd 316
+#define __NR_signalfd4 322
+#define __NR_sigpending 73
+#define __NR_sigprocmask 126
+#define __NR_sigreturn 119
+#define __NR_sigsuspend 72
+#define __NR_socket 359
+#define __NR_socketcall 102
+#define __NR_socketpair 360
+#define __NR_splice 306
+#define __NR_stat 106
+#define __NR_stat64 195
+#define __NR_statfs 99
+#define __NR_statfs64 265
+#define __NR_statx 379
+#define __NR_stime 25
+#define __NR_swapoff 115
+#define __NR_swapon 87
+#define __NR_symlink 83
+#define __NR_symlinkat 297
+#define __NR_sync 36
+#define __NR_sync_file_range 307
+#define __NR_syncfs 338
+#define __NR_sysfs 135
+#define __NR_sysinfo 116
+#define __NR_syslog 103
+#define __NR_tee 308
+#define __NR_tgkill 241
+#define __NR_time 13
+#define __NR_timer_create 254
+#define __NR_timer_delete 258
+#define __NR_timer_getoverrun 257
+#define __NR_timer_gettime 256
+#define __NR_timer_settime 255
+#define __NR_timerfd 317
+#define __NR_timerfd_create 319
+#define __NR_timerfd_gettime 321
+#define __NR_timerfd_settime 320
+#define __NR_times 43
+#define __NR_tkill 237
+#define __NR_truncate 92
+#define __NR_truncate64 193
+#define __NR_ugetrlimit 191
+#define __NR_umask 60
+#define __NR_umount 22
+#define __NR_umount2 52
+#define __NR_uname 122
+#define __NR_unlink 10
+#define __NR_unlinkat 294
+#define __NR_unshare 303
+#define __NR_uselib 86
+#define __NR_userfaultfd 355
+#define __NR_ustat 62
+#define __NR_utime 30
+#define __NR_utimensat 315
+#define __NR_utimes 313
+#define __NR_vfork 190
+#define __NR_vhangup 111
+#define __NR_vmsplice 309
+#define __NR_wait4 114
+#define __NR_waitid 281
+#define __NR_write 4
+#define __NR_writev 146
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h b/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h
new file mode 100644
index 0000000000..338eb5a43e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h
@@ -0,0 +1,328 @@
+#define __NR__sysctl 149
+#define __NR_accept4 364
+#define __NR_access 33
+#define __NR_acct 51
+#define __NR_add_key 278
+#define __NR_adjtimex 124
+#define __NR_afs_syscall 137
+#define __NR_alarm 27
+#define __NR_bdflush 134
+#define __NR_bind 361
+#define __NR_bpf 351
+#define __NR_brk 45
+#define __NR_capget 184
+#define __NR_capset 185
+#define __NR_chdir 12
+#define __NR_chmod 15
+#define __NR_chown 212
+#define __NR_chroot 61
+#define __NR_clock_adjtime 337
+#define __NR_clock_getres 261
+#define __NR_clock_gettime 260
+#define __NR_clock_nanosleep 262
+#define __NR_clock_settime 259
+#define __NR_clone 120
+#define __NR_close 6
+#define __NR_connect 362
+#define __NR_copy_file_range 375
+#define __NR_creat 8
+#define __NR_create_module 127
+#define __NR_delete_module 129
+#define __NR_dup 41
+#define __NR_dup2 63
+#define __NR_dup3 326
+#define __NR_epoll_create 249
+#define __NR_epoll_create1 327
+#define __NR_epoll_ctl 250
+#define __NR_epoll_pwait 312
+#define __NR_epoll_wait 251
+#define __NR_eventfd 318
+#define __NR_eventfd2 323
+#define __NR_execve 11
+#define __NR_execveat 354
+#define __NR_exit 1
+#define __NR_exit_group 248
+#define __NR_faccessat 300
+#define __NR_fadvise64 253
+#define __NR_fallocate 314
+#define __NR_fanotify_init 332
+#define __NR_fanotify_mark 333
+#define __NR_fchdir 133
+#define __NR_fchmod 94
+#define __NR_fchmodat 299
+#define __NR_fchown 207
+#define __NR_fchownat 291
+#define __NR_fcntl 55
+#define __NR_fdatasync 148
+#define __NR_fgetxattr 229
+#define __NR_finit_module 344
+#define __NR_flistxattr 232
+#define __NR_flock 143
+#define __NR_fork 2
+#define __NR_fremovexattr 235
+#define __NR_fsetxattr 226
+#define __NR_fstat 108
+#define __NR_fstatfs 100
+#define __NR_fstatfs64 266
+#define __NR_fsync 118
+#define __NR_ftruncate 93
+#define __NR_futex 238
+#define __NR_futimesat 292
+#define __NR_get_kernel_syms 130
+#define __NR_get_mempolicy 269
+#define __NR_get_robust_list 305
+#define __NR_getcpu 311
+#define __NR_getcwd 183
+#define __NR_getdents 141
+#define __NR_getdents64 220
+#define __NR_getegid 202
+#define __NR_geteuid 201
+#define __NR_getgid 200
+#define __NR_getgroups 205
+#define __NR_getitimer 105
+#define __NR_getpeername 368
+#define __NR_getpgid 132
+#define __NR_getpgrp 65
+#define __NR_getpid 20
+#define __NR_getpmsg 188
+#define __NR_getppid 64
+#define __NR_getpriority 96
+#define __NR_getrandom 349
+#define __NR_getresgid 211
+#define __NR_getresuid 209
+#define __NR_getrlimit 191
+#define __NR_getrusage 77
+#define __NR_getsid 147
+#define __NR_getsockname 367
+#define __NR_getsockopt 365
+#define __NR_gettid 236
+#define __NR_gettimeofday 78
+#define __NR_getuid 199
+#define __NR_getxattr 227
+#define __NR_idle 112
+#define __NR_init_module 128
+#define __NR_inotify_add_watch 285
+#define __NR_inotify_init 284
+#define __NR_inotify_init1 324
+#define __NR_inotify_rm_watch 286
+#define __NR_io_cancel 247
+#define __NR_io_destroy 244
+#define __NR_io_getevents 245
+#define __NR_io_pgetevents 382
+#define __NR_io_setup 243
+#define __NR_io_submit 246
+#define __NR_ioctl 54
+#define __NR_ioprio_get 283
+#define __NR_ioprio_set 282
+#define __NR_ipc 117
+#define __NR_kcmp 343
+#define __NR_kexec_file_load 381
+#define __NR_kexec_load 277
+#define __NR_keyctl 280
+#define __NR_kill 37
+#define __NR_lchown 198
+#define __NR_lgetxattr 228
+#define __NR_link 9
+#define __NR_linkat 296
+#define __NR_listen 363
+#define __NR_listxattr 230
+#define __NR_llistxattr 231
+#define __NR_lookup_dcookie 110
+#define __NR_lremovexattr 234
+#define __NR_lseek 19
+#define __NR_lsetxattr 225
+#define __NR_lstat 107
+#define __NR_madvise 219
+#define __NR_mbind 268
+#define __NR_membarrier 356
+#define __NR_memfd_create 350
+#define __NR_migrate_pages 287
+#define __NR_mincore 218
+#define __NR_mkdir 39
+#define __NR_mkdirat 289
+#define __NR_mknod 14
+#define __NR_mknodat 290
+#define __NR_mlock 150
+#define __NR_mlock2 374
+#define __NR_mlockall 152
+#define __NR_mmap 90
+#define __NR_mount 21
+#define __NR_move_pages 310
+#define __NR_mprotect 125
+#define __NR_mq_getsetattr 276
+#define __NR_mq_notify 275
+#define __NR_mq_open 271
+#define __NR_mq_timedreceive 274
+#define __NR_mq_timedsend 273
+#define __NR_mq_unlink 272
+#define __NR_mremap 163
+#define __NR_msync 144
+#define __NR_munlock 151
+#define __NR_munlockall 153
+#define __NR_munmap 91
+#define __NR_name_to_handle_at 335
+#define __NR_nanosleep 162
+#define __NR_newfstatat 293
+#define __NR_nfsservctl 169
+#define __NR_nice 34
+#define __NR_open 5
+#define __NR_open_by_handle_at 336
+#define __NR_openat 288
+#define __NR_pause 29
+#define __NR_perf_event_open 331
+#define __NR_personality 136
+#define __NR_pipe 42
+#define __NR_pipe2 325
+#define __NR_pivot_root 217
+#define __NR_poll 168
+#define __NR_ppoll 302
+#define __NR_prctl 172
+#define __NR_pread64 180
+#define __NR_preadv 328
+#define __NR_preadv2 376
+#define __NR_prlimit64 334
+#define __NR_process_vm_readv 340
+#define __NR_process_vm_writev 341
+#define __NR_pselect6 301
+#define __NR_ptrace 26
+#define __NR_putpmsg 189
+#define __NR_pwrite64 181
+#define __NR_pwritev 329
+#define __NR_pwritev2 377
+#define __NR_query_module 167
+#define __NR_quotactl 131
+#define __NR_read 3
+#define __NR_readahead 222
+#define __NR_readdir 89
+#define __NR_readlink 85
+#define __NR_readlinkat 298
+#define __NR_readv 145
+#define __NR_reboot 88
+#define __NR_recvfrom 371
+#define __NR_recvmmsg 357
+#define __NR_recvmsg 372
+#define __NR_remap_file_pages 267
+#define __NR_removexattr 233
+#define __NR_rename 38
+#define __NR_renameat 295
+#define __NR_renameat2 347
+#define __NR_request_key 279
+#define __NR_restart_syscall 7
+#define __NR_rmdir 40
+#define __NR_rseq 383
+#define __NR_rt_sigaction 174
+#define __NR_rt_sigpending 176
+#define __NR_rt_sigprocmask 175
+#define __NR_rt_sigqueueinfo 178
+#define __NR_rt_sigreturn 173
+#define __NR_rt_sigsuspend 179
+#define __NR_rt_sigtimedwait 177
+#define __NR_rt_tgsigqueueinfo 330
+#define __NR_s390_guarded_storage 378
+#define __NR_s390_pci_mmio_read 353
+#define __NR_s390_pci_mmio_write 352
+#define __NR_s390_runtime_instr 342
+#define __NR_s390_sthyi 380
+#define __NR_sched_get_priority_max 159
+#define __NR_sched_get_priority_min 160
+#define __NR_sched_getaffinity 240
+#define __NR_sched_getattr 346
+#define __NR_sched_getparam 155
+#define __NR_sched_getscheduler 157
+#define __NR_sched_rr_get_interval 161
+#define __NR_sched_setaffinity 239
+#define __NR_sched_setattr 345
+#define __NR_sched_setparam 154
+#define __NR_sched_setscheduler 156
+#define __NR_sched_yield 158
+#define __NR_seccomp 348
+#define __NR_select 142
+#define __NR_sendfile 187
+#define __NR_sendmmsg 358
+#define __NR_sendmsg 370
+#define __NR_sendto 369
+#define __NR_set_mempolicy 270
+#define __NR_set_robust_list 304
+#define __NR_set_tid_address 252
+#define __NR_setdomainname 121
+#define __NR_setfsgid 216
+#define __NR_setfsuid 215
+#define __NR_setgid 214
+#define __NR_setgroups 206
+#define __NR_sethostname 74
+#define __NR_setitimer 104
+#define __NR_setns 339
+#define __NR_setpgid 57
+#define __NR_setpriority 97
+#define __NR_setregid 204
+#define __NR_setresgid 210
+#define __NR_setresuid 208
+#define __NR_setreuid 203
+#define __NR_setrlimit 75
+#define __NR_setsid 66
+#define __NR_setsockopt 366
+#define __NR_settimeofday 79
+#define __NR_setuid 213
+#define __NR_setxattr 224
+#define __NR_shutdown 373
+#define __NR_sigaction 67
+#define __NR_sigaltstack 186
+#define __NR_signal 48
+#define __NR_signalfd 316
+#define __NR_signalfd4 322
+#define __NR_sigpending 73
+#define __NR_sigprocmask 126
+#define __NR_sigreturn 119
+#define __NR_sigsuspend 72
+#define __NR_socket 359
+#define __NR_socketcall 102
+#define __NR_socketpair 360
+#define __NR_splice 306
+#define __NR_stat 106
+#define __NR_statfs 99
+#define __NR_statfs64 265
+#define __NR_statx 379
+#define __NR_swapoff 115
+#define __NR_swapon 87
+#define __NR_symlink 83
+#define __NR_symlinkat 297
+#define __NR_sync 36
+#define __NR_sync_file_range 307
+#define __NR_syncfs 338
+#define __NR_sysfs 135
+#define __NR_sysinfo 116
+#define __NR_syslog 103
+#define __NR_tee 308
+#define __NR_tgkill 241
+#define __NR_timer_create 254
+#define __NR_timer_delete 258
+#define __NR_timer_getoverrun 257
+#define __NR_timer_gettime 256
+#define __NR_timer_settime 255
+#define __NR_timerfd 317
+#define __NR_timerfd_create 319
+#define __NR_timerfd_gettime 321
+#define __NR_timerfd_settime 320
+#define __NR_times 43
+#define __NR_tkill 237
+#define __NR_truncate 92
+#define __NR_umask 60
+#define __NR_umount 22
+#define __NR_umount2 52
+#define __NR_uname 122
+#define __NR_unlink 10
+#define __NR_unlinkat 294
+#define __NR_unshare 303
+#define __NR_uselib 86
+#define __NR_userfaultfd 355
+#define __NR_ustat 62
+#define __NR_utime 30
+#define __NR_utimensat 315
+#define __NR_utimes 313
+#define __NR_vfork 190
+#define __NR_vhangup 111
+#define __NR_vmsplice 309
+#define __NR_wait4 114
+#define __NR_waitid 281
+#define __NR_write 4
+#define __NR_writev 146
diff --git a/sysdeps/unix/sysv/linux/sh/arch-syscall.h b/sysdeps/unix/sysv/linux/sh/arch-syscall.h
new file mode 100644
index 0000000000..9b27e98e99
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sh/arch-syscall.h
@@ -0,0 +1,354 @@
+#define __NR__llseek 140
+#define __NR__newselect 142
+#define __NR__sysctl 149
+#define __NR_accept 344
+#define __NR_accept4 358
+#define __NR_access 33
+#define __NR_acct 51
+#define __NR_add_key 285
+#define __NR_adjtimex 124
+#define __NR_alarm 27
+#define __NR_bdflush 134
+#define __NR_bind 341
+#define __NR_bpf 375
+#define __NR_brk 45
+#define __NR_cacheflush 123
+#define __NR_capget 184
+#define __NR_capset 185
+#define __NR_chdir 12
+#define __NR_chmod 15
+#define __NR_chown 182
+#define __NR_chown32 212
+#define __NR_chroot 61
+#define __NR_clock_adjtime 361
+#define __NR_clock_getres 266
+#define __NR_clock_gettime 265
+#define __NR_clock_nanosleep 267
+#define __NR_clock_settime 264
+#define __NR_clone 120
+#define __NR_close 6
+#define __NR_connect 342
+#define __NR_copy_file_range 380
+#define __NR_creat 8
+#define __NR_delete_module 129
+#define __NR_dup 41
+#define __NR_dup2 63
+#define __NR_dup3 330
+#define __NR_epoll_create 254
+#define __NR_epoll_create1 329
+#define __NR_epoll_ctl 255
+#define __NR_epoll_pwait 319
+#define __NR_epoll_wait 256
+#define __NR_eventfd 323
+#define __NR_eventfd2 328
+#define __NR_execve 11
+#define __NR_execveat 376
+#define __NR_exit 1
+#define __NR_exit_group 252
+#define __NR_faccessat 307
+#define __NR_fadvise64 250
+#define __NR_fadvise64_64 272
+#define __NR_fallocate 324
+#define __NR_fanotify_init 337
+#define __NR_fanotify_mark 338
+#define __NR_fchdir 133
+#define __NR_fchmod 94
+#define __NR_fchmodat 306
+#define __NR_fchown 95
+#define __NR_fchown32 207
+#define __NR_fchownat 298
+#define __NR_fcntl 55
+#define __NR_fcntl64 221
+#define __NR_fdatasync 148
+#define __NR_fgetxattr 231
+#define __NR_finit_module 368
+#define __NR_flistxattr 234
+#define __NR_flock 143
+#define __NR_fork 2
+#define __NR_fremovexattr 237
+#define __NR_fsetxattr 228
+#define __NR_fstat 108
+#define __NR_fstat64 197
+#define __NR_fstatat64 300
+#define __NR_fstatfs 100
+#define __NR_fstatfs64 269
+#define __NR_fsync 118
+#define __NR_ftruncate 93
+#define __NR_ftruncate64 194
+#define __NR_futex 240
+#define __NR_futimesat 299
+#define __NR_get_mempolicy 275
+#define __NR_get_robust_list 312
+#define __NR_getcpu 318
+#define __NR_getcwd 183
+#define __NR_getdents 141
+#define __NR_getdents64 220
+#define __NR_getegid 50
+#define __NR_getegid32 202
+#define __NR_geteuid 49
+#define __NR_geteuid32 201
+#define __NR_getgid 47
+#define __NR_getgid32 200
+#define __NR_getgroups 80
+#define __NR_getgroups32 205
+#define __NR_getitimer 105
+#define __NR_getpeername 346
+#define __NR_getpgid 132
+#define __NR_getpgrp 65
+#define __NR_getpid 20
+#define __NR_getppid 64
+#define __NR_getpriority 96
+#define __NR_getrandom 373
+#define __NR_getresgid 171
+#define __NR_getresgid32 211
+#define __NR_getresuid 165
+#define __NR_getresuid32 209
+#define __NR_getrlimit 76
+#define __NR_getrusage 77
+#define __NR_getsid 147
+#define __NR_getsockname 345
+#define __NR_getsockopt 354
+#define __NR_gettid 224
+#define __NR_gettimeofday 78
+#define __NR_getuid 24
+#define __NR_getuid32 199
+#define __NR_getxattr 229
+#define __NR_init_module 128
+#define __NR_inotify_add_watch 291
+#define __NR_inotify_init 290
+#define __NR_inotify_init1 332
+#define __NR_inotify_rm_watch 292
+#define __NR_io_cancel 249
+#define __NR_io_destroy 246
+#define __NR_io_getevents 247
+#define __NR_io_setup 245
+#define __NR_io_submit 248
+#define __NR_ioctl 54
+#define __NR_ioprio_get 289
+#define __NR_ioprio_set 288
+#define __NR_ipc 117
+#define __NR_kcmp 367
+#define __NR_kexec_load 283
+#define __NR_keyctl 287
+#define __NR_kill 37
+#define __NR_lchown 16
+#define __NR_lchown32 198
+#define __NR_lgetxattr 230
+#define __NR_link 9
+#define __NR_linkat 303
+#define __NR_listen 343
+#define __NR_listxattr 232
+#define __NR_llistxattr 233
+#define __NR_lookup_dcookie 253
+#define __NR_lremovexattr 236
+#define __NR_lseek 19
+#define __NR_lsetxattr 227
+#define __NR_lstat 107
+#define __NR_lstat64 196
+#define __NR_madvise 219
+#define __NR_mbind 274
+#define __NR_membarrier 378
+#define __NR_memfd_create 374
+#define __NR_migrate_pages 294
+#define __NR_mincore 218
+#define __NR_mkdir 39
+#define __NR_mkdirat 296
+#define __NR_mknod 14
+#define __NR_mknodat 297
+#define __NR_mlock 150
+#define __NR_mlock2 379
+#define __NR_mlockall 152
+#define __NR_mmap 90
+#define __NR_mmap2 192
+#define __NR_mount 21
+#define __NR_move_pages 317
+#define __NR_mprotect 125
+#define __NR_mq_getsetattr 282
+#define __NR_mq_notify 281
+#define __NR_mq_open 277
+#define __NR_mq_timedreceive 280
+#define __NR_mq_timedsend 279
+#define __NR_mq_unlink 278
+#define __NR_mremap 163
+#define __NR_msync 144
+#define __NR_munlock 151
+#define __NR_munlockall 153
+#define __NR_munmap 91
+#define __NR_name_to_handle_at 359
+#define __NR_nanosleep 162
+#define __NR_nfsservctl 169
+#define __NR_nice 34
+#define __NR_oldfstat 28
+#define __NR_oldlstat 84
+#define __NR_oldstat 18
+#define __NR_olduname 109
+#define __NR_open 5
+#define __NR_open_by_handle_at 360
+#define __NR_openat 295
+#define __NR_pause 29
+#define __NR_perf_event_open 336
+#define __NR_personality 136
+#define __NR_pipe 42
+#define __NR_pipe2 331
+#define __NR_pivot_root 217
+#define __NR_poll 168
+#define __NR_ppoll 309
+#define __NR_prctl 172
+#define __NR_pread64 180
+#define __NR_preadv 333
+#define __NR_preadv2 381
+#define __NR_prlimit64 339
+#define __NR_process_vm_readv 365
+#define __NR_process_vm_writev 366
+#define __NR_pselect6 308
+#define __NR_ptrace 26
+#define __NR_pwrite64 181
+#define __NR_pwritev 334
+#define __NR_pwritev2 382
+#define __NR_quotactl 131
+#define __NR_read 3
+#define __NR_readahead 225
+#define __NR_readdir 89
+#define __NR_readlink 85
+#define __NR_readlinkat 305
+#define __NR_readv 145
+#define __NR_reboot 88
+#define __NR_recv 350
+#define __NR_recvfrom 351
+#define __NR_recvmmsg 357
+#define __NR_recvmsg 356
+#define __NR_remap_file_pages 257
+#define __NR_removexattr 235
+#define __NR_rename 38
+#define __NR_renameat 302
+#define __NR_renameat2 371
+#define __NR_request_key 286
+#define __NR_restart_syscall 0
+#define __NR_rmdir 40
+#define __NR_rt_sigaction 174
+#define __NR_rt_sigpending 176
+#define __NR_rt_sigprocmask 175
+#define __NR_rt_sigqueueinfo 178
+#define __NR_rt_sigreturn 173
+#define __NR_rt_sigsuspend 179
+#define __NR_rt_sigtimedwait 177
+#define __NR_rt_tgsigqueueinfo 335
+#define __NR_sched_get_priority_max 159
+#define __NR_sched_get_priority_min 160
+#define __NR_sched_getaffinity 242
+#define __NR_sched_getattr 369
+#define __NR_sched_getparam 155
+#define __NR_sched_getscheduler 157
+#define __NR_sched_rr_get_interval 161
+#define __NR_sched_setaffinity 241
+#define __NR_sched_setattr 370
+#define __NR_sched_setparam 154
+#define __NR_sched_setscheduler 156
+#define __NR_sched_yield 158
+#define __NR_seccomp 372
+#define __NR_send 348
+#define __NR_sendfile 187
+#define __NR_sendfile64 239
+#define __NR_sendmmsg 363
+#define __NR_sendmsg 355
+#define __NR_sendto 349
+#define __NR_set_mempolicy 276
+#define __NR_set_robust_list 311
+#define __NR_set_tid_address 258
+#define __NR_setdomainname 121
+#define __NR_setfsgid 139
+#define __NR_setfsgid32 216
+#define __NR_setfsuid 138
+#define __NR_setfsuid32 215
+#define __NR_setgid 46
+#define __NR_setgid32 214
+#define __NR_setgroups 81
+#define __NR_setgroups32 206
+#define __NR_sethostname 74
+#define __NR_setitimer 104
+#define __NR_setns 364
+#define __NR_setpgid 57
+#define __NR_setpriority 97
+#define __NR_setregid 71
+#define __NR_setregid32 204
+#define __NR_setresgid 170
+#define __NR_setresgid32 210
+#define __NR_setresuid 164
+#define __NR_setresuid32 208
+#define __NR_setreuid 70
+#define __NR_setreuid32 203
+#define __NR_setrlimit 75
+#define __NR_setsid 66
+#define __NR_setsockopt 353
+#define __NR_settimeofday 79
+#define __NR_setuid 23
+#define __NR_setuid32 213
+#define __NR_setxattr 226
+#define __NR_sgetmask 68
+#define __NR_shutdown 352
+#define __NR_sigaction 67
+#define __NR_sigaltstack 186
+#define __NR_signal 48
+#define __NR_signalfd 321
+#define __NR_signalfd4 327
+#define __NR_sigpending 73
+#define __NR_sigprocmask 126
+#define __NR_sigreturn 119
+#define __NR_sigsuspend 72
+#define __NR_socket 340
+#define __NR_socketcall 102
+#define __NR_socketpair 347
+#define __NR_splice 313
+#define __NR_ssetmask 69
+#define __NR_stat 106
+#define __NR_stat64 195
+#define __NR_statfs 99
+#define __NR_statfs64 268
+#define __NR_stime 25
+#define __NR_swapoff 115
+#define __NR_swapon 87
+#define __NR_symlink 83
+#define __NR_symlinkat 304
+#define __NR_sync 36
+#define __NR_sync_file_range 314
+#define __NR_syncfs 362
+#define __NR_sysfs 135
+#define __NR_sysinfo 116
+#define __NR_syslog 103
+#define __NR_tee 315
+#define __NR_tgkill 270
+#define __NR_time 13
+#define __NR_timer_create 259
+#define __NR_timer_delete 263
+#define __NR_timer_getoverrun 262
+#define __NR_timer_gettime 261
+#define __NR_timer_settime 260
+#define __NR_timerfd_create 322
+#define __NR_timerfd_gettime 326
+#define __NR_timerfd_settime 325
+#define __NR_times 43
+#define __NR_tkill 238
+#define __NR_truncate 92
+#define __NR_truncate64 193
+#define __NR_ugetrlimit 191
+#define __NR_umask 60
+#define __NR_umount 22
+#define __NR_umount2 52
+#define __NR_uname 122
+#define __NR_unlink 10
+#define __NR_unlinkat 301
+#define __NR_unshare 310
+#define __NR_uselib 86
+#define __NR_userfaultfd 377
+#define __NR_ustat 62
+#define __NR_utime 30
+#define __NR_utimensat 320
+#define __NR_utimes 271
+#define __NR_vfork 190
+#define __NR_vhangup 111
+#define __NR_vmsplice 316
+#define __NR_wait4 114
+#define __NR_waitid 284
+#define __NR_waitpid 7
+#define __NR_write 4
+#define __NR_writev 146
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h b/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h
new file mode 100644
index 0000000000..05ddc7b27c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h
@@ -0,0 +1,360 @@
+#define __NR__llseek 236
+#define __NR__newselect 230
+#define __NR__sysctl 251
+#define __NR_accept 99
+#define __NR_accept4 323
+#define __NR_access 33
+#define __NR_acct 51
+#define __NR_add_key 281
+#define __NR_adjtimex 219
+#define __NR_afs_syscall 227
+#define __NR_alarm 27
+#define __NR_bdflush 225
+#define __NR_bind 353
+#define __NR_bpf 349
+#define __NR_brk 17
+#define __NR_capget 21
+#define __NR_capset 22
+#define __NR_chdir 12
+#define __NR_chmod 15
+#define __NR_chown 13
+#define __NR_chown32 35
+#define __NR_chroot 61
+#define __NR_clock_adjtime 334
+#define __NR_clock_getres 258
+#define __NR_clock_gettime 257
+#define __NR_clock_nanosleep 259
+#define __NR_clock_settime 256
+#define __NR_clone 217
+#define __NR_close 6
+#define __NR_connect 98
+#define __NR_copy_file_range 357
+#define __NR_creat 8
+#define __NR_create_module 221
+#define __NR_delete_module 222
+#define __NR_dup 41
+#define __NR_dup2 90
+#define __NR_dup3 320
+#define __NR_epoll_create 193
+#define __NR_epoll_create1 319
+#define __NR_epoll_ctl 194
+#define __NR_epoll_pwait 309
+#define __NR_epoll_wait 195
+#define __NR_eventfd 313
+#define __NR_eventfd2 318
+#define __NR_execv 11
+#define __NR_execve 59
+#define __NR_execveat 350
+#define __NR_exit 1
+#define __NR_exit_group 188
+#define __NR_faccessat 296
+#define __NR_fadvise64 209
+#define __NR_fadvise64_64 210
+#define __NR_fallocate 314
+#define __NR_fanotify_init 329
+#define __NR_fanotify_mark 330
+#define __NR_fchdir 176
+#define __NR_fchmod 124
+#define __NR_fchmodat 295
+#define __NR_fchown 123
+#define __NR_fchown32 32
+#define __NR_fchownat 287
+#define __NR_fcntl 92
+#define __NR_fcntl64 155
+#define __NR_fdatasync 253
+#define __NR_fgetxattr 177
+#define __NR_finit_module 342
+#define __NR_flistxattr 180
+#define __NR_flock 131
+#define __NR_fork 2
+#define __NR_fremovexattr 186
+#define __NR_fsetxattr 171
+#define __NR_fstat 62
+#define __NR_fstat64 63
+#define __NR_fstatat64 289
+#define __NR_fstatfs 158
+#define __NR_fstatfs64 235
+#define __NR_fsync 95
+#define __NR_ftruncate 130
+#define __NR_ftruncate64 84
+#define __NR_futex 142
+#define __NR_futimesat 288
+#define __NR_get_kernel_syms 223
+#define __NR_get_mempolicy 304
+#define __NR_get_robust_list 301
+#define __NR_getcpu 308
+#define __NR_getcwd 119
+#define __NR_getdents 174
+#define __NR_getdents64 154
+#define __NR_getdomainname 162
+#define __NR_getegid 50
+#define __NR_getegid32 70
+#define __NR_geteuid 49
+#define __NR_geteuid32 69
+#define __NR_getgid 47
+#define __NR_getgid32 53
+#define __NR_getgroups 79
+#define __NR_getgroups32 115
+#define __NR_getitimer 86
+#define __NR_getpagesize 64
+#define __NR_getpeername 141
+#define __NR_getpgid 224
+#define __NR_getpgrp 81
+#define __NR_getpid 20
+#define __NR_getppid 197
+#define __NR_getpriority 100
+#define __NR_getrandom 347
+#define __NR_getresgid32 111
+#define __NR_getresuid32 109
+#define __NR_getrlimit 144
+#define __NR_getrusage 117
+#define __NR_getsid 252
+#define __NR_getsockname 150
+#define __NR_getsockopt 118
+#define __NR_gettid 143
+#define __NR_gettimeofday 116
+#define __NR_getuid 24
+#define __NR_getuid32 44
+#define __NR_getxattr 172
+#define __NR_init_module 190
+#define __NR_inotify_add_watch 152
+#define __NR_inotify_init 151
+#define __NR_inotify_init1 322
+#define __NR_inotify_rm_watch 156
+#define __NR_io_cancel 271
+#define __NR_io_destroy 269
+#define __NR_io_getevents 272
+#define __NR_io_pgetevents 361
+#define __NR_io_setup 268
+#define __NR_io_submit 270
+#define __NR_ioctl 54
+#define __NR_ioprio_get 218
+#define __NR_ioprio_set 196
+#define __NR_ipc 215
+#define __NR_kcmp 341
+#define __NR_kern_features 340
+#define __NR_kexec_load 306
+#define __NR_keyctl 283
+#define __NR_kill 37
+#define __NR_lchown 16
+#define __NR_lchown32 31
+#define __NR_lgetxattr 173
+#define __NR_link 9
+#define __NR_linkat 292
+#define __NR_listen 354
+#define __NR_listxattr 178
+#define __NR_llistxattr 179
+#define __NR_lookup_dcookie 208
+#define __NR_lremovexattr 182
+#define __NR_lseek 19
+#define __NR_lsetxattr 170
+#define __NR_lstat 40
+#define __NR_lstat64 132
+#define __NR_madvise 75
+#define __NR_mbind 303
+#define __NR_membarrier 351
+#define __NR_memfd_create 348
+#define __NR_migrate_pages 302
+#define __NR_mincore 78
+#define __NR_mkdir 136
+#define __NR_mkdirat 285
+#define __NR_mknod 14
+#define __NR_mknodat 286
+#define __NR_mlock 237
+#define __NR_mlock2 356
+#define __NR_mlockall 239
+#define __NR_mmap 71
+#define __NR_mmap2 56
+#define __NR_mount 167
+#define __NR_move_pages 307
+#define __NR_mprotect 74
+#define __NR_mq_getsetattr 278
+#define __NR_mq_notify 277
+#define __NR_mq_open 273
+#define __NR_mq_timedreceive 276
+#define __NR_mq_timedsend 275
+#define __NR_mq_unlink 274
+#define __NR_mremap 250
+#define __NR_msync 65
+#define __NR_munlock 238
+#define __NR_munlockall 240
+#define __NR_munmap 73
+#define __NR_name_to_handle_at 332
+#define __NR_nanosleep 249
+#define __NR_nfsservctl 254
+#define __NR_nice 34
+#define __NR_oldlstat 202
+#define __NR_open 5
+#define __NR_open_by_handle_at 333
+#define __NR_openat 284
+#define __NR_pause 29
+#define __NR_pciconfig_read 148
+#define __NR_pciconfig_write 149
+#define __NR_perf_event_open 327
+#define __NR_perfctr 18
+#define __NR_personality 191
+#define __NR_pipe 42
+#define __NR_pipe2 321
+#define __NR_pivot_root 146
+#define __NR_poll 153
+#define __NR_ppoll 298
+#define __NR_prctl 147
+#define __NR_pread64 67
+#define __NR_preadv 324
+#define __NR_preadv2 358
+#define __NR_prlimit64 331
+#define __NR_process_vm_readv 338
+#define __NR_process_vm_writev 339
+#define __NR_pselect6 297
+#define __NR_ptrace 26
+#define __NR_pwrite64 68
+#define __NR_pwritev 325
+#define __NR_pwritev2 359
+#define __NR_query_module 184
+#define __NR_quotactl 165
+#define __NR_read 3
+#define __NR_readahead 205
+#define __NR_readdir 204
+#define __NR_readlink 58
+#define __NR_readlinkat 294
+#define __NR_readv 120
+#define __NR_reboot 55
+#define __NR_recvfrom 125
+#define __NR_recvmmsg 328
+#define __NR_recvmsg 113
+#define __NR_remap_file_pages 192
+#define __NR_removexattr 181
+#define __NR_rename 128
+#define __NR_renameat 291
+#define __NR_renameat2 345
+#define __NR_request_key 282
+#define __NR_restart_syscall 0
+#define __NR_rmdir 137
+#define __NR_rt_sigaction 102
+#define __NR_rt_sigpending 104
+#define __NR_rt_sigprocmask 103
+#define __NR_rt_sigqueueinfo 106
+#define __NR_rt_sigreturn 101
+#define __NR_rt_sigsuspend 107
+#define __NR_rt_sigtimedwait 105
+#define __NR_rt_tgsigqueueinfo 326
+#define __NR_sched_get_affinity 161
+#define __NR_sched_get_priority_max 246
+#define __NR_sched_get_priority_min 247
+#define __NR_sched_getaffinity 260
+#define __NR_sched_getattr 344
+#define __NR_sched_getparam 242
+#define __NR_sched_getscheduler 244
+#define __NR_sched_rr_get_interval 248
+#define __NR_sched_set_affinity 160
+#define __NR_sched_setaffinity 261
+#define __NR_sched_setattr 343
+#define __NR_sched_setparam 241
+#define __NR_sched_setscheduler 243
+#define __NR_sched_yield 245
+#define __NR_seccomp 346
+#define __NR_select 93
+#define __NR_sendfile 39
+#define __NR_sendfile64 140
+#define __NR_sendmmsg 336
+#define __NR_sendmsg 114
+#define __NR_sendto 133
+#define __NR_set_mempolicy 305
+#define __NR_set_robust_list 300
+#define __NR_set_tid_address 166
+#define __NR_setdomainname 163
+#define __NR_setfsgid 229
+#define __NR_setfsgid32 94
+#define __NR_setfsuid 228
+#define __NR_setfsuid32 91
+#define __NR_setgid 46
+#define __NR_setgid32 89
+#define __NR_setgroups 80
+#define __NR_setgroups32 82
+#define __NR_sethostname 88
+#define __NR_setitimer 83
+#define __NR_setns 337
+#define __NR_setpgid 185
+#define __NR_setpriority 96
+#define __NR_setregid 127
+#define __NR_setregid32 112
+#define __NR_setresgid32 110
+#define __NR_setresuid32 108
+#define __NR_setreuid 126
+#define __NR_setreuid32 72
+#define __NR_setrlimit 145
+#define __NR_setsid 175
+#define __NR_setsockopt 355
+#define __NR_settimeofday 122
+#define __NR_setuid 23
+#define __NR_setuid32 87
+#define __NR_setxattr 169
+#define __NR_sgetmask 199
+#define __NR_shutdown 134
+#define __NR_sigaction 198
+#define __NR_sigaltstack 28
+#define __NR_signal 48
+#define __NR_signalfd 311
+#define __NR_signalfd4 317
+#define __NR_sigpending 183
+#define __NR_sigprocmask 220
+#define __NR_sigreturn 216
+#define __NR_sigsuspend 201
+#define __NR_socket 97
+#define __NR_socketcall 206
+#define __NR_socketpair 135
+#define __NR_splice 232
+#define __NR_ssetmask 200
+#define __NR_stat 38
+#define __NR_stat64 139
+#define __NR_statfs 157
+#define __NR_statfs64 234
+#define __NR_statx 360
+#define __NR_stime 233
+#define __NR_swapoff 213
+#define __NR_swapon 85
+#define __NR_symlink 57
+#define __NR_symlinkat 293
+#define __NR_sync 36
+#define __NR_sync_file_range 255
+#define __NR_syncfs 335
+#define __NR_sysfs 226
+#define __NR_sysinfo 214
+#define __NR_syslog 207
+#define __NR_tee 280
+#define __NR_tgkill 211
+#define __NR_time 231
+#define __NR_timer_create 266
+#define __NR_timer_delete 265
+#define __NR_timer_getoverrun 264
+#define __NR_timer_gettime 263
+#define __NR_timer_settime 262
+#define __NR_timerfd_create 312
+#define __NR_timerfd_gettime 316
+#define __NR_timerfd_settime 315
+#define __NR_times 43
+#define __NR_tkill 187
+#define __NR_truncate 129
+#define __NR_truncate64 77
+#define __NR_umask 60
+#define __NR_umount 159
+#define __NR_umount2 45
+#define __NR_uname 189
+#define __NR_unlink 10
+#define __NR_unlinkat 290
+#define __NR_unshare 299
+#define __NR_uselib 203
+#define __NR_userfaultfd 352
+#define __NR_ustat 168
+#define __NR_utime 30
+#define __NR_utimensat 310
+#define __NR_utimes 138
+#define __NR_vfork 66
+#define __NR_vhangup 76
+#define __NR_vmsplice 25
+#define __NR_vserver 267
+#define __NR_wait4 7
+#define __NR_waitid 279
+#define __NR_waitpid 212
+#define __NR_write 4
+#define __NR_writev 121
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h b/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h
new file mode 100644
index 0000000000..040967fe65
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h
@@ -0,0 +1,342 @@
+#define __NR__llseek 236
+#define __NR__newselect 230
+#define __NR__sysctl 251
+#define __NR_accept 99
+#define __NR_accept4 323
+#define __NR_access 33
+#define __NR_acct 51
+#define __NR_add_key 281
+#define __NR_adjtimex 219
+#define __NR_afs_syscall 227
+#define __NR_alarm 27
+#define __NR_bdflush 225
+#define __NR_bind 353
+#define __NR_bpf 349
+#define __NR_brk 17
+#define __NR_capget 21
+#define __NR_capset 22
+#define __NR_chdir 12
+#define __NR_chmod 15
+#define __NR_chown 13
+#define __NR_chroot 61
+#define __NR_clock_adjtime 334
+#define __NR_clock_getres 258
+#define __NR_clock_gettime 257
+#define __NR_clock_nanosleep 259
+#define __NR_clock_settime 256
+#define __NR_clone 217
+#define __NR_close 6
+#define __NR_connect 98
+#define __NR_copy_file_range 357
+#define __NR_creat 8
+#define __NR_create_module 221
+#define __NR_delete_module 222
+#define __NR_dup 41
+#define __NR_dup2 90
+#define __NR_dup3 320
+#define __NR_epoll_create 193
+#define __NR_epoll_create1 319
+#define __NR_epoll_ctl 194
+#define __NR_epoll_pwait 309
+#define __NR_epoll_wait 195
+#define __NR_eventfd 313
+#define __NR_eventfd2 318
+#define __NR_execv 11
+#define __NR_execve 59
+#define __NR_execveat 350
+#define __NR_exit 1
+#define __NR_exit_group 188
+#define __NR_faccessat 296
+#define __NR_fadvise64 209
+#define __NR_fadvise64_64 210
+#define __NR_fallocate 314
+#define __NR_fanotify_init 329
+#define __NR_fanotify_mark 330
+#define __NR_fchdir 176
+#define __NR_fchmod 124
+#define __NR_fchmodat 295
+#define __NR_fchown 123
+#define __NR_fchownat 287
+#define __NR_fcntl 92
+#define __NR_fdatasync 253
+#define __NR_fgetxattr 177
+#define __NR_finit_module 342
+#define __NR_flistxattr 180
+#define __NR_flock 131
+#define __NR_fork 2
+#define __NR_fremovexattr 186
+#define __NR_fsetxattr 171
+#define __NR_fstat 62
+#define __NR_fstat64 63
+#define __NR_fstatat64 289
+#define __NR_fstatfs 158
+#define __NR_fstatfs64 235
+#define __NR_fsync 95
+#define __NR_ftruncate 130
+#define __NR_futex 142
+#define __NR_futimesat 288
+#define __NR_get_kernel_syms 223
+#define __NR_get_mempolicy 304
+#define __NR_get_robust_list 301
+#define __NR_getcpu 308
+#define __NR_getcwd 119
+#define __NR_getdents 174
+#define __NR_getdents64 154
+#define __NR_getdomainname 162
+#define __NR_getegid 50
+#define __NR_geteuid 49
+#define __NR_getgid 47
+#define __NR_getgroups 79
+#define __NR_getitimer 86
+#define __NR_getpagesize 64
+#define __NR_getpeername 141
+#define __NR_getpgid 224
+#define __NR_getpgrp 81
+#define __NR_getpid 20
+#define __NR_getppid 197
+#define __NR_getpriority 100
+#define __NR_getrandom 347
+#define __NR_getresgid 111
+#define __NR_getresuid 109
+#define __NR_getrlimit 144
+#define __NR_getrusage 117
+#define __NR_getsid 252
+#define __NR_getsockname 150
+#define __NR_getsockopt 118
+#define __NR_gettid 143
+#define __NR_gettimeofday 116
+#define __NR_getuid 24
+#define __NR_getxattr 172
+#define __NR_init_module 190
+#define __NR_inotify_add_watch 152
+#define __NR_inotify_init 151
+#define __NR_inotify_init1 322
+#define __NR_inotify_rm_watch 156
+#define __NR_io_cancel 271
+#define __NR_io_destroy 269
+#define __NR_io_getevents 272
+#define __NR_io_pgetevents 361
+#define __NR_io_setup 268
+#define __NR_io_submit 270
+#define __NR_ioctl 54
+#define __NR_ioprio_get 218
+#define __NR_ioprio_set 196
+#define __NR_ipc 215
+#define __NR_kcmp 341
+#define __NR_kern_features 340
+#define __NR_kexec_load 306
+#define __NR_keyctl 283
+#define __NR_kill 37
+#define __NR_lchown 16
+#define __NR_lgetxattr 173
+#define __NR_link 9
+#define __NR_linkat 292
+#define __NR_listen 354
+#define __NR_listxattr 178
+#define __NR_llistxattr 179
+#define __NR_lookup_dcookie 208
+#define __NR_lremovexattr 182
+#define __NR_lseek 19
+#define __NR_lsetxattr 170
+#define __NR_lstat 40
+#define __NR_lstat64 132
+#define __NR_madvise 75
+#define __NR_mbind 303
+#define __NR_membarrier 351
+#define __NR_memfd_create 348
+#define __NR_memory_ordering 52
+#define __NR_migrate_pages 302
+#define __NR_mincore 78
+#define __NR_mkdir 136
+#define __NR_mkdirat 285
+#define __NR_mknod 14
+#define __NR_mknodat 286
+#define __NR_mlock 237
+#define __NR_mlock2 356
+#define __NR_mlockall 239
+#define __NR_mmap 71
+#define __NR_mount 167
+#define __NR_move_pages 307
+#define __NR_mprotect 74
+#define __NR_mq_getsetattr 278
+#define __NR_mq_notify 277
+#define __NR_mq_open 273
+#define __NR_mq_timedreceive 276
+#define __NR_mq_timedsend 275
+#define __NR_mq_unlink 274
+#define __NR_mremap 250
+#define __NR_msync 65
+#define __NR_munlock 238
+#define __NR_munlockall 240
+#define __NR_munmap 73
+#define __NR_name_to_handle_at 332
+#define __NR_nanosleep 249
+#define __NR_nfsservctl 254
+#define __NR_nice 34
+#define __NR_oldlstat 202
+#define __NR_open 5
+#define __NR_open_by_handle_at 333
+#define __NR_openat 284
+#define __NR_pause 29
+#define __NR_pciconfig_read 148
+#define __NR_pciconfig_write 149
+#define __NR_perf_event_open 327
+#define __NR_perfctr 18
+#define __NR_personality 191
+#define __NR_pipe 42
+#define __NR_pipe2 321
+#define __NR_pivot_root 146
+#define __NR_poll 153
+#define __NR_ppoll 298
+#define __NR_prctl 147
+#define __NR_pread64 67
+#define __NR_preadv 324
+#define __NR_preadv2 358
+#define __NR_prlimit64 331
+#define __NR_process_vm_readv 338
+#define __NR_process_vm_writev 339
+#define __NR_pselect6 297
+#define __NR_ptrace 26
+#define __NR_pwrite64 68
+#define __NR_pwritev 325
+#define __NR_pwritev2 359
+#define __NR_query_module 184
+#define __NR_quotactl 165
+#define __NR_read 3
+#define __NR_readahead 205
+#define __NR_readdir 204
+#define __NR_readlink 58
+#define __NR_readlinkat 294
+#define __NR_readv 120
+#define __NR_reboot 55
+#define __NR_recvfrom 125
+#define __NR_recvmmsg 328
+#define __NR_recvmsg 113
+#define __NR_remap_file_pages 192
+#define __NR_removexattr 181
+#define __NR_rename 128
+#define __NR_renameat 291
+#define __NR_renameat2 345
+#define __NR_request_key 282
+#define __NR_restart_syscall 0
+#define __NR_rmdir 137
+#define __NR_rt_sigaction 102
+#define __NR_rt_sigpending 104
+#define __NR_rt_sigprocmask 103
+#define __NR_rt_sigqueueinfo 106
+#define __NR_rt_sigreturn 101
+#define __NR_rt_sigsuspend 107
+#define __NR_rt_sigtimedwait 105
+#define __NR_rt_tgsigqueueinfo 326
+#define __NR_sched_get_affinity 161
+#define __NR_sched_get_priority_max 246
+#define __NR_sched_get_priority_min 247
+#define __NR_sched_getaffinity 260
+#define __NR_sched_getattr 344
+#define __NR_sched_getparam 242
+#define __NR_sched_getscheduler 244
+#define __NR_sched_rr_get_interval 248
+#define __NR_sched_set_affinity 160
+#define __NR_sched_setaffinity 261
+#define __NR_sched_setattr 343
+#define __NR_sched_setparam 241
+#define __NR_sched_setscheduler 243
+#define __NR_sched_yield 245
+#define __NR_seccomp 346
+#define __NR_select 93
+#define __NR_sendfile 39
+#define __NR_sendfile64 140
+#define __NR_sendmmsg 336
+#define __NR_sendmsg 114
+#define __NR_sendto 133
+#define __NR_set_mempolicy 305
+#define __NR_set_robust_list 300
+#define __NR_set_tid_address 166
+#define __NR_setdomainname 163
+#define __NR_setfsgid 229
+#define __NR_setfsuid 228
+#define __NR_setgid 46
+#define __NR_setgroups 80
+#define __NR_sethostname 88
+#define __NR_setitimer 83
+#define __NR_setns 337
+#define __NR_setpgid 185
+#define __NR_setpriority 96
+#define __NR_setregid 127
+#define __NR_setresgid 110
+#define __NR_setresuid 108
+#define __NR_setreuid 126
+#define __NR_setrlimit 145
+#define __NR_setsid 175
+#define __NR_setsockopt 355
+#define __NR_settimeofday 122
+#define __NR_setuid 23
+#define __NR_setxattr 169
+#define __NR_sgetmask 199
+#define __NR_shutdown 134
+#define __NR_sigaction 198
+#define __NR_sigaltstack 28
+#define __NR_signal 48
+#define __NR_signalfd 311
+#define __NR_signalfd4 317
+#define __NR_sigpending 183
+#define __NR_sigprocmask 220
+#define __NR_sigreturn 216
+#define __NR_sigsuspend 201
+#define __NR_socket 97
+#define __NR_socketcall 206
+#define __NR_socketpair 135
+#define __NR_splice 232
+#define __NR_ssetmask 200
+#define __NR_stat 38
+#define __NR_stat64 139
+#define __NR_statfs 157
+#define __NR_statfs64 234
+#define __NR_statx 360
+#define __NR_stime 233
+#define __NR_swapoff 213
+#define __NR_swapon 85
+#define __NR_symlink 57
+#define __NR_symlinkat 293
+#define __NR_sync 36
+#define __NR_sync_file_range 255
+#define __NR_syncfs 335
+#define __NR_sysfs 226
+#define __NR_sysinfo 214
+#define __NR_syslog 207
+#define __NR_tee 280
+#define __NR_tgkill 211
+#define __NR_timer_create 266
+#define __NR_timer_delete 265
+#define __NR_timer_getoverrun 264
+#define __NR_timer_gettime 263
+#define __NR_timer_settime 262
+#define __NR_timerfd_create 312
+#define __NR_timerfd_gettime 316
+#define __NR_timerfd_settime 315
+#define __NR_times 43
+#define __NR_tkill 187
+#define __NR_truncate 129
+#define __NR_umask 60
+#define __NR_umount 159
+#define __NR_umount2 45
+#define __NR_uname 189
+#define __NR_unlink 10
+#define __NR_unlinkat 290
+#define __NR_unshare 299
+#define __NR_uselib 203
+#define __NR_userfaultfd 352
+#define __NR_ustat 168
+#define __NR_utime 30
+#define __NR_utimensat 310
+#define __NR_utimes 138
+#define __NR_utrap_install 164
+#define __NR_vfork 66
+#define __NR_vhangup 76
+#define __NR_vmsplice 25
+#define __NR_vserver 267
+#define __NR_wait4 7
+#define __NR_waitid 279
+#define __NR_waitpid 212
+#define __NR_write 4
+#define __NR_writev 121
diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list
index 2d0354b8b3..9a51b46cbb 100644
--- a/sysdeps/unix/sysv/linux/syscall-names.list
+++ b/sysdeps/unix/sysv/linux/syscall-names.list
@@ -499,6 +499,7 @@ set_mempolicy
 set_robust_list
 set_thread_area
 set_tid_address
+set_tls
 setdomainname
 setfsgid
 setfsgid32
diff --git a/sysdeps/unix/sysv/linux/tst-glibcsyscalls.py b/sysdeps/unix/sysv/linux/tst-glibcsyscalls.py
new file mode 100644
index 0000000000..5ef0d3420d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/tst-glibcsyscalls.py
@@ -0,0 +1,88 @@
+#!/usr/bin/python3
+# Consistency checks for glibc system call lists.
+# Copyright (C) 2019 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+#
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+import argparse
+import sys
+
+import glibcextract
+import glibcsyscalls
+
+def main():
+    """The main entry point."""
+    parser = argparse.ArgumentParser(
+        description="System call list consistency checks")
+    parser.add_argument('--cc', metavar='CC', required=True,
+                        help='C compiler (including options) to use')
+    parser.add_argument('syscall_numbers_list', metavar='PATH',
+                        help='Path to the list of system call numbers')
+    parser.add_argument('syscall_names_list', metavar='PATH',
+                        help='Path to the list of system call names')
+
+    args = parser.parse_args()
+
+    glibc_constants = glibcsyscalls.load_arch_syscall_header(
+        args.syscall_numbers_list)
+    with open(args.syscall_names_list) as inp:
+        glibc_names = glibcsyscalls.SyscallNamesList(inp)
+    kernel_constants = glibcsyscalls.kernel_constants(args.cc)
+    kernel_version = glibcsyscalls.linux_kernel_version(args.cc)
+
+    errors = 0
+    warnings = False
+    for name in glibc_constants.keys() & kernel_constants.keys():
+        if glibc_constants[name] != kernel_constants[name]:
+            print("error: syscall {!r} number mismatch: glibc={!r} kernel={!r}"
+                  .format(name, glibc_constants[name], kernel_constants[name]))
+            errors = 1
+
+    # The architecture-specific list in the glibc tree must be a
+    # subset of the global list of system call names.
+    for name in glibc_constants.keys() - set(glibc_names.syscalls):
+        print("error: architecture syscall {!r} missing from global names list"
+              .format(name))
+        errors = 1
+
+    for name in glibc_constants.keys() - kernel_constants.keys():
+        print("info: glibc syscall {!r} not known to kernel".format(name))
+        warnings = True
+
+    # If the glibc-recorded kernel version is not older than the
+    # installed kernel headers, the glibc system call set must be a
+    # superset of the kernel system call set.
+    if glibc_names.kernel_version >= kernel_version:
+        for name in kernel_constants.keys() - glibc_constants.keys():
+            print("error: kernel syscall {!r} ({}) not known to glibc"
+                  .format(name, kernel_constants[name]))
+            errors = 1
+    else:
+        for name in kernel_constants.keys() - glibc_constants.keys():
+            print("warning: kernel syscall {!r} ({}) not known to glibc"
+                  .format(name, kernel_constants[name]))
+            warnings = True
+
+    if errors > 0 or warnings:
+        print("info: glibc tables are based on kernel version {}".format(
+            ".".join(map(str, glibc_names.kernel_version))))
+        print("info: installed kernel headers are version {}".format(
+            ".".join(map(str, kernel_version))))
+
+    sys.exit(errors)
+
+if __name__ == '__main__':
+    main()
diff --git a/sysdeps/unix/sysv/linux/tst-mman-consts.py b/sysdeps/unix/sysv/linux/tst-mman-consts.py
index 8e9f9d03b7..f43cfb8075 100644
--- a/sysdeps/unix/sysv/linux/tst-mman-consts.py
+++ b/sysdeps/unix/sysv/linux/tst-mman-consts.py
@@ -21,15 +21,7 @@ import argparse
 import sys
 
 import glibcextract
-
-
-def linux_kernel_version(cc):
-    """Return the (major, minor) version of the Linux kernel headers."""
-    sym_data = ['#include <linux/version.h>', 'START',
-                ('LINUX_VERSION_CODE', 'LINUX_VERSION_CODE')]
-    val = glibcextract.compute_c_consts(sym_data, cc)['LINUX_VERSION_CODE']
-    val = int(val)
-    return ((val & 0xff0000) >> 16, (val & 0xff00) >> 8)
+import glibcsyscalls
 
 
 def main():
@@ -40,7 +32,7 @@ def main():
     parser.add_argument('--cc', metavar='CC',
                         help='C compiler (including options) to use')
     args = parser.parse_args()
-    linux_version_headers = linux_kernel_version(args.cc)
+    linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
     linux_version_glibc = (4, 20)
     sys.exit(glibcextract.compare_macro_consts(
         '#define _GNU_SOURCE 1\n'
diff --git a/sysdeps/unix/sysv/linux/update-syscall-lists.py b/sysdeps/unix/sysv/linux/update-syscall-lists.py
new file mode 100644
index 0000000000..6695583276
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/update-syscall-lists.py
@@ -0,0 +1,66 @@
+#!/usr/bin/python3
+# Recreate <arch-syscall.h> and update syscall-names.list.
+# Copyright (C) 2019 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+#
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+import argparse
+import os
+import sys
+
+import glibcextract
+import glibcsyscalls
+
+def main():
+    """The main entry point."""
+    parser = argparse.ArgumentParser(
+        description="System call list consistency checks")
+    parser.add_argument('--cc', metavar='CC', required=True,
+                        help='C compiler (including options) to use')
+    parser.add_argument('arch_syscall', metavar='ARCH-SYSCALL-H',
+                        help='The <arch-syscall.h> file to update')
+    parser.add_argument('names_list', metavar='SYSCALL-NAMES-LIST',
+                        help='The syscall name list to update ')
+
+    args = parser.parse_args()
+
+    kernel_constants = glibcsyscalls.kernel_constants(args.cc)
+
+    # Replace <arch-syscall.h> with data derived from kernel headers.
+    # No merging is necessary here.  Arch-specific changes should go
+    # into <fixup-unistd-asm.h>.
+    with open(args.arch_syscall, "r+") as out:
+        os.lockf(out.fileno(), os.F_LOCK, 0)
+        out.truncate()
+        for name, value in sorted(kernel_constants.items()):
+            out.write("#define __NR_{} {}\n".format(name, value))
+
+    # Merge the architecture-specific system call names into the
+    # global names list, syscall-names.list.  This file contains names
+    # from other architectures (and comments), so it is necessary to
+    # merge the existing files with the names obtained from the
+    # kernel.
+    with open(args.names_list, "r+") as list_file:
+        os.lockf(list_file.fileno(), os.F_LOCK, 0)
+        names_list = glibcsyscalls.SyscallNamesList(list_file)
+        merged = names_list.merge(kernel_constants.keys())
+        list_file.truncate()
+        list_file.seek(0)
+        for line in merged:
+            list_file.write(line)
+
+if __name__ == '__main__':
+    main()
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h b/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h
new file mode 100644
index 0000000000..9131291902
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h
@@ -0,0 +1,335 @@
+#define __NR__sysctl 156
+#define __NR_accept 43
+#define __NR_accept4 288
+#define __NR_access 21
+#define __NR_acct 163
+#define __NR_add_key 248
+#define __NR_adjtimex 159
+#define __NR_afs_syscall 183
+#define __NR_alarm 37
+#define __NR_arch_prctl 158
+#define __NR_bind 49
+#define __NR_bpf 321
+#define __NR_brk 12
+#define __NR_capget 125
+#define __NR_capset 126
+#define __NR_chdir 80
+#define __NR_chmod 90
+#define __NR_chown 92
+#define __NR_chroot 161
+#define __NR_clock_adjtime 305
+#define __NR_clock_getres 229
+#define __NR_clock_gettime 228
+#define __NR_clock_nanosleep 230
+#define __NR_clock_settime 227
+#define __NR_clone 56
+#define __NR_close 3
+#define __NR_connect 42
+#define __NR_copy_file_range 326
+#define __NR_creat 85
+#define __NR_create_module 174
+#define __NR_delete_module 176
+#define __NR_dup 32
+#define __NR_dup2 33
+#define __NR_dup3 292
+#define __NR_epoll_create 213
+#define __NR_epoll_create1 291
+#define __NR_epoll_ctl 233
+#define __NR_epoll_ctl_old 214
+#define __NR_epoll_pwait 281
+#define __NR_epoll_wait 232
+#define __NR_epoll_wait_old 215
+#define __NR_eventfd 284
+#define __NR_eventfd2 290
+#define __NR_execve 59
+#define __NR_execveat 322
+#define __NR_exit 60
+#define __NR_exit_group 231
+#define __NR_faccessat 269
+#define __NR_fadvise64 221
+#define __NR_fallocate 285
+#define __NR_fanotify_init 300
+#define __NR_fanotify_mark 301
+#define __NR_fchdir 81
+#define __NR_fchmod 91
+#define __NR_fchmodat 268
+#define __NR_fchown 93
+#define __NR_fchownat 260
+#define __NR_fcntl 72
+#define __NR_fdatasync 75
+#define __NR_fgetxattr 193
+#define __NR_finit_module 313
+#define __NR_flistxattr 196
+#define __NR_flock 73
+#define __NR_fork 57
+#define __NR_fremovexattr 199
+#define __NR_fsetxattr 190
+#define __NR_fstat 5
+#define __NR_fstatfs 138
+#define __NR_fsync 74
+#define __NR_ftruncate 77
+#define __NR_futex 202
+#define __NR_futimesat 261
+#define __NR_get_kernel_syms 177
+#define __NR_get_mempolicy 239
+#define __NR_get_robust_list 274
+#define __NR_get_thread_area 211
+#define __NR_getcpu 309
+#define __NR_getcwd 79
+#define __NR_getdents 78
+#define __NR_getdents64 217
+#define __NR_getegid 108
+#define __NR_geteuid 107
+#define __NR_getgid 104
+#define __NR_getgroups 115
+#define __NR_getitimer 36
+#define __NR_getpeername 52
+#define __NR_getpgid 121
+#define __NR_getpgrp 111
+#define __NR_getpid 39
+#define __NR_getpmsg 181
+#define __NR_getppid 110
+#define __NR_getpriority 140
+#define __NR_getrandom 318
+#define __NR_getresgid 120
+#define __NR_getresuid 118
+#define __NR_getrlimit 97
+#define __NR_getrusage 98
+#define __NR_getsid 124
+#define __NR_getsockname 51
+#define __NR_getsockopt 55
+#define __NR_gettid 186
+#define __NR_gettimeofday 96
+#define __NR_getuid 102
+#define __NR_getxattr 191
+#define __NR_init_module 175
+#define __NR_inotify_add_watch 254
+#define __NR_inotify_init 253
+#define __NR_inotify_init1 294
+#define __NR_inotify_rm_watch 255
+#define __NR_io_cancel 210
+#define __NR_io_destroy 207
+#define __NR_io_getevents 208
+#define __NR_io_pgetevents 333
+#define __NR_io_setup 206
+#define __NR_io_submit 209
+#define __NR_ioctl 16
+#define __NR_ioperm 173
+#define __NR_iopl 172
+#define __NR_ioprio_get 252
+#define __NR_ioprio_set 251
+#define __NR_kcmp 312
+#define __NR_kexec_file_load 320
+#define __NR_kexec_load 246
+#define __NR_keyctl 250
+#define __NR_kill 62
+#define __NR_lchown 94
+#define __NR_lgetxattr 192
+#define __NR_link 86
+#define __NR_linkat 265
+#define __NR_listen 50
+#define __NR_listxattr 194
+#define __NR_llistxattr 195
+#define __NR_lookup_dcookie 212
+#define __NR_lremovexattr 198
+#define __NR_lseek 8
+#define __NR_lsetxattr 189
+#define __NR_lstat 6
+#define __NR_madvise 28
+#define __NR_mbind 237
+#define __NR_membarrier 324
+#define __NR_memfd_create 319
+#define __NR_migrate_pages 256
+#define __NR_mincore 27
+#define __NR_mkdir 83
+#define __NR_mkdirat 258
+#define __NR_mknod 133
+#define __NR_mknodat 259
+#define __NR_mlock 149
+#define __NR_mlock2 325
+#define __NR_mlockall 151
+#define __NR_mmap 9
+#define __NR_modify_ldt 154
+#define __NR_mount 165
+#define __NR_move_pages 279
+#define __NR_mprotect 10
+#define __NR_mq_getsetattr 245
+#define __NR_mq_notify 244
+#define __NR_mq_open 240
+#define __NR_mq_timedreceive 243
+#define __NR_mq_timedsend 242
+#define __NR_mq_unlink 241
+#define __NR_mremap 25
+#define __NR_msgctl 71
+#define __NR_msgget 68
+#define __NR_msgrcv 70
+#define __NR_msgsnd 69
+#define __NR_msync 26
+#define __NR_munlock 150
+#define __NR_munlockall 152
+#define __NR_munmap 11
+#define __NR_name_to_handle_at 303
+#define __NR_nanosleep 35
+#define __NR_newfstatat 262
+#define __NR_nfsservctl 180
+#define __NR_open 2
+#define __NR_open_by_handle_at 304
+#define __NR_openat 257
+#define __NR_pause 34
+#define __NR_perf_event_open 298
+#define __NR_personality 135
+#define __NR_pipe 22
+#define __NR_pipe2 293
+#define __NR_pivot_root 155
+#define __NR_pkey_alloc 330
+#define __NR_pkey_free 331
+#define __NR_pkey_mprotect 329
+#define __NR_poll 7
+#define __NR_ppoll 271
+#define __NR_prctl 157
+#define __NR_pread64 17
+#define __NR_preadv 295
+#define __NR_preadv2 327
+#define __NR_prlimit64 302
+#define __NR_process_vm_readv 310
+#define __NR_process_vm_writev 311
+#define __NR_pselect6 270
+#define __NR_ptrace 101
+#define __NR_putpmsg 182
+#define __NR_pwrite64 18
+#define __NR_pwritev 296
+#define __NR_pwritev2 328
+#define __NR_query_module 178
+#define __NR_quotactl 179
+#define __NR_read 0
+#define __NR_readahead 187
+#define __NR_readlink 89
+#define __NR_readlinkat 267
+#define __NR_readv 19
+#define __NR_reboot 169
+#define __NR_recvfrom 45
+#define __NR_recvmmsg 299
+#define __NR_recvmsg 47
+#define __NR_remap_file_pages 216
+#define __NR_removexattr 197
+#define __NR_rename 82
+#define __NR_renameat 264
+#define __NR_renameat2 316
+#define __NR_request_key 249
+#define __NR_restart_syscall 219
+#define __NR_rmdir 84
+#define __NR_rseq 334
+#define __NR_rt_sigaction 13
+#define __NR_rt_sigpending 127
+#define __NR_rt_sigprocmask 14
+#define __NR_rt_sigqueueinfo 129
+#define __NR_rt_sigreturn 15
+#define __NR_rt_sigsuspend 130
+#define __NR_rt_sigtimedwait 128
+#define __NR_rt_tgsigqueueinfo 297
+#define __NR_sched_get_priority_max 146
+#define __NR_sched_get_priority_min 147
+#define __NR_sched_getaffinity 204
+#define __NR_sched_getattr 315
+#define __NR_sched_getparam 143
+#define __NR_sched_getscheduler 145
+#define __NR_sched_rr_get_interval 148
+#define __NR_sched_setaffinity 203
+#define __NR_sched_setattr 314
+#define __NR_sched_setparam 142
+#define __NR_sched_setscheduler 144
+#define __NR_sched_yield 24
+#define __NR_seccomp 317
+#define __NR_security 185
+#define __NR_select 23
+#define __NR_semctl 66
+#define __NR_semget 64
+#define __NR_semop 65
+#define __NR_semtimedop 220
+#define __NR_sendfile 40
+#define __NR_sendmmsg 307
+#define __NR_sendmsg 46
+#define __NR_sendto 44
+#define __NR_set_mempolicy 238
+#define __NR_set_robust_list 273
+#define __NR_set_thread_area 205
+#define __NR_set_tid_address 218
+#define __NR_setdomainname 171
+#define __NR_setfsgid 123
+#define __NR_setfsuid 122
+#define __NR_setgid 106
+#define __NR_setgroups 116
+#define __NR_sethostname 170
+#define __NR_setitimer 38
+#define __NR_setns 308
+#define __NR_setpgid 109
+#define __NR_setpriority 141
+#define __NR_setregid 114
+#define __NR_setresgid 119
+#define __NR_setresuid 117
+#define __NR_setreuid 113
+#define __NR_setrlimit 160
+#define __NR_setsid 112
+#define __NR_setsockopt 54
+#define __NR_settimeofday 164
+#define __NR_setuid 105
+#define __NR_setxattr 188
+#define __NR_shmat 30
+#define __NR_shmctl 31
+#define __NR_shmdt 67
+#define __NR_shmget 29
+#define __NR_shutdown 48
+#define __NR_sigaltstack 131
+#define __NR_signalfd 282
+#define __NR_signalfd4 289
+#define __NR_socket 41
+#define __NR_socketpair 53
+#define __NR_splice 275
+#define __NR_stat 4
+#define __NR_statfs 137
+#define __NR_statx 332
+#define __NR_swapoff 168
+#define __NR_swapon 167
+#define __NR_symlink 88
+#define __NR_symlinkat 266
+#define __NR_sync 162
+#define __NR_sync_file_range 277
+#define __NR_syncfs 306
+#define __NR_sysfs 139
+#define __NR_sysinfo 99
+#define __NR_syslog 103
+#define __NR_tee 276
+#define __NR_tgkill 234
+#define __NR_time 201
+#define __NR_timer_create 222
+#define __NR_timer_delete 226
+#define __NR_timer_getoverrun 225
+#define __NR_timer_gettime 224
+#define __NR_timer_settime 223
+#define __NR_timerfd_create 283
+#define __NR_timerfd_gettime 287
+#define __NR_timerfd_settime 286
+#define __NR_times 100
+#define __NR_tkill 200
+#define __NR_truncate 76
+#define __NR_tuxcall 184
+#define __NR_umask 95
+#define __NR_umount2 166
+#define __NR_uname 63
+#define __NR_unlink 87
+#define __NR_unlinkat 263
+#define __NR_unshare 272
+#define __NR_uselib 134
+#define __NR_userfaultfd 323
+#define __NR_ustat 136
+#define __NR_utime 132
+#define __NR_utimensat 280
+#define __NR_utimes 235
+#define __NR_vfork 58
+#define __NR_vhangup 153
+#define __NR_vmsplice 278
+#define __NR_vserver 236
+#define __NR_wait4 61
+#define __NR_waitid 247
+#define __NR_write 1
+#define __NR_writev 20
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h b/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h
new file mode 100644
index 0000000000..ef4ec281ef
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h
@@ -0,0 +1,324 @@
+#define __NR_accept 1073741867
+#define __NR_accept4 1073742112
+#define __NR_access 1073741845
+#define __NR_acct 1073741987
+#define __NR_add_key 1073742072
+#define __NR_adjtimex 1073741983
+#define __NR_afs_syscall 1073742007
+#define __NR_alarm 1073741861
+#define __NR_arch_prctl 1073741982
+#define __NR_bind 1073741873
+#define __NR_bpf 1073742145
+#define __NR_brk 1073741836
+#define __NR_capget 1073741949
+#define __NR_capset 1073741950
+#define __NR_chdir 1073741904
+#define __NR_chmod 1073741914
+#define __NR_chown 1073741916
+#define __NR_chroot 1073741985
+#define __NR_clock_adjtime 1073742129
+#define __NR_clock_getres 1073742053
+#define __NR_clock_gettime 1073742052
+#define __NR_clock_nanosleep 1073742054
+#define __NR_clock_settime 1073742051
+#define __NR_clone 1073741880
+#define __NR_close 1073741827
+#define __NR_connect 1073741866
+#define __NR_copy_file_range 1073742150
+#define __NR_creat 1073741909
+#define __NR_delete_module 1073742000
+#define __NR_dup 1073741856
+#define __NR_dup2 1073741857
+#define __NR_dup3 1073742116
+#define __NR_epoll_create 1073742037
+#define __NR_epoll_create1 1073742115
+#define __NR_epoll_ctl 1073742057
+#define __NR_epoll_pwait 1073742105
+#define __NR_epoll_wait 1073742056
+#define __NR_eventfd 1073742108
+#define __NR_eventfd2 1073742114
+#define __NR_execve 1073742344
+#define __NR_execveat 1073742369
+#define __NR_exit 1073741884
+#define __NR_exit_group 1073742055
+#define __NR_faccessat 1073742093
+#define __NR_fadvise64 1073742045
+#define __NR_fallocate 1073742109
+#define __NR_fanotify_init 1073742124
+#define __NR_fanotify_mark 1073742125
+#define __NR_fchdir 1073741905
+#define __NR_fchmod 1073741915
+#define __NR_fchmodat 1073742092
+#define __NR_fchown 1073741917
+#define __NR_fchownat 1073742084
+#define __NR_fcntl 1073741896
+#define __NR_fdatasync 1073741899
+#define __NR_fgetxattr 1073742017
+#define __NR_finit_module 1073742137
+#define __NR_flistxattr 1073742020
+#define __NR_flock 1073741897
+#define __NR_fork 1073741881
+#define __NR_fremovexattr 1073742023
+#define __NR_fsetxattr 1073742014
+#define __NR_fstat 1073741829
+#define __NR_fstatfs 1073741962
+#define __NR_fsync 1073741898
+#define __NR_ftruncate 1073741901
+#define __NR_futex 1073742026
+#define __NR_futimesat 1073742085
+#define __NR_get_mempolicy 1073742063
+#define __NR_get_robust_list 1073742355
+#define __NR_getcpu 1073742133
+#define __NR_getcwd 1073741903
+#define __NR_getdents 1073741902
+#define __NR_getdents64 1073742041
+#define __NR_getegid 1073741932
+#define __NR_geteuid 1073741931
+#define __NR_getgid 1073741928
+#define __NR_getgroups 1073741939
+#define __NR_getitimer 1073741860
+#define __NR_getpeername 1073741876
+#define __NR_getpgid 1073741945
+#define __NR_getpgrp 1073741935
+#define __NR_getpid 1073741863
+#define __NR_getpmsg 1073742005
+#define __NR_getppid 1073741934
+#define __NR_getpriority 1073741964
+#define __NR_getrandom 1073742142
+#define __NR_getresgid 1073741944
+#define __NR_getresuid 1073741942
+#define __NR_getrlimit 1073741921
+#define __NR_getrusage 1073741922
+#define __NR_getsid 1073741948
+#define __NR_getsockname 1073741875
+#define __NR_getsockopt 1073742366
+#define __NR_gettid 1073742010
+#define __NR_gettimeofday 1073741920
+#define __NR_getuid 1073741926
+#define __NR_getxattr 1073742015
+#define __NR_init_module 1073741999
+#define __NR_inotify_add_watch 1073742078
+#define __NR_inotify_init 1073742077
+#define __NR_inotify_init1 1073742118
+#define __NR_inotify_rm_watch 1073742079
+#define __NR_io_cancel 1073742034
+#define __NR_io_destroy 1073742031
+#define __NR_io_getevents 1073742032
+#define __NR_io_pgetevents 1073742157
+#define __NR_io_setup 1073742367
+#define __NR_io_submit 1073742368
+#define __NR_ioctl 1073742338
+#define __NR_ioperm 1073741997
+#define __NR_iopl 1073741996
+#define __NR_ioprio_get 1073742076
+#define __NR_ioprio_set 1073742075
+#define __NR_kcmp 1073742136
+#define __NR_kexec_file_load 1073742144
+#define __NR_kexec_load 1073742352
+#define __NR_keyctl 1073742074
+#define __NR_kill 1073741886
+#define __NR_lchown 1073741918
+#define __NR_lgetxattr 1073742016
+#define __NR_link 1073741910
+#define __NR_linkat 1073742089
+#define __NR_listen 1073741874
+#define __NR_listxattr 1073742018
+#define __NR_llistxattr 1073742019
+#define __NR_lookup_dcookie 1073742036
+#define __NR_lremovexattr 1073742022
+#define __NR_lseek 1073741832
+#define __NR_lsetxattr 1073742013
+#define __NR_lstat 1073741830
+#define __NR_madvise 1073741852
+#define __NR_mbind 1073742061
+#define __NR_membarrier 1073742148
+#define __NR_memfd_create 1073742143
+#define __NR_migrate_pages 1073742080
+#define __NR_mincore 1073741851
+#define __NR_mkdir 1073741907
+#define __NR_mkdirat 1073742082
+#define __NR_mknod 1073741957
+#define __NR_mknodat 1073742083
+#define __NR_mlock 1073741973
+#define __NR_mlock2 1073742149
+#define __NR_mlockall 1073741975
+#define __NR_mmap 1073741833
+#define __NR_modify_ldt 1073741978
+#define __NR_mount 1073741989
+#define __NR_move_pages 1073742357
+#define __NR_mprotect 1073741834
+#define __NR_mq_getsetattr 1073742069
+#define __NR_mq_notify 1073742351
+#define __NR_mq_open 1073742064
+#define __NR_mq_timedreceive 1073742067
+#define __NR_mq_timedsend 1073742066
+#define __NR_mq_unlink 1073742065
+#define __NR_mremap 1073741849
+#define __NR_msgctl 1073741895
+#define __NR_msgget 1073741892
+#define __NR_msgrcv 1073741894
+#define __NR_msgsnd 1073741893
+#define __NR_msync 1073741850
+#define __NR_munlock 1073741974
+#define __NR_munlockall 1073741976
+#define __NR_munmap 1073741835
+#define __NR_name_to_handle_at 1073742127
+#define __NR_nanosleep 1073741859
+#define __NR_newfstatat 1073742086
+#define __NR_open 1073741826
+#define __NR_open_by_handle_at 1073742128
+#define __NR_openat 1073742081
+#define __NR_pause 1073741858
+#define __NR_perf_event_open 1073742122
+#define __NR_personality 1073741959
+#define __NR_pipe 1073741846
+#define __NR_pipe2 1073742117
+#define __NR_pivot_root 1073741979
+#define __NR_pkey_alloc 1073742154
+#define __NR_pkey_free 1073742155
+#define __NR_pkey_mprotect 1073742153
+#define __NR_poll 1073741831
+#define __NR_ppoll 1073742095
+#define __NR_prctl 1073741981
+#define __NR_pread64 1073741841
+#define __NR_preadv 1073742358
+#define __NR_preadv2 1073742370
+#define __NR_prlimit64 1073742126
+#define __NR_process_vm_readv 1073742363
+#define __NR_process_vm_writev 1073742364
+#define __NR_pselect6 1073742094
+#define __NR_ptrace 1073742345
+#define __NR_putpmsg 1073742006
+#define __NR_pwrite64 1073741842
+#define __NR_pwritev 1073742359
+#define __NR_pwritev2 1073742371
+#define __NR_quotactl 1073742003
+#define __NR_read 1073741824
+#define __NR_readahead 1073742011
+#define __NR_readlink 1073741913
+#define __NR_readlinkat 1073742091
+#define __NR_readv 1073742339
+#define __NR_reboot 1073741993
+#define __NR_recvfrom 1073742341
+#define __NR_recvmmsg 1073742361
+#define __NR_recvmsg 1073742343
+#define __NR_remap_file_pages 1073742040
+#define __NR_removexattr 1073742021
+#define __NR_rename 1073741906
+#define __NR_renameat 1073742088
+#define __NR_renameat2 1073742140
+#define __NR_request_key 1073742073
+#define __NR_restart_syscall 1073742043
+#define __NR_rmdir 1073741908
+#define __NR_rseq 1073742158
+#define __NR_rt_sigaction 1073742336
+#define __NR_rt_sigpending 1073742346
+#define __NR_rt_sigprocmask 1073741838
+#define __NR_rt_sigqueueinfo 1073742348
+#define __NR_rt_sigreturn 1073742337
+#define __NR_rt_sigsuspend 1073741954
+#define __NR_rt_sigtimedwait 1073742347
+#define __NR_rt_tgsigqueueinfo 1073742360
+#define __NR_sched_get_priority_max 1073741970
+#define __NR_sched_get_priority_min 1073741971
+#define __NR_sched_getaffinity 1073742028
+#define __NR_sched_getattr 1073742139
+#define __NR_sched_getparam 1073741967
+#define __NR_sched_getscheduler 1073741969
+#define __NR_sched_rr_get_interval 1073741972
+#define __NR_sched_setaffinity 1073742027
+#define __NR_sched_setattr 1073742138
+#define __NR_sched_setparam 1073741966
+#define __NR_sched_setscheduler 1073741968
+#define __NR_sched_yield 1073741848
+#define __NR_seccomp 1073742141
+#define __NR_security 1073742009
+#define __NR_select 1073741847
+#define __NR_semctl 1073741890
+#define __NR_semget 1073741888
+#define __NR_semop 1073741889
+#define __NR_semtimedop 1073742044
+#define __NR_sendfile 1073741864
+#define __NR_sendmmsg 1073742362
+#define __NR_sendmsg 1073742342
+#define __NR_sendto 1073741868
+#define __NR_set_mempolicy 1073742062
+#define __NR_set_robust_list 1073742354
+#define __NR_set_tid_address 1073742042
+#define __NR_setdomainname 1073741995
+#define __NR_setfsgid 1073741947
+#define __NR_setfsuid 1073741946
+#define __NR_setgid 1073741930
+#define __NR_setgroups 1073741940
+#define __NR_sethostname 1073741994
+#define __NR_setitimer 1073741862
+#define __NR_setns 1073742132
+#define __NR_setpgid 1073741933
+#define __NR_setpriority 1073741965
+#define __NR_setregid 1073741938
+#define __NR_setresgid 1073741943
+#define __NR_setresuid 1073741941
+#define __NR_setreuid 1073741937
+#define __NR_setrlimit 1073741984
+#define __NR_setsid 1073741936
+#define __NR_setsockopt 1073742365
+#define __NR_settimeofday 1073741988
+#define __NR_setuid 1073741929
+#define __NR_setxattr 1073742012
+#define __NR_shmat 1073741854
+#define __NR_shmctl 1073741855
+#define __NR_shmdt 1073741891
+#define __NR_shmget 1073741853
+#define __NR_shutdown 1073741872
+#define __NR_sigaltstack 1073742349
+#define __NR_signalfd 1073742106
+#define __NR_signalfd4 1073742113
+#define __NR_socket 1073741865
+#define __NR_socketpair 1073741877
+#define __NR_splice 1073742099
+#define __NR_stat 1073741828
+#define __NR_statfs 1073741961
+#define __NR_statx 1073742156
+#define __NR_swapoff 1073741992
+#define __NR_swapon 1073741991
+#define __NR_symlink 1073741912
+#define __NR_symlinkat 1073742090
+#define __NR_sync 1073741986
+#define __NR_sync_file_range 1073742101
+#define __NR_syncfs 1073742130
+#define __NR_sysfs 1073741963
+#define __NR_sysinfo 1073741923
+#define __NR_syslog 1073741927
+#define __NR_tee 1073742100
+#define __NR_tgkill 1073742058
+#define __NR_time 1073742025
+#define __NR_timer_create 1073742350
+#define __NR_timer_delete 1073742050
+#define __NR_timer_getoverrun 1073742049
+#define __NR_timer_gettime 1073742048
+#define __NR_timer_settime 1073742047
+#define __NR_timerfd_create 1073742107
+#define __NR_timerfd_gettime 1073742111
+#define __NR_timerfd_settime 1073742110
+#define __NR_times 1073741924
+#define __NR_tkill 1073742024
+#define __NR_truncate 1073741900
+#define __NR_tuxcall 1073742008
+#define __NR_umask 1073741919
+#define __NR_umount2 1073741990
+#define __NR_uname 1073741887
+#define __NR_unlink 1073741911
+#define __NR_unlinkat 1073742087
+#define __NR_unshare 1073742096
+#define __NR_userfaultfd 1073742147
+#define __NR_ustat 1073741960
+#define __NR_utime 1073741956
+#define __NR_utimensat 1073742104
+#define __NR_utimes 1073742059
+#define __NR_vfork 1073741882
+#define __NR_vhangup 1073741977
+#define __NR_vmsplice 1073742356
+#define __NR_wait4 1073741885
+#define __NR_waitid 1073742353
+#define __NR_write 1073741825
+#define __NR_writev 1073742340
