Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/lib/libc/arch/i386/sys Pull up revision 1.11 (requested...



details:   https://anonhg.NetBSD.org/src/rev/dbcfa9f13315
branches:  netbsd-1-4
changeset: 470223:dbcfa9f13315
user:      he <he%NetBSD.org@localhost>
date:      Mon Jan 31 19:48:47 2000 +0000

description:
Pull up revision 1.11 (requested by mycroft):
  Make cerror() work correctly for stubs in other shlibs -- e.g.
  libposix.

diffstat:

 lib/libc/arch/i386/sys/cerror.S |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r 1bee523b5605 -r dbcfa9f13315 lib/libc/arch/i386/sys/cerror.S
--- a/lib/libc/arch/i386/sys/cerror.S   Mon Jan 31 19:46:54 2000 +0000
+++ b/lib/libc/arch/i386/sys/cerror.S   Mon Jan 31 19:48:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cerror.S,v 1.10 1999/02/07 17:22:25 christos Exp $     */
+/*     $NetBSD: cerror.S,v 1.10.2.1 2000/01/31 19:48:47 he Exp $       */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -40,7 +40,7 @@
 
 #include <machine/asm.h>
 #if defined(SYSLIBC_SCCS) && !defined(lint)
-       RCSID("$NetBSD: cerror.S,v 1.10 1999/02/07 17:22:25 christos Exp $")
+       RCSID("$NetBSD: cerror.S,v 1.10.2.1 2000/01/31 19:48:47 he Exp $")
 #endif /* SYSLIBC_SCCS and not lint */
 
 #include "SYS.h"
@@ -51,6 +51,15 @@
        .globl  _C_LABEL(errno)
 #endif
 _ENTRY(CERROR)
+#ifdef PIC
+       /* This is PIC_PROLOGUE without the pushl at the beginning.  The stub
+          already did that. */
+       call    1f
+1:
+       popl    %ebx
+       addl    $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx
+#endif
+
 #ifdef _REENTRANT
        pushl   %eax
 # ifdef PIC
@@ -58,8 +67,7 @@
 # else
        call    _C_LABEL(__errno)
 # endif /* PIC */
-       popl    %ecx
-       movl    %ecx,(%eax)
+       popl    (%eax)
 #else
 # ifdef PIC
        movl    PIC_GOT(_C_LABEL(errno)),%ecx



Home | Main Index | Thread Index | Old Index