1 /* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2002, 2003,
3 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23 #include <bits/errno.h>
26 # include <dl-sysdep.h> /* Defines RTLD_PRIVATE_ERRNO. */
37 #if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
38 /* We translate the system's EWOULDBLOCK error into EAGAIN.
39 The GNU C library always defines EWOULDBLOCK==EAGAIN.
40 EWOULDBLOCK_sys is the original number. */
41 cmp r0, $EWOULDBLOCK_sys /* Is it the old EWOULDBLOCK? */
42 moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */
60 1: .word errno(gottpoff) + (. - 2b - 8)
61 #elif RTLD_PRIVATE_ERRNO
67 1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8
68 #elif defined(_LIBC_REENTRANT)
70 cfi_adjust_cfa_offset (4)
71 cfi_rel_offset (lr, 0)
73 cfi_adjust_cfa_offset (4)
74 bl PLTJMP(C_SYMBOL_NAME(__errno_location))
76 cfi_adjust_cfa_offset (-4)
87 1: .long C_SYMBOL_NAME(errno)
89 @ we have to establish our PIC register
97 1: .word _GLOBAL_OFFSET_TABLE_ - 0b - 8
98 2: .word C_SYMBOL_NAME(errno)(GOTOFF)
102 #undef __syscall_error
103 END (__syscall_error)