1 /* Copyright (C) 2000, 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
23 /* The following code is only used in the shared library when we
24 compile the reentrant version. Otherwise each system call defines
27 /* The syscall stubs jump here when they detect an error. */
33 ENTRY(__syscall_error)
37 # define SYSCALL_ERROR_ERRNO __libc_errno
39 # define SYSCALL_ERROR_ERRNO errno
48 1: .long SYSCALL_ERROR_ERRNO@ntpoff
49 # elif !defined _LIBC_REENTRANT
58 stm %r13,%r15,52(%r15)
59 cfi_offset (%r15, -36)
60 cfi_offset (%r14, -40)
61 cfi_offset (%r13, -44)
64 cfi_adjust_cfa_offset (96)
71 lm %r13,%r15,148(%r15)
72 cfi_adjust_cfa_offset (-96)
75 1: .long __errno_location
78 # if RTLD_PRIVATE_ERRNO
85 1: .long rtld_errno - 0b
88 # define SYSCALL_ERROR_ERRNO __libc_errno
90 # define SYSCALL_ERROR_ERRNO errno
95 l %r1,SYSCALL_ERROR_ERRNO@gotntpoff(%r1)
100 1: .long _GLOBAL_OFFSET_TABLE_-0b
101 # elif !defined _LIBC_REENTRANT
109 1: .long _GLOBAL_OFFSET_TABLE_-0b
111 stm %r11,%r15,44(%r15)
112 cfi_offset (%r15, -36)
113 cfi_offset (%r14, -40)
114 cfi_offset (%r13, -44)
115 cfi_offset (%r12, -48)
116 cfi_offset (%r11, -52)
119 cfi_adjust_cfa_offset (96)
123 0: l %r12,1f-0b(%r13)
128 lm %r11,%r15,140(%r15)
129 cfi_adjust_cfa_offset (-96)
132 1: .long _GLOBAL_OFFSET_TABLE_-0b
133 2: .long __errno_location@PLT-0b
137 END (__syscall_error)