summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/mips64/string
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2015-08-31 02:53:56 +0000
committerguenther <guenther@openbsd.org>2015-08-31 02:53:56 +0000
commit9b9d2a55a62c8e82206c25f94fcc7f4e2765250e (patch)
tree4e1fa28e81f1f4b2467c7facbde18ea61addb735 /lib/libc/arch/mips64/string
parentspaces snuck in (diff)
downloadwireguard-openbsd-9b9d2a55a62c8e82206c25f94fcc7f4e2765250e.tar.xz
wireguard-openbsd-9b9d2a55a62c8e82206c25f94fcc7f4e2765250e.zip
Add framework for resolving (pun intended) libc namespace issues, using
wrapper .h files and asm labels to let internal calls resolve directly and not be overridable or use the PLT. Then, apply that framework to most of the functions in stdio.h, string.h, err.h, and wchar.h. Delete the should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here. tests clean on i386, amd64, sparc64, powerpc, and mips64 naming feedback from kettenis@ and millert@ ok kettenis@
Diffstat (limited to 'lib/libc/arch/mips64/string')
-rw-r--r--lib/libc/arch/mips64/string/bcmp.S6
-rw-r--r--lib/libc/arch/mips64/string/bcopy.S6
-rw-r--r--lib/libc/arch/mips64/string/bzero.S6
-rw-r--r--lib/libc/arch/mips64/string/ffs.S6
-rw-r--r--lib/libc/arch/mips64/string/strchr.S6
-rw-r--r--lib/libc/arch/mips64/string/strcmp.S6
-rw-r--r--lib/libc/arch/mips64/string/strlen.S6
-rw-r--r--lib/libc/arch/mips64/string/strrchr.S6
8 files changed, 24 insertions, 24 deletions
diff --git a/lib/libc/arch/mips64/string/bcmp.S b/lib/libc/arch/mips64/string/bcmp.S
index 2ff4a6e817e..fe51d35fce4 100644
--- a/lib/libc/arch/mips64/string/bcmp.S
+++ b/lib/libc/arch/mips64/string/bcmp.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcmp.S,v 1.4 2009/12/11 05:10:17 miod Exp $ */
+/* $OpenBSD: bcmp.S,v 1.5 2015/08/31 02:53:56 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include "SYS.h"
/* bcmp(s1, s2, n) */
@@ -109,4 +109,4 @@ nomatch:
j ra
li v0, 1
.set reorder
-END(bcmp)
+END_WEAK(bcmp)
diff --git a/lib/libc/arch/mips64/string/bcopy.S b/lib/libc/arch/mips64/string/bcopy.S
index e5098a2cffc..bd63a62a890 100644
--- a/lib/libc/arch/mips64/string/bcopy.S
+++ b/lib/libc/arch/mips64/string/bcopy.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcopy.S,v 1.4 2009/12/11 05:10:17 miod Exp $ */
+/* $OpenBSD: bcopy.S,v 1.5 2015/08/31 02:53:56 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include "SYS.h"
/* bcopy(s1, s2, n) */
@@ -116,4 +116,4 @@ smallcpy:
j ra
nop
.set reorder
-END(bcopy)
+END_WEAK(bcopy)
diff --git a/lib/libc/arch/mips64/string/bzero.S b/lib/libc/arch/mips64/string/bzero.S
index 0b0c477aaa7..8fae96ec188 100644
--- a/lib/libc/arch/mips64/string/bzero.S
+++ b/lib/libc/arch/mips64/string/bzero.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: bzero.S,v 1.5 2009/12/11 05:10:17 miod Exp $ */
+/* $OpenBSD: bzero.S,v 1.6 2015/08/31 02:53:56 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include "SYS.h"
/* bzero(s1, n) */
@@ -63,4 +63,4 @@ smallclr:
2:
j ra
nop
-END(bzero)
+END_WEAK(bzero)
diff --git a/lib/libc/arch/mips64/string/ffs.S b/lib/libc/arch/mips64/string/ffs.S
index 0fa0803e316..f09de46a930 100644
--- a/lib/libc/arch/mips64/string/ffs.S
+++ b/lib/libc/arch/mips64/string/ffs.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs.S,v 1.3 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: ffs.S,v 1.4 2015/08/31 02:53:56 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include "SYS.h"
/* bit = ffs(value) */
@@ -46,4 +46,4 @@ LEAF(ffs, 0)
beq v1, zero, 1b # no, continue
done:
j ra
-END(ffs)
+END_WEAK(ffs)
diff --git a/lib/libc/arch/mips64/string/strchr.S b/lib/libc/arch/mips64/string/strchr.S
index a5a12c53940..05f50f0da73 100644
--- a/lib/libc/arch/mips64/string/strchr.S
+++ b/lib/libc/arch/mips64/string/strchr.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: strchr.S,v 1.2 2015/05/15 22:29:37 millert Exp $ */
+/* $OpenBSD: strchr.S,v 1.3 2015/08/31 02:53:56 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include "SYS.h"
WEAK_ALIAS(index, strchr)
@@ -48,4 +48,4 @@ notfnd:
fnd:
dsubu v0, a0, 1
j ra
-END(strchr)
+END_STRONG(strchr)
diff --git a/lib/libc/arch/mips64/string/strcmp.S b/lib/libc/arch/mips64/string/strcmp.S
index 7193a6bf131..282cc929441 100644
--- a/lib/libc/arch/mips64/string/strcmp.S
+++ b/lib/libc/arch/mips64/string/strcmp.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: strcmp.S,v 1.4 2009/12/11 05:10:17 miod Exp $ */
+/* $OpenBSD: strcmp.S,v 1.5 2015/08/31 02:53:56 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include "SYS.h"
/*
* NOTE: this version assumes unsigned chars in order to be "8 bit clean".
@@ -55,4 +55,4 @@ NotEq:
LessOrEq:
dsubu v0, zero, t1
j ra
-END(strcmp)
+END_STRONG(strcmp)
diff --git a/lib/libc/arch/mips64/string/strlen.S b/lib/libc/arch/mips64/string/strlen.S
index 5bc80bf847c..7817d753fdb 100644
--- a/lib/libc/arch/mips64/string/strlen.S
+++ b/lib/libc/arch/mips64/string/strlen.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: strlen.S,v 1.4 2009/12/11 05:10:17 miod Exp $ */
+/* $OpenBSD: strlen.S,v 1.5 2015/08/31 02:53:56 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include "SYS.h"
LEAF(strlen, 0)
.set reorder
@@ -42,4 +42,4 @@ LEAF(strlen, 0)
bne v0, zero, 1b # continue if not end
dsubu v0, a0, v1 # compute length - 1 for '\0' char
j ra
-END(strlen)
+END_STRONG(strlen)
diff --git a/lib/libc/arch/mips64/string/strrchr.S b/lib/libc/arch/mips64/string/strrchr.S
index a7f5b74c320..ad35b84cb95 100644
--- a/lib/libc/arch/mips64/string/strrchr.S
+++ b/lib/libc/arch/mips64/string/strrchr.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: strrchr.S,v 1.2 2015/05/15 22:29:37 millert Exp $ */
+/* $OpenBSD: strrchr.S,v 1.3 2015/08/31 02:53:56 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include "SYS.h"
WEAK_ALIAS(rindex, strrchr)
@@ -46,4 +46,4 @@ LEAF(strrchr, 0)
2:
bne a3, zero, 1b # continue if not end
j ra
-END(strrchr)
+END_STRONG(strrchr)