[v2,05/23] linux: Use generic __syscall_error for aarch64
Commit Message
The auto-generated syscalls calls the __syscall_error, although setting
using inline function generates slight less code:
--- sizes-aarch64-linux-gnu.outline
+++ sizes-aarch64-linux-gnu.inline
text data bss dec hex filename
1388874 19096 14520 1422490 15b49a libc.so
- 138509 7136 344 145989 23a45 elf/ld.so
- 98439 1636 16656 116731 1c7fb nptl/libpthread.so
- 23942 1236 248 25426 6352 rt/librt.so
+ 138449 7136 344 145929 23a09 elf/ld.so
+ 98567 1636 16656 116859 1c87b nptl/libpthread.so
+ 23918 1236 248 25402 633a rt/librt.so
Checked on aarch64-linux-gnu.
---
.../aarch64/{sysdep.c => syscall_error.h} | 23 +++++++------------
1 file changed, 8 insertions(+), 15 deletions(-)
rename sysdeps/unix/sysv/linux/aarch64/{sysdep.c => syscall_error.h} (63%)
similarity index 63%
rename from sysdeps/unix/sysv/linux/aarch64/sysdep.c
rename to sysdeps/unix/sysv/linux/aarch64/syscall_error.h
@@ -1,5 +1,5 @@
-/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
-
+/* Linux wrappers for setting errno. AArch64 version.
+ Copyright (C) 2020 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
@@ -13,20 +13,13 @@
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
+ License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#include <errno.h>
+#ifndef _SYSCALL_ERROR_H
+#define _SYSCALL_ERROR_H
-long __syscall_error (long err);
-hidden_proto (__syscall_error)
+#define SYSCALL_ERROR_FUNC 1
+#define SYSCALL_ERROR_FUNC_ATTR
-/* This routine is jumped to by all the syscall handlers, to stash
- an error number into errno. */
-long
-__syscall_error (long err)
-{
- __set_errno (- err);
- return -1;
-}
-hidden_def (__syscall_error)
+#endif