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. */
59 1: .word errno(gottpoff) + (. - 2b - 8)
60 #elif RTLD_PRIVATE_ERRNO
66 1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8
67 #elif defined(_LIBC_REENTRANT)
70 bl PLTJMP(C_SYMBOL_NAME(__errno_location))
82 1: .long C_SYMBOL_NAME(errno)
84 @ we have to establish our PIC register
92 1: .word _GLOBAL_OFFSET_TABLE_ - 0b - 8
93 2: .word C_SYMBOL_NAME(errno)(GOTOFF)
97 #undef __syscall_error