@@ -2,7 +2,4 @@ libc {
GLIBC_2.32 {
__mcount;
}
- GLIBC_PRIVATE {
- __syscall_error;
- }
}
similarity index 67%
rename from sysdeps/unix/sysv/linux/arc/sysdep.c
rename to sysdeps/unix/sysv/linux/arc/syscall_error.h
@@ -1,4 +1,4 @@
-/* ARC wrapper for setting errno.
+/* Linux wrappers for setting errno. AArch64 version.
Copyright (C) 2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -16,18 +16,10 @@
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
-extern long int __syscall_error (long int);
-libc_hidden_proto (__syscall_error)
+#define SYSCALL_ERROR_FUNC 1
+#define SYSCALL_ERROR_FUNC_ATTR
-/* All syscall handlers land here to avoid generated code bloat due to
- GOT reference to errno_location or it's equivalent. */
-long int
-__syscall_error (long int err_no)
-{
- __set_errno (-err_no);
- return -1;
-}
-
-libc_hidden_def (__syscall_error)
+#endif
@@ -103,22 +103,12 @@
# define PSEUDO_END_ERRVAL(name) \
END (name)
-
-/* To reduce the code footprint, we confine the actual errno access
- to single place in __syscall_error().
- This takes raw kernel error value, sets errno and returns -1. */
-# if IS_IN (libc)
-# define CALL_ERRNO_SETTER_C bl PLTJMP(HIDDEN_JUMPTARGET(__syscall_error))
-# else
-# define CALL_ERRNO_SETTER_C bl PLTJMP(__syscall_error)
-# endif
-
# define SYSCALL_ERROR_HANDLER \
L (call_syscall_err): ASM_LINE_SEP \
push_s blink ASM_LINE_SEP \
cfi_adjust_cfa_offset (4) ASM_LINE_SEP \
cfi_rel_offset (blink, 0) ASM_LINE_SEP \
- CALL_ERRNO_SETTER_C ASM_LINE_SEP \
+ bl __syscall_error ASM_LINE_SEP \
pop_s blink ASM_LINE_SEP \
cfi_adjust_cfa_offset (-4) ASM_LINE_SEP \
cfi_restore (blink) ASM_LINE_SEP \