1 /* Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
24 /* The following code is only used in the shared library when we
25 compile the reentrant version. Otherwise each system call defines
28 /* The syscall stubs jump here when they detect an error. */
34 ENTRY(__syscall_error)
38 # define SYSCALL_ERROR_ERRNO __libc_errno
40 # define SYSCALL_ERROR_ERRNO errno
51 1: .quad SYSCALL_ERROR_ERRNO@ntpoff
52 # elif !defined _LIBC_REENTRANT
59 stmg %r13,%r15,104(%r15)
65 cfi_adjust_cfa_offset (160)
68 brasl %r14,__errno_location
70 lmg %r13,%r15,264(%r15)
71 cfi_adjust_cfa_offset (-160)
76 # if RTLD_PRIVATE_ERRNO
84 # define SYSCALL_ERROR_ERRNO __libc_errno
86 # define SYSCALL_ERROR_ERRNO errno
88 larl %r1,_GLOBAL_OFFSET_TABLE_
89 lg %r1,SYSCALL_ERROR_ERRNO@gotntpoff(%r1)
97 # elif !defined _LIBC_REENTRANT
98 larl %r1,_GLOBAL_OFFSET_TABLE_
105 stmg %r13,%r15,104(%r15)
106 cfi_offset (%r15,-40)
107 cfi_offset (%r14,-48)
108 cfi_offset (%r13,-56)
111 cfi_adjust_cfa_offset (160)
114 brasl %r14,__errno_location@PLT
116 lmg %r13,%r15,264(%r15)
117 cfi_adjust_cfa_offset (-160)
123 END (__syscall_error)