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 Pull up revisions 1.14-1.15 (request...



details:   https://anonhg.NetBSD.org/src/rev/651fdef77322
branches:  netbsd-1-4
changeset: 470391:651fdef77322
user:      he <he%NetBSD.org@localhost>
date:      Tue Feb 22 22:16:10 2000 +0000

description:
Pull up revisions 1.14-1.15 (requested by mycroft):
  Implement a better fix for the ``stubs in other shlibs'' problem.
  With this fix the stack is left clean during the transition from
  the stub to cerror().

diffstat:

 lib/libc/arch/i386/SYS.h |  17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r 166a9db1e3c5 -r 651fdef77322 lib/libc/arch/i386/SYS.h
--- a/lib/libc/arch/i386/SYS.h  Tue Feb 22 21:58:37 2000 +0000
+++ b/lib/libc/arch/i386/SYS.h  Tue Feb 22 22:16:10 2000 +0000
@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *     from: @(#)SYS.h 5.5 (Berkeley) 5/7/91
- *     $NetBSD: SYS.h,v 1.13 1999/02/07 17:21:38 christos Exp $
+ *     $NetBSD: SYS.h,v 1.13.2.1 2000/02/22 22:16:10 he Exp $
  */
 
 #include <machine/asm.h>
@@ -58,11 +58,22 @@
        ENTRY(x);                                                       \
        SYSTRAP(y)
 
+#ifdef PIC
 #define _SYSCALL(x,y)                                                  \
-       .text; .align 2;                                                \
-       2: PIC_PROLOGUE; jmp PIC_PLT(CERROR);                           \
+       .text; _ALIGN_TEXT;                                             \
+       2: PIC_PROLOGUE;                                                \
+          mov PIC_GOT(CERROR), %ecx;                                   \
+          PIC_EPILOGUE;                                                \
+          jmp %ecx;                                                    \
        _SYSCALL_NOERROR(x,y);                                          \
        jc 2b
+#else
+#define _SYSCALL(x,y)                                                  \
+       .text; _ALIGN_TEXT;                                             \
+       2: jmp CERROR;                                                  \
+       _SYSCALL_NOERROR(x,y);                                          \
+       jc 2b
+#endif
 
 #define SYSCALL_NOERROR(x)                                             \
        _SYSCALL_NOERROR(x,x)



Home | Main Index | Thread Index | Old Index