Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/i386/sys Make cerror() work correctly for stub...
details: https://anonhg.NetBSD.org/src/rev/b7805d2771fe
branches: trunk
changeset: 481150:b7805d2771fe
user: mycroft <mycroft%NetBSD.org@localhost>
date: Sun Jan 23 23:38:32 2000 +0000
description:
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 0d40b2086aa4 -r b7805d2771fe lib/libc/arch/i386/sys/cerror.S
--- a/lib/libc/arch/i386/sys/cerror.S Sun Jan 23 23:37:42 2000 +0000
+++ b/lib/libc/arch/i386/sys/cerror.S Sun Jan 23 23:38:32 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.11 2000/01/23 23:38:32 mycroft 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.11 2000/01/23 23:38:32 mycroft 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