|
@@ -1,4 +1,4 @@
|
|
-/* Copyright (C) 2001 Free Software Foundation, Inc.
|
|
+/* Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
|
This file is part of the GNU C Library.
|
|
This file is part of the GNU C Library.
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
@@ -25,11 +25,9 @@
|
|
.type C_SYMBOL_NAME(errno),@object
|
|
.type C_SYMBOL_NAME(errno),@object
|
|
.lcomm C_SYMBOL_NAME(errno),4
|
|
.lcomm C_SYMBOL_NAME(errno),4
|
|
|
|
|
|
|
|
+ .weak errno
|
|
errno = _errno
|
|
errno = _errno
|
|
|
|
|
|
- /* weak_alias (errno, _errno) */
|
|
|
|
-
|
|
|
|
-
|
|
|
|
/* The syscall stubs jump here when they detect an error, bot for PIC and
|
|
/* The syscall stubs jump here when they detect an error, bot for PIC and
|
|
non-PIC. */
|
|
non-PIC. */
|
|
|
|
|
|
@@ -39,25 +37,38 @@ ENTRY (__syscall_error)
|
|
neg.d r10,r10
|
|
neg.d r10,r10
|
|
|
|
|
|
#ifdef __UCLIBC_HAS_THREADS__
|
|
#ifdef __UCLIBC_HAS_THREADS__
|
|
- push r10
|
|
+ subq 4,sp
|
|
- push srp
|
|
+ move.d r10,[sp]
|
|
|
|
+ subq 4,sp
|
|
|
|
+ move srp,[sp]
|
|
|
|
|
|
/* Note that __syscall_error is only visible within this library,
|
|
/* Note that __syscall_error is only visible within this library,
|
|
and no-one passes it on as a pointer, so can assume that R0 (GOT
|
|
and no-one passes it on as a pointer, so can assume that R0 (GOT
|
|
pointer) is correctly set up. */
|
|
pointer) is correctly set up. */
|
|
- PLTCALL (__errno_location)
|
|
+ PLTCALL (HIDDEN_JUMPTARGET(__errno_location))
|
|
|
|
|
|
- pop srp
|
|
+ move [sp+],srp
|
|
- pop r11
|
|
+ move.d [sp+],r11
|
|
move.d r11,[r10]
|
|
move.d r11,[r10]
|
|
|
|
|
|
#else /* not __UCLIBC_HAS_THREADS__ */
|
|
#else /* not __UCLIBC_HAS_THREADS__ */
|
|
|
|
+#ifdef __arch_v32
|
|
|
|
+# ifdef __PIC__
|
|
|
|
+ addo.d C_SYMBOL_NAME(errno:GOT),r0,acr
|
|
|
|
+ move.d [acr],r9
|
|
|
|
+ move.d r10,[r9]
|
|
|
|
+# else /* not __PIC__ */
|
|
|
|
+ lapc C_SYMBOL_NAME(errno),acr
|
|
|
|
+ move.d r10,[r9]
|
|
|
|
+# endif /* not __PIC__ */
|
|
|
|
+#else /* not __arch_v32 */
|
|
# ifdef __PIC__
|
|
# ifdef __PIC__
|
|
move.d [r0+C_SYMBOL_NAME(errno:GOT)],r9
|
|
move.d [r0+C_SYMBOL_NAME(errno:GOT)],r9
|
|
move.d r10,[r9]
|
|
move.d r10,[r9]
|
|
# else
|
|
# else
|
|
move.d r10,[C_SYMBOL_NAME(errno)]
|
|
move.d r10,[C_SYMBOL_NAME(errno)]
|
|
# endif
|
|
# endif
|
|
|
|
+#endif /* not __arch_v32 */
|
|
#endif /* __UCLIBC_HAS_THREADS__ */
|
|
#endif /* __UCLIBC_HAS_THREADS__ */
|
|
|
|
|
|
#ifdef __PIC__
|
|
#ifdef __PIC__
|
|
@@ -69,7 +80,7 @@ ENTRY (__syscall_error)
|
|
|
|
|
|
moveq -1,r10
|
|
moveq -1,r10
|
|
Ret
|
|
Ret
|
|
- pop r0
|
|
+ move.d [sp+],r0
|
|
#else
|
|
#else
|
|
Ret
|
|
Ret
|
|
moveq -1,r10
|
|
moveq -1,r10
|