(SYSCALL_ERROR_HANDLER): Don't store into global errno if we already
authordrepper <drepper>
Fri, 6 Mar 1998 11:38:58 +0000 (11:38 +0000)
committerdrepper <drepper>
Fri, 6 Mar 1998 11:38:58 +0000 (11:38 +0000)
store through __errno_location.

sysdeps/unix/alpha/sysdep.S
sysdeps/unix/i386/sysdep.S
sysdeps/unix/sysv/linux/i386/sysdep.h

index d79c48a..53fc454 100644 (file)
@@ -48,9 +48,6 @@ __syscall_error:
        .mask   0x4000001, -16
        .prologue 1
 
-       /* Store into the "real" variable.  */
-       stl     v0, errno
-
        /* Find our per-thread errno address  */
        jsr     ra, __errno_location
 
index b296bb7..ff1fc0f 100644 (file)
@@ -39,8 +39,9 @@ syscall_error:
 notb:
 #endif
 #ifndef        PIC
+#ifndef        _LIBC_REENTRANT
        movl %eax, C_SYMBOL_NAME(errno)
-#ifdef _LIBC_REENTRANT
+#else
        pushl %eax
        call __errno_location
        popl %ecx
@@ -49,14 +50,13 @@ notb:
 #else
        /* The caller has pushed %ebx and then set it up to
           point to the GOT before calling us through the PLT.  */
+#ifndef        _LIBC_REENTRANT
        movl C_SYMBOL_NAME(errno@GOT)(%ebx), %ecx
 
-#ifndef        _LIBC_REENTRANT
        /* Pop %ebx value saved before jumping here.  */
        popl %ebx
        movl %eax, (%ecx)
 #else
-       movl %eax, (%ecx)
        pushl %eax
        call C_SYMBOL_NAME(__errno_location@PLT)
        popl %ecx
index 4ebcc6c..713bd44 100644 (file)
@@ -74,8 +74,6 @@ syscall_error:                                                                      \
   xorl %edx, %edx;                                                           \
   addl $_GLOBAL_OFFSET_TABLE_+[.-0b], %ebx;                                  \
   subl %eax, %edx;                                                           \
-  movl errno@GOT(%ebx), %ecx;                                                \
-  movl %edx, (%ecx);                                                         \
   pushl %edx;                                                                \
   call __errno_location@PLT;                                                 \
   popl %ecx;                                                                 \