summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/sparc64
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2011-04-04 12:42:39 +0000
committerguenther <guenther@openbsd.org>2011-04-04 12:42:39 +0000
commit9372e0f08d36e465dbbf8ed7d81cada3fa4b57ab (patch)
tree8d94440db80d44dadc263ef20aa74460d6eae930 /lib/libc/arch/sparc64
parentBetter. (diff)
downloadwireguard-openbsd-9372e0f08d36e465dbbf8ed7d81cada3fa4b57ab.tar.xz
wireguard-openbsd-9372e0f08d36e465dbbf8ed7d81cada3fa4b57ab.zip
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@
Diffstat (limited to 'lib/libc/arch/sparc64')
-rw-r--r--lib/libc/arch/sparc64/sys/cerror.S12
1 files changed, 5 insertions, 7 deletions
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