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 Mark __cerror as hidden and exploit t...
details: https://anonhg.NetBSD.org/src/rev/f253e8767fe4
branches: trunk
changeset: 771294:f253e8767fe4
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Nov 18 20:21:41 2011 +0000
description:
Mark __cerror as hidden and exploit that to simplify assembler.
diffstat:
lib/libc/arch/i386/sys/__clone.S | 9 +--------
lib/libc/arch/i386/sys/__syscall.S | 11 ++---------
lib/libc/arch/i386/sys/__vfork14.S | 11 ++---------
lib/libc/arch/i386/sys/brk.S | 9 +++------
lib/libc/arch/i386/sys/cerror.S | 5 +++--
lib/libc/arch/i386/sys/exect.S | 11 ++---------
lib/libc/arch/i386/sys/ptrace.S | 11 ++---------
lib/libc/arch/i386/sys/sbrk.S | 9 +++------
lib/libc/arch/i386/sys/syscall.S | 11 ++---------
9 files changed, 20 insertions(+), 67 deletions(-)
diffs (255 lines):
diff -r 7e489cd5815b -r f253e8767fe4 lib/libc/arch/i386/sys/__clone.S
--- a/lib/libc/arch/i386/sys/__clone.S Fri Nov 18 20:17:46 2011 +0000
+++ b/lib/libc/arch/i386/sys/__clone.S Fri Nov 18 20:21:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: __clone.S,v 1.3 2001/07/18 12:24:53 fvdl Exp $ */
+/* $NetBSD: __clone.S,v 1.4 2011/11/18 20:21:41 joerg Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -100,11 +100,4 @@
addl $12,%esp
5:
popl %ebp
-#ifdef PIC
- PIC_PROLOGUE
- movl PIC_GOT(CERROR),%edx
- PIC_EPILOGUE
- jmp *%edx
-#else
jmp CERROR
-#endif
diff -r 7e489cd5815b -r f253e8767fe4 lib/libc/arch/i386/sys/__syscall.S
--- a/lib/libc/arch/i386/sys/__syscall.S Fri Nov 18 20:17:46 2011 +0000
+++ b/lib/libc/arch/i386/sys/__syscall.S Fri Nov 18 20:21:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: __syscall.S,v 1.3 2003/08/07 16:42:08 agc Exp $ */
+/* $NetBSD: __syscall.S,v 1.4 2011/11/18 20:21:41 joerg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -36,7 +36,7 @@
#include <machine/asm.h>
#if defined(SYSLIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: __syscall.S,v 1.3 2003/08/07 16:42:08 agc Exp $")
+ RCSID("$NetBSD: __syscall.S,v 1.4 2011/11/18 20:21:41 joerg Exp $")
#endif /* SYSLIBC_SCCS and not lint */
#include "SYS.h"
@@ -52,11 +52,4 @@
jc err
ret
err:
-#ifdef PIC
- PIC_PROLOGUE
- mov PIC_GOT(CERROR), %ecx
- PIC_EPILOGUE
- jmp *%ecx
-#else
jmp CERROR
-#endif
diff -r 7e489cd5815b -r f253e8767fe4 lib/libc/arch/i386/sys/__vfork14.S
--- a/lib/libc/arch/i386/sys/__vfork14.S Fri Nov 18 20:17:46 2011 +0000
+++ b/lib/libc/arch/i386/sys/__vfork14.S Fri Nov 18 20:21:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: __vfork14.S,v 1.8 2007/03/09 14:30:48 ad Exp $ */
+/* $NetBSD: __vfork14.S,v 1.9 2011/11/18 20:21:41 joerg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -36,7 +36,7 @@
#include <machine/asm.h>
#if defined(SYSLIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: __vfork14.S,v 1.8 2007/03/09 14:30:48 ad Exp $")
+ RCSID("$NetBSD: __vfork14.S,v 1.9 2011/11/18 20:21:41 joerg Exp $")
#endif /* SYSLIBC_SCCS and not lint */
#include "SYS.h"
@@ -57,11 +57,4 @@
jmp *%ecx
err:
pushl %ecx
-#ifdef PIC
- PIC_PROLOGUE
- mov PIC_GOT(CERROR), %ecx
- PIC_EPILOGUE
- jmp *%ecx
-#else
jmp CERROR
-#endif
diff -r 7e489cd5815b -r f253e8767fe4 lib/libc/arch/i386/sys/brk.S
--- a/lib/libc/arch/i386/sys/brk.S Fri Nov 18 20:17:46 2011 +0000
+++ b/lib/libc/arch/i386/sys/brk.S Fri Nov 18 20:21:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: brk.S,v 1.21 2007/03/09 14:30:56 ad Exp $ */
+/* $NetBSD: brk.S,v 1.22 2011/11/18 20:21:41 joerg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -36,7 +36,7 @@
#include <machine/asm.h>
#if defined(SYSLIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: brk.S,v 1.21 2007/03/09 14:30:56 ad Exp $")
+ RCSID("$NetBSD: brk.S,v 1.22 2011/11/18 20:21:41 joerg Exp $")
#endif /* SYSLIBC_SCCS and not lint */
#include "SYS.h"
@@ -74,10 +74,7 @@
xorl %eax,%eax
ret
err:
- PIC_PROLOGUE
- mov PIC_GOT(CERROR),%edx
- PIC_EPILOGUE
- jmp *%edx
+ jmp CERROR
#else
movl 4(%esp),%ecx
cmpl %ecx,_C_LABEL(__minbrk)
diff -r 7e489cd5815b -r f253e8767fe4 lib/libc/arch/i386/sys/cerror.S
--- a/lib/libc/arch/i386/sys/cerror.S Fri Nov 18 20:17:46 2011 +0000
+++ b/lib/libc/arch/i386/sys/cerror.S Fri Nov 18 20:21:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cerror.S,v 1.14 2003/08/07 16:42:08 agc Exp $ */
+/* $NetBSD: cerror.S,v 1.15 2011/11/18 20:21:41 joerg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -36,12 +36,13 @@
#include <machine/asm.h>
#if defined(SYSLIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: cerror.S,v 1.14 2003/08/07 16:42:08 agc Exp $")
+ RCSID("$NetBSD: cerror.S,v 1.15 2011/11/18 20:21:41 joerg Exp $")
#endif /* SYSLIBC_SCCS and not lint */
#include "SYS.h"
.globl _C_LABEL(__errno)
+ .hidden CERROR
_ENTRY(CERROR)
pushl %eax
diff -r 7e489cd5815b -r f253e8767fe4 lib/libc/arch/i386/sys/exect.S
--- a/lib/libc/arch/i386/sys/exect.S Fri Nov 18 20:17:46 2011 +0000
+++ b/lib/libc/arch/i386/sys/exect.S Fri Nov 18 20:21:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exect.S,v 1.13 2003/08/07 16:42:08 agc Exp $ */
+/* $NetBSD: exect.S,v 1.14 2011/11/18 20:21:41 joerg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -36,7 +36,7 @@
#include <machine/asm.h>
#if defined(SYSLIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: exect.S,v 1.13 2003/08/07 16:42:08 agc Exp $")
+ RCSID("$NetBSD: exect.S,v 1.14 2011/11/18 20:21:41 joerg Exp $")
#endif /* SYSLIBC_SCCS and not lint */
#include "SYS.h"
@@ -47,11 +47,4 @@
orb $(PSL_T>>8),1(%esp)
popfl
SYSTRAP(execve)
-#ifdef PIC
- PIC_PROLOGUE
- mov PIC_GOT(CERROR), %ecx
- PIC_EPILOGUE
- jmp *%ecx
-#else
jmp CERROR
-#endif
diff -r 7e489cd5815b -r f253e8767fe4 lib/libc/arch/i386/sys/ptrace.S
--- a/lib/libc/arch/i386/sys/ptrace.S Fri Nov 18 20:17:46 2011 +0000
+++ b/lib/libc/arch/i386/sys/ptrace.S Fri Nov 18 20:21:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ptrace.S,v 1.16 2003/08/07 16:42:09 agc Exp $ */
+/* $NetBSD: ptrace.S,v 1.17 2011/11/18 20:21:41 joerg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -36,7 +36,7 @@
#include <machine/asm.h>
#if defined(SYSLIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: ptrace.S,v 1.16 2003/08/07 16:42:09 agc Exp $")
+ RCSID("$NetBSD: ptrace.S,v 1.17 2011/11/18 20:21:41 joerg Exp $")
#endif /* SYSLIBC_SCCS and not lint */
#include "SYS.h"
@@ -57,11 +57,4 @@
jc err
ret
err:
-#ifdef PIC
- PIC_PROLOGUE
- mov PIC_GOT(CERROR), %ecx
- PIC_EPILOGUE
- jmp *%ecx
-#else
jmp CERROR
-#endif
diff -r 7e489cd5815b -r f253e8767fe4 lib/libc/arch/i386/sys/sbrk.S
--- a/lib/libc/arch/i386/sys/sbrk.S Fri Nov 18 20:17:46 2011 +0000
+++ b/lib/libc/arch/i386/sys/sbrk.S Fri Nov 18 20:21:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sbrk.S,v 1.19 2008/07/02 20:07:43 rmind Exp $ */
+/* $NetBSD: sbrk.S,v 1.20 2011/11/18 20:21:41 joerg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -36,7 +36,7 @@
#include <machine/asm.h>
#if defined(SYSLIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: sbrk.S,v 1.19 2008/07/02 20:07:43 rmind Exp $")
+ RCSID("$NetBSD: sbrk.S,v 1.20 2011/11/18 20:21:41 joerg Exp $")
#endif /* SYSLIBC_SCCS and not lint */
#include "SYS.h"
@@ -73,10 +73,7 @@
out:
ret
err:
- PIC_PROLOGUE
- mov PIC_GOT(CERROR),%edx
- PIC_EPILOGUE
- jmp *%edx
+ jmp CERROR
#else
movl 4(%esp),%ecx
movl CURBRK,%eax
diff -r 7e489cd5815b -r f253e8767fe4 lib/libc/arch/i386/sys/syscall.S
--- a/lib/libc/arch/i386/sys/syscall.S Fri Nov 18 20:17:46 2011 +0000
+++ b/lib/libc/arch/i386/sys/syscall.S Fri Nov 18 20:21:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: syscall.S,v 1.11 2003/08/07 16:42:09 agc Exp $ */
+/* $NetBSD: syscall.S,v 1.12 2011/11/18 20:21:41 joerg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -36,7 +36,7 @@
#include <machine/asm.h>
#if defined(SYSLIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: syscall.S,v 1.11 2003/08/07 16:42:09 agc Exp $")
+ RCSID("$NetBSD: syscall.S,v 1.12 2011/11/18 20:21:41 joerg Exp $")
#endif /* SYSLIBC_SCCS and not lint */
#include "SYS.h"
@@ -50,11 +50,4 @@
jc err
ret
err:
-#ifdef PIC
- PIC_PROLOGUE
- mov PIC_GOT(CERROR), %ecx
- PIC_EPILOGUE
- jmp *%ecx
-#else
jmp CERROR
-#endif
Home |
Main Index |
Thread Index |
Old Index