summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2011-04-04 12:42:40 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2011-04-04 12:42:40 +0000
commit86ee920efe5f6ade8a027f63a78aa760ec51ea0e (patch)
treed44e4b31eb313e45598ff8206208f3fced53bb96
parentb0d4b5d13abed165255bbbc41de8e216fbcd5a2d (diff)
Move __cerror to ___cerror with a weak alias so that rthreads can override it.
On mips64, also correct the name called from plain cerror to __cerror. "looks correct" miod@
-rw-r--r--lib/libc/arch/alpha/sys/cerror.S8
-rw-r--r--lib/libc/arch/amd64/SYS.h3
-rw-r--r--lib/libc/arch/amd64/sys/cerror.S6
-rw-r--r--lib/libc/arch/arm/SYS.h3
-rw-r--r--lib/libc/arch/arm/sys/cerror.S6
-rw-r--r--lib/libc/arch/hppa/sys/cerror.S8
-rw-r--r--lib/libc/arch/hppa64/sys/cerror.S8
-rw-r--r--lib/libc/arch/i386/SYS.h7
-rw-r--r--lib/libc/arch/i386/sys/cerror.S7
-rw-r--r--lib/libc/arch/m68k/sys/cerror.S6
-rw-r--r--lib/libc/arch/m88k/sys/cerror.S6
-rw-r--r--lib/libc/arch/mips64/SYS.h7
-rw-r--r--lib/libc/arch/mips64/sys/Ovfork.S4
-rw-r--r--lib/libc/arch/mips64/sys/brk.S6
-rw-r--r--lib/libc/arch/mips64/sys/cerror.S11
-rw-r--r--lib/libc/arch/mips64/sys/exect.S4
-rw-r--r--lib/libc/arch/mips64/sys/fork.S4
-rw-r--r--lib/libc/arch/mips64/sys/rfork.S4
-rw-r--r--lib/libc/arch/mips64/sys/sbrk.S4
-rw-r--r--lib/libc/arch/mips64/sys/setlogin.S4
-rw-r--r--lib/libc/arch/mips64/sys/sigpending.S4
-rw-r--r--lib/libc/arch/mips64/sys/sigprocmask.S4
-rw-r--r--lib/libc/arch/mips64/sys/sigsuspend.S4
-rw-r--r--lib/libc/arch/powerpc/sys/cerror.S6
-rw-r--r--lib/libc/arch/sh/SYS.h3
-rw-r--r--lib/libc/arch/sh/sys/cerror.S8
-rw-r--r--lib/libc/arch/sparc/sys/cerror.S13
-rw-r--r--lib/libc/arch/sparc64/sys/cerror.S12
-rw-r--r--lib/libc/arch/vax/sys/cerror.S6
-rw-r--r--lib/libc/shlib_version2
30 files changed, 104 insertions, 74 deletions
diff --git a/lib/libc/arch/alpha/sys/cerror.S b/lib/libc/arch/alpha/sys/cerror.S
index a2ddd220efd..c85de3282e9 100644
--- a/lib/libc/arch/alpha/sys/cerror.S
+++ b/lib/libc/arch/alpha/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.5 2005/08/07 16:40:13 espie Exp $ */
+/* $OpenBSD: cerror.S,v 1.6 2011/04/04 12:42:39 guenther Exp $ */
/* $NetBSD: cerror.S,v 1.3 1996/10/17 03:08:17 cgd Exp $ */
/*
@@ -32,10 +32,12 @@
IMPORT(errno, 4)
-LEAF(__cerror, 0)
+WEAK_ALIAS(__cerror, ___cerror)
+
+LEAF(___cerror, 0)
br t0, L1
L1: LDGP(t0)
stl v0, errno
ldiq v0, -1
RET
-END(__cerror)
+END(___cerror)
diff --git a/lib/libc/arch/amd64/SYS.h b/lib/libc/arch/amd64/SYS.h
index a4151fda209..0241cfe3927 100644
--- a/lib/libc/arch/amd64/SYS.h
+++ b/lib/libc/arch/amd64/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.4 2005/12/13 00:10:48 jsg Exp $ */
+/* $OpenBSD: SYS.h,v 1.5 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -62,6 +62,7 @@
#endif
#define CERROR _C_LABEL(__cerror)
+#define _CERROR _C_LABEL(___cerror)
#define CURBRK _C_LABEL(__curbrk)
#define _SYSCALL_NOERROR(x,y) \
diff --git a/lib/libc/arch/amd64/sys/cerror.S b/lib/libc/arch/amd64/sys/cerror.S
index f5d4decfbc5..0749fdab4de 100644
--- a/lib/libc/arch/amd64/sys/cerror.S
+++ b/lib/libc/arch/amd64/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.4 2005/12/13 00:10:48 jsg Exp $ */
+/* $OpenBSD: cerror.S,v 1.5 2011/04/04 12:42:39 guenther Exp $ */
/* $NetBSD: cerror.S,v 1.2 2002/06/03 18:30:33 fvdl Exp $ */
/*-
@@ -41,7 +41,9 @@
.globl _C_LABEL(errno)
-_ENTRY(CERROR)
+WEAK_ALIAS(CERROR, _CERROR)
+
+_ENTRY(_CERROR)
#ifdef PIC
movq PIC_GOT(_C_LABEL(errno)), %rcx
movl %eax, (%rcx)
diff --git a/lib/libc/arch/arm/SYS.h b/lib/libc/arch/arm/SYS.h
index d1a8b8c484f..46f19100a81 100644
--- a/lib/libc/arch/arm/SYS.h
+++ b/lib/libc/arch/arm/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.4 2006/11/07 21:30:36 drahn Exp $ */
+/* $OpenBSD: SYS.h,v 1.5 2011/04/04 12:42:39 guenther Exp $ */
/* $NetBSD: SYS.h,v 1.8 2003/08/07 16:42:02 agc Exp $ */
/*-
@@ -63,6 +63,7 @@
#ifdef __ELF__
#define CERROR _C_LABEL(__cerror)
+#define _CERROR _C_LABEL(___cerror)
#define CURBRK _C_LABEL(__curbrk)
#else
#define CERROR _ASM_LABEL(cerror)
diff --git a/lib/libc/arch/arm/sys/cerror.S b/lib/libc/arch/arm/sys/cerror.S
index 26f6f818435..1e93ad300d5 100644
--- a/lib/libc/arch/arm/sys/cerror.S
+++ b/lib/libc/arch/arm/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.3 2004/02/07 06:02:07 drahn Exp $ */
+/* $OpenBSD: cerror.S,v 1.4 2011/04/04 12:42:39 guenther Exp $ */
/* $NetBSD: cerror.S,v 1.5 2003/08/07 16:42:04 agc Exp $ */
/*-
@@ -34,7 +34,9 @@
#include "SYS.h"
-ASENTRY(CERROR)
+WEAK_ALIAS(CERROR, _CERROR)
+
+ASENTRY(_CERROR)
#ifdef _REENTRANT
stmfd sp!, {r4, lr}
mov r4, r0
diff --git a/lib/libc/arch/hppa/sys/cerror.S b/lib/libc/arch/hppa/sys/cerror.S
index 22445a56c05..fb9998fb6da 100644
--- a/lib/libc/arch/hppa/sys/cerror.S
+++ b/lib/libc/arch/hppa/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.4 2004/06/10 18:36:04 mickey Exp $ */
+/* $OpenBSD: cerror.S,v 1.5 2011/04/04 12:42:39 guenther Exp $ */
/*
* Copyright (c) 2004 Michael Shalayeff
@@ -28,8 +28,10 @@
#include "SYS.h"
+WEAK_ALIAS(__cerror, ___cerror)
+
.import errno, data
-ENTRY(__cerror,0)
+ENTRY(___cerror,0)
#ifdef PIC
addil LT%errno, r19
ldw RT%errno(r1), r1
@@ -41,6 +43,6 @@ ENTRY(__cerror,0)
ldi -1, ret0
bv r0(rp)
ldi -1, ret1
-EXIT(__cerror)
+EXIT(___cerror)
.end
diff --git a/lib/libc/arch/hppa64/sys/cerror.S b/lib/libc/arch/hppa64/sys/cerror.S
index 3f01e252dd7..76c0f47de85 100644
--- a/lib/libc/arch/hppa64/sys/cerror.S
+++ b/lib/libc/arch/hppa64/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.1 2005/04/01 10:54:27 mickey Exp $ */
+/* $OpenBSD: cerror.S,v 1.2 2011/04/04 12:42:39 guenther Exp $ */
/*
* Copyright (c) 2004 Michael Shalayeff
@@ -28,8 +28,10 @@
#include "SYS.h"
+WEAK_ALIAS(__cerror, ___cerror)
+
.import errno, data
-ENTRY(__cerror,0)
+ENTRY(___cerror,0)
#ifdef PIC
addil LT%errno, r19
ldd RT%errno(r1), r1
@@ -41,6 +43,6 @@ ENTRY(__cerror,0)
ldi -1, ret0
bv r0(rp)
ldi -1, ret1
-EXIT(__cerror)
+EXIT(___cerror)
.end
diff --git a/lib/libc/arch/i386/SYS.h b/lib/libc/arch/i386/SYS.h
index a0681730dae..7ad5a102fea 100644
--- a/lib/libc/arch/i386/SYS.h
+++ b/lib/libc/arch/i386/SYS.h
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: SYS.h,v 1.16 2006/04/24 14:28:34 drahn Exp $
+ * $OpenBSD: SYS.h,v 1.17 2011/04/04 12:42:39 guenther Exp $
*/
#include <machine/asm.h>
@@ -67,8 +67,9 @@
int $0x80
#endif /* ! __STDC__ */
-#define CERROR _C_LABEL(__cerror)
-#define CURBRK _C_LABEL(__curbrk)
+#define CERROR _C_LABEL(__cerror)
+#define _CERROR _C_LABEL(___cerror)
+#define CURBRK _C_LABEL(__curbrk)
/* perform a syscall */
#define _SYSCALL_NOERROR(x,y) \
diff --git a/lib/libc/arch/i386/sys/cerror.S b/lib/libc/arch/i386/sys/cerror.S
index 5033c2f41ce..4cffd703531 100644
--- a/lib/libc/arch/i386/sys/cerror.S
+++ b/lib/libc/arch/i386/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.7 2005/08/07 11:30:38 espie Exp $ */
+/* $OpenBSD: cerror.S,v 1.8 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -34,7 +34,10 @@
#include "SYS.h"
.globl _C_LABEL(errno)
-_ENTRY(CERROR)
+
+WEAK_ALIAS(CERROR, _CERROR)
+
+_ENTRY(_CERROR)
#ifdef PIC
PIC_PROLOGUE
movl PIC_GOT(_C_LABEL(errno)),%ecx
diff --git a/lib/libc/arch/m68k/sys/cerror.S b/lib/libc/arch/m68k/sys/cerror.S
index 7128c0a8bbe..f9c9a302e36 100644
--- a/lib/libc/arch/m68k/sys/cerror.S
+++ b/lib/libc/arch/m68k/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.5 2005/08/07 16:40:14 espie Exp $ */
+/* $OpenBSD: cerror.S,v 1.6 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -34,9 +34,11 @@
#include "SYS.h"
+WEAK_ALIAS(__cerror, ___cerror)
+
.even
.globl _errno
-__cerror:
+___cerror:
#ifdef PIC
movl #__GLOBAL_OFFSET_TABLE_,a0
lea pc@(0,a0:l),a0
diff --git a/lib/libc/arch/m88k/sys/cerror.S b/lib/libc/arch/m88k/sys/cerror.S
index 4e5d5459584..64835bdf79b 100644
--- a/lib/libc/arch/m88k/sys/cerror.S
+++ b/lib/libc/arch/m88k/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.7 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: cerror.S,v 1.8 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -35,8 +35,10 @@
#include "SYS.h"
+WEAK_ALIAS(_C_LABEL(_cerror), _C_LABEL(__cerror))
+
.globl _errno
-ENTRY(_cerror)
+ENTRY(__cerror)
or.u r4,r0,hi16(_errno)
st r2,r4,lo16(_errno)
sub r2,r0,0x1
diff --git a/lib/libc/arch/mips64/SYS.h b/lib/libc/arch/mips64/SYS.h
index 384304d8382..d4d7f754932 100644
--- a/lib/libc/arch/mips64/SYS.h
+++ b/lib/libc/arch/mips64/SYS.h
@@ -29,12 +29,15 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: SYS.h,v 1.4 2010/10/01 05:02:19 guenther Exp $
+ * $OpenBSD: SYS.h,v 1.5 2011/04/04 12:42:39 guenther Exp $
*/
#include <sys/syscall.h>
#include <machine/asm.h>
+#define CERROR _C_LABEL(__cerror)
+#define _CERROR _C_LABEL(___cerror)
+
#ifdef __STDC__
# define __ENTRY(p,x) ENTRY(p ## x)
@@ -78,7 +81,7 @@
RESTORE_GP64; \
PTR_ADDU sp,32; \
j ra; \
- err: LA t9,_C_LABEL(cerror); \
+ err: LA t9,CERROR; \
RESTORE_GP64; \
PTR_ADDU sp,32; \
jr t9; \
diff --git a/lib/libc/arch/mips64/sys/Ovfork.S b/lib/libc/arch/mips64/sys/Ovfork.S
index 7adca32b0b0..b10d2fb2cca 100644
--- a/lib/libc/arch/mips64/sys/Ovfork.S
+++ b/lib/libc/arch/mips64/sys/Ovfork.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: Ovfork.S,v 1.4 2009/07/13 21:28:45 miod Exp $ */
+/* $OpenBSD: Ovfork.S,v 1.5 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -50,7 +50,7 @@ SYSLEAF(vfork, FRAMESZ)
li v0, SYS_vfork # system call number for vfork
syscall
beq a3, zero, 1f # jump if no errors
- LA t9, cerror
+ LA t9, CERROR
RESTORE_GP64
PTR_ADDU sp, FRAMESZ
jr t9
diff --git a/lib/libc/arch/mips64/sys/brk.S b/lib/libc/arch/mips64/sys/brk.S
index be64b3971fc..11a1afa54c6 100644
--- a/lib/libc/arch/mips64/sys/brk.S
+++ b/lib/libc/arch/mips64/sys/brk.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: brk.S,v 1.4 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: brk.S,v 1.5 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -61,7 +61,7 @@ LEAF(brk, FRAMESZ)
PTR_ADDU sp, FRAMESZ
j ra
2:
- LA t9, _C_LABEL(cerror)
+ LA t9, CERROR
RESTORE_GP64
PTR_ADDU sp, FRAMESZ
jr t9
@@ -83,7 +83,7 @@ LEAF(_brk, FRAMESZ)
PTR_ADDU sp, FRAMESZ
j ra
1:
- LA t9, _C_LABEL(cerror)
+ LA t9, CERROR
RESTORE_GP64
PTR_ADDU sp, FRAMESZ
jr t9
diff --git a/lib/libc/arch/mips64/sys/cerror.S b/lib/libc/arch/mips64/sys/cerror.S
index 4ae42f760a6..8da17f74b17 100644
--- a/lib/libc/arch/mips64/sys/cerror.S
+++ b/lib/libc/arch/mips64/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.3 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: cerror.S,v 1.4 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -36,10 +36,13 @@
FRAMESZ= MKFSIZ(1,1)
GPOFF= FRAMESZ-2*REGSZ
+WEAK_ALIAS(cerror, _CERROR)
+WEAK_ALIAS(CERROR, _CERROR)
+
.globl _C_LABEL(errno)
-LEAF(cerror, FRAMESZ)
+LEAF(CERROR, FRAMESZ)
PTR_SUBU sp, FRAMESZ
- SETUP_GP64(GPOFF, cerror)
+ SETUP_GP64(GPOFF, CERROR)
.set noreorder
sw v0, _C_LABEL(errno)
li v0, -1
@@ -47,4 +50,4 @@ LEAF(cerror, FRAMESZ)
PTR_ADDU sp, FRAMESZ
j ra
li v1, -1
-END(cerror)
+END(CERROR)
diff --git a/lib/libc/arch/mips64/sys/exect.S b/lib/libc/arch/mips64/sys/exect.S
index 12df6e832ef..2cb8ff90625 100644
--- a/lib/libc/arch/mips64/sys/exect.S
+++ b/lib/libc/arch/mips64/sys/exect.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: exect.S,v 1.4 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: exect.S,v 1.5 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -47,7 +47,7 @@ SYSLEAF(exect, FRAMESZ)
PTR_ADDU sp, FRAMESZ
j ra
1:
- LA t9, _C_LABEL(cerror)
+ LA t9, CERROR
RESTORE_GP64
PTR_ADDU sp, FRAMESZ
jr t9
diff --git a/lib/libc/arch/mips64/sys/fork.S b/lib/libc/arch/mips64/sys/fork.S
index b1306bfd543..920557c32d1 100644
--- a/lib/libc/arch/mips64/sys/fork.S
+++ b/lib/libc/arch/mips64/sys/fork.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: fork.S,v 1.4 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: fork.S,v 1.5 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -50,7 +50,7 @@ SYSLEAF(fork, FRAMESZ)
PTR_ADDU sp, FRAMESZ
j ra
2:
- LA t9, _C_LABEL(cerror)
+ LA t9, CERROR
RESTORE_GP64
PTR_ADDU sp, FRAMESZ
jr t9
diff --git a/lib/libc/arch/mips64/sys/rfork.S b/lib/libc/arch/mips64/sys/rfork.S
index c35b43a300c..1d669c367d2 100644
--- a/lib/libc/arch/mips64/sys/rfork.S
+++ b/lib/libc/arch/mips64/sys/rfork.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: rfork.S,v 1.4 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: rfork.S,v 1.5 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -50,7 +50,7 @@ SYSLEAF(rfork, FRAMESZ)
PTR_ADDU sp, FRAMESZ
j ra
2:
- LA t9, _C_LABEL(cerror)
+ LA t9, CERROR
RESTORE_GP64
PTR_ADDU sp, FRAMESZ
jr t9
diff --git a/lib/libc/arch/mips64/sys/sbrk.S b/lib/libc/arch/mips64/sys/sbrk.S
index b402c82d555..2b223e5d310 100644
--- a/lib/libc/arch/mips64/sys/sbrk.S
+++ b/lib/libc/arch/mips64/sys/sbrk.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbrk.S,v 1.4 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: sbrk.S,v 1.5 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -58,7 +58,7 @@ LEAF(sbrk, FRAMESZ)
PTR_ADDU sp, FRAMESZ
j ra
1:
- LA t9, _C_LABEL(cerror)
+ LA t9, CERROR
RESTORE_GP64
PTR_ADDU sp, FRAMESZ
jr t9
diff --git a/lib/libc/arch/mips64/sys/setlogin.S b/lib/libc/arch/mips64/sys/setlogin.S
index 1c03cc7d908..ea164b0dc28 100644
--- a/lib/libc/arch/mips64/sys/setlogin.S
+++ b/lib/libc/arch/mips64/sys/setlogin.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: setlogin.S,v 1.4 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: setlogin.S,v 1.5 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -50,7 +50,7 @@ LEAF(setlogin, FRAMESZ)
PTR_ADDU sp, FRAMESZ
j ra
1:
- LA t9, _C_LABEL(cerror)
+ LA t9, CERROR
RESTORE_GP64
PTR_ADDU sp, FRAMESZ
jr t9
diff --git a/lib/libc/arch/mips64/sys/sigpending.S b/lib/libc/arch/mips64/sys/sigpending.S
index 9c59760e8db..42098fab82b 100644
--- a/lib/libc/arch/mips64/sys/sigpending.S
+++ b/lib/libc/arch/mips64/sys/sigpending.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: sigpending.S,v 1.4 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: sigpending.S,v 1.5 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -49,7 +49,7 @@ SYSLEAF(sigpending, FRAMESZ)
PTR_ADDU sp, FRAMESZ
j ra
1:
- LA t9, _C_LABEL(cerror)
+ LA t9, CERROR
RESTORE_GP64
PTR_ADDU sp, FRAMESZ
jr t9
diff --git a/lib/libc/arch/mips64/sys/sigprocmask.S b/lib/libc/arch/mips64/sys/sigprocmask.S
index b4f484e2790..c5a93995033 100644
--- a/lib/libc/arch/mips64/sys/sigprocmask.S
+++ b/lib/libc/arch/mips64/sys/sigprocmask.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: sigprocmask.S,v 1.4 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: sigprocmask.S,v 1.5 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -57,7 +57,7 @@ out:
PTR_ADDU sp, FRAMESZ
j ra
err:
- LA t9, _C_LABEL(cerror)
+ LA t9, CERROR
RESTORE_GP64
PTR_ADDU sp, FRAMESZ
jr t9
diff --git a/lib/libc/arch/mips64/sys/sigsuspend.S b/lib/libc/arch/mips64/sys/sigsuspend.S
index f184687e400..d9801b2f2be 100644
--- a/lib/libc/arch/mips64/sys/sigsuspend.S
+++ b/lib/libc/arch/mips64/sys/sigsuspend.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: sigsuspend.S,v 1.4 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: sigsuspend.S,v 1.5 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -49,7 +49,7 @@ SYSLEAF(sigsuspend, FRAMESZ)
PTR_ADDU sp, FRAMESZ
j ra
1:
- LA t9, _C_LABEL(cerror)
+ LA t9, CERROR
RESTORE_GP64
PTR_ADDU sp, FRAMESZ
jr t9
diff --git a/lib/libc/arch/powerpc/sys/cerror.S b/lib/libc/arch/powerpc/sys/cerror.S
index c06eb0c370a..7f817caf8b0 100644
--- a/lib/libc/arch/powerpc/sys/cerror.S
+++ b/lib/libc/arch/powerpc/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.7 2002/10/07 04:47:12 drahn Exp $ */
+/* $OpenBSD: cerror.S,v 1.8 2011/04/04 12:42:39 guenther Exp $ */
/*
* Copyright (c) 1996 Dale Rahn
@@ -28,8 +28,10 @@
#include "SYS.h"
#include <machine/asm.h>
+WEAK_ALIAS(__cerror, ___cerror)
+
.text
-ASENTRY(__cerror)
+ASENTRY(___cerror)
#if defined (PIC)
stwu 1, -16(1) /* follow the SVR4 ABI */
mflr 3 /* error value is in r0, use r3 */
diff --git a/lib/libc/arch/sh/SYS.h b/lib/libc/arch/sh/SYS.h
index 358c935aff2..f15fbed39ed 100644
--- a/lib/libc/arch/sh/SYS.h
+++ b/lib/libc/arch/sh/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.2 2010/10/01 05:02:19 guenther Exp $ */
+/* $OpenBSD: SYS.h,v 1.3 2011/04/04 12:42:39 guenther Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -68,6 +68,7 @@
#endif
#define CERROR _C_LABEL(__cerror)
+#define _CERROR _C_LABEL(___cerror)
#define _SYSCALL_NOERROR(x,y) \
SYSENTRY(x); \
diff --git a/lib/libc/arch/sh/sys/cerror.S b/lib/libc/arch/sh/sys/cerror.S
index 8c645497b34..6baa0bc69b4 100644
--- a/lib/libc/arch/sh/sys/cerror.S
+++ b/lib/libc/arch/sh/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.1 2006/10/10 22:07:10 miod Exp $ */
+/* $OpenBSD: cerror.S,v 1.2 2011/04/04 12:42:39 guenther Exp $ */
/* $NetBSD: cerror.S,v 1.10 2006/01/06 05:14:39 uwe Exp $ */
/*-
@@ -37,7 +37,9 @@
#include "SYS.h"
-ASENTRY(CERROR)
+WEAK_ALIAS(CERROR, _CERROR)
+
+ASENTRY(_CERROR)
#ifdef _REENTRANT
mov.l .L___errno, r1
PIC_PROLOGUE(.L_got)
@@ -55,7 +57,7 @@ ASENTRY(CERROR)
.align 2
.L_got: PIC_GOT_DATUM
.L___errno: CALL_DATUM(_C_LABEL(__errno), 1b)
- SET_ASENTRY_SIZE(cerror)
+ SET_ASENTRY_SIZE(_CERROR)
#else /* !_REENTRANT */
#ifdef PIC
diff --git a/lib/libc/arch/sparc/sys/cerror.S b/lib/libc/arch/sparc/sys/cerror.S
index fef245ce195..613b2bf953e 100644
--- a/lib/libc/arch/sparc/sys/cerror.S
+++ b/lib/libc/arch/sparc/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.5 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: cerror.S,v 1.6 2011/04/04 12:42:39 guenther Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -36,18 +36,17 @@
#include "SYS.h"
.globl _C_LABEL(errno)
+
+WEAK_ALIAS(__cerror, ___cerror)
+
+FUNC(_C_LABEL(___cerror))
#ifdef PIC
-FUNC(_C_LABEL(__cerror))
ld [%g1 + _C_LABEL(errno)], %g1
st %o0, [%g1]
- mov -1, %o0
- retl
- mov -1, %o1
#else
-FUNC(_C_LABEL(__cerror))
sethi %hi(_C_LABEL(errno)), %g1
st %o0, [%g1 + %lo(_C_LABEL(errno))]
+#endif
mov -1, %o0
retl
mov -1, %o1
-#endif
diff --git a/lib/libc/arch/sparc64/sys/cerror.S b/lib/libc/arch/sparc64/sys/cerror.S
index 45b41038610..50830c0b5da 100644
--- a/lib/libc/arch/sparc64/sys/cerror.S
+++ b/lib/libc/arch/sparc64/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.3 2008/09/29 13:42:22 kurt Exp $ */
+/* $OpenBSD: cerror.S,v 1.4 2011/04/04 12:42:39 guenther Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -37,22 +37,20 @@
#include "SYS.h"
+WEAK_ALIAS(__cerror, ___cerror)
+
.globl _C_LABEL(errno)
+FUNC(___cerror)
#ifdef PIC
-FUNC(__cerror)
PIC_PROLOGUE(%g1, %o3)
sethi %hi(_C_LABEL(errno)), %o3
or %o3, %lo(_C_LABEL(errno)), %o3
ldx [ %g1 + %o3 ], %g1
st %o0, [%g1]
- mov -1, %o0
- retl
- mov -1, %o1
#else
-FUNC(__cerror)
sethi %hi(_C_LABEL(errno)), %g1
st %o0, [%g1 + %lo(_C_LABEL(errno))]
+#endif
mov -1, %o0
retl
mov -1, %o1
-#endif
diff --git a/lib/libc/arch/vax/sys/cerror.S b/lib/libc/arch/vax/sys/cerror.S
index f2c9f5ec411..8f6e387ad33 100644
--- a/lib/libc/arch/vax/sys/cerror.S
+++ b/lib/libc/arch/vax/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.7 2008/05/21 20:39:32 miod Exp $ */
+/* $OpenBSD: cerror.S,v 1.8 2011/04/04 12:42:39 guenther Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -30,8 +30,10 @@
#include "SYS.h"
+WEAK_ALIAS(_C_LABEL(_cerror), _C_LABEL(__cerror))
+
.globl _C_LABEL(errno)
-_C_LABEL(_cerror):
+_C_LABEL(__cerror):
movl r0,_C_LABEL(errno)
mnegl $1,r0
mnegl $1,r1
diff --git a/lib/libc/shlib_version b/lib/libc/shlib_version
index 2922581b782..393a1b75334 100644
--- a/lib/libc/shlib_version
+++ b/lib/libc/shlib_version
@@ -1,4 +1,4 @@
major=58
-minor=0
+minor=1
# note: If changes were made to include/thread_private.h or if system
# calls were added/changed then libpthread must also be updated.