@@ -1,2 +1,2 @@
text data bss dec hex filename
- 120 0 0 120 78 io/fstatat64.o
+ 128 0 0 128 80 io/fstatat64.o
For shared objects the inline syscall generates slight large code
(specially for libc.so).
text data bss dec hex filename
-1755806 20232 14544 1790582 1b5276 libc.so
- 169705 6696 336 176737 2b261 elf/ld.so
- 111982 1664 16680 130326 1fd16 nptl/libpthread.so
- 29703 1132 2296 33131 816b rt/librt.so
+1756334 20232 14544 1791110 1b5486 libc.so
+ 169385 6696 336 176417 2b121 elf/ld.so
+ 112198 1664 16680 130542 1fdee nptl/libpthread.so
+ 29719 1132 2296 33147 817b rt/librt.so
Checked on s390x-linux-gnu and s390-linux-gnu.
---
sysdeps/s390/nptl/Makefile | 5 --
sysdeps/unix/sysv/linux/s390/Makefile | 5 --
sysdeps/unix/sysv/linux/s390/rt-sysdep.S | 1 -
sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S | 74 ------------------
sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S | 75 -------------------
sysdeps/unix/sysv/linux/s390/syscall_error.c | 5 ++
6 files changed, 5 insertions(+), 160 deletions(-)
delete mode 100644 sysdeps/unix/sysv/linux/s390/rt-sysdep.S
delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S
delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S
create mode 100644 sysdeps/unix/sysv/linux/s390/syscall_error.c
@@ -18,8 +18,3 @@
ifeq ($(subdir),csu)
gen-as-const-headers += tcb-offsets.sym
endif
-
-ifeq ($(subdir),nptl)
-libpthread-routines += sysdep
-libpthread-shared-only-routines += sysdep
-endif
@@ -2,11 +2,6 @@ abi-variants := 32 64
abi-32-condition := __WORDSIZE == 32
abi-64-condition := __WORDSIZE == 64
-ifeq ($(subdir),rt)
-librt-routines += rt-sysdep
-librt-shared-only-routines += rt-sysdep
-endif
-
ifeq ($(subdir),stdlib)
gen-as-const-headers += ucontext_i.sym
endif
deleted file mode 100644
@@ -1 +0,0 @@
-#include <sysdep.S>
deleted file mode 100644
@@ -1,74 +0,0 @@
-/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
- Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
- 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
- <https://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-#include <tls.h>
-
-/* The following code is only used in the shared library when we
- compile the reentrant version. Otherwise each system call defines
- each own version. */
-
-/* The syscall stubs jump here when they detect an error. */
-
-#undef CALL_MCOUNT
-#define CALL_MCOUNT
-
- .text
-ENTRY(__syscall_error)
-#ifndef PIC
-# if IS_IN (libc)
-# define SYSCALL_ERROR_ERRNO __libc_errno
-# else
-# define SYSCALL_ERROR_ERRNO errno
-# endif
- basr %r1,0
-0: l %r1,1f-0b(%r1)
- ear %r3,%a0
- lcr %r2,%r2
- st %r2,0(%r1,%r3)
- lhi %r2,-1
- br %r14
-1: .long SYSCALL_ERROR_ERRNO@ntpoff
-#else
-# if RTLD_PRIVATE_ERRNO
- basr %r1,0
-0: al %r1,1f-0b(%r1)
- lcr %r2,%r2
- st %r2,0(%r1)
- lhi %r2,-1
- br %r14
-1: .long rtld_errno - 0b
-# else
-# if IS_IN (libc)
-# define SYSCALL_ERROR_ERRNO __libc_errno
-# else
-# define SYSCALL_ERROR_ERRNO errno
-# endif
- basr %r1,0
-0: al %r1,1f-0b(%r1)
- ear %r3,%a0
- l %r1,SYSCALL_ERROR_ERRNO@gotntpoff(%r1)
- lcr %r2,%r2
- st %r2,0(%r1,%r3)
- lhi %r2,-1
- br %r14
-1: .long _GLOBAL_OFFSET_TABLE_-0b
-# endif
-#endif
-
-END (__syscall_error)
deleted file mode 100644
@@ -1,75 +0,0 @@
-/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
- Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
- 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
- <https://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-#include <tls.h>
-
-
-/* The following code is only used in the shared library when we
- compile the reentrant version. Otherwise each system call defines
- each own version. */
-
-/* The syscall stubs jump here when they detect an error. */
-
-#undef CALL_MCOUNT
-#define CALL_MCOUNT
-
-.text
-ENTRY(__syscall_error)
-#ifndef PIC
-# if IS_IN (libc)
-# define SYSCALL_ERROR_ERRNO __libc_errno
-# else
-# define SYSCALL_ERROR_ERRNO errno
-# endif
- basr %r1,0
-0: lg %r1,1f-0b(%r1)
- ear %r3,%a0
- sllg %r3,%r3,32
- ear %r3,%a1
- lcr %r2,%r2
- st %r2,0(%r1,%r3)
- lghi %r2,-1
- br %r14
-1: .quad SYSCALL_ERROR_ERRNO@ntpoff
-#else
-# if RTLD_PRIVATE_ERRNO
- larl %r1,rtld_errno
- lcr %r2,%r2
- st %r2,0(%r1)
- lghi %r2,-1
- br %r14
-# else
-# if IS_IN (libc)
-# define SYSCALL_ERROR_ERRNO __libc_errno
-# else
-# define SYSCALL_ERROR_ERRNO errno
-# endif
- larl %r1,_GLOBAL_OFFSET_TABLE_
- lg %r1,SYSCALL_ERROR_ERRNO@gotntpoff(%r1)
- ear %r3,%a0
- sllg %r3,%r3,32
- ear %r3,%a1
- lcr %r2,%r2
- st %r2,0(%r1,%r3)
- lghi %r2,-1
- br %r14
-# endif
-#endif
-
-END (__syscall_error)
new file mode 100644
@@ -0,0 +1,5 @@
+/* The auto-generated syscalls calls __syscall_error for static objects. */
+#ifndef SHARED
+# define SYSCALL_ERROR_FUNC
+#endif
+#include <sysdeps/unix/sysv/linux/syscall_error.c>