summaryrefslogtreecommitdiff
path: root/lib/libc/arch/sh/string
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-08-31 02:53:58 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-08-31 02:53:58 +0000
commita4c7e44b581895df2d4b7cc4f88e39b12a83c740 (patch)
tree0990e8c4dea4839a061c02403f3b3bb05884c4de /lib/libc/arch/sh/string
parent105db1ed9f850ad922a57ad78b72b1919c986e21 (diff)
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/sh/string')
-rw-r--r--lib/libc/arch/sh/string/bcopy.S5
-rw-r--r--lib/libc/arch/sh/string/ffs.S5
-rw-r--r--lib/libc/arch/sh/string/memcpy.S5
-rw-r--r--lib/libc/arch/sh/string/memmove.S5
-rw-r--r--lib/libc/arch/sh/string/memset.S9
5 files changed, 19 insertions, 10 deletions
diff --git a/lib/libc/arch/sh/string/bcopy.S b/lib/libc/arch/sh/string/bcopy.S
index 533583d9792..473bc429bbe 100644
--- a/lib/libc/arch/sh/string/bcopy.S
+++ b/lib/libc/arch/sh/string/bcopy.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcopy.S,v 1.2 2014/11/30 19:43:56 deraadt Exp $ */
+/* $OpenBSD: bcopy.S,v 1.3 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: memcpy.S,v 1.2 2006/04/22 23:53:47 uwe Exp $ */
/*
@@ -28,7 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include "SYS.h"
#define REG_SRC r4
#define REG_DST r5
@@ -238,3 +238,4 @@ ov_no_align_delay:
9:
rts
nop
+END_WEAK(bcopy)
diff --git a/lib/libc/arch/sh/string/ffs.S b/lib/libc/arch/sh/string/ffs.S
index 7e0dd7e2834..0a639c79211 100644
--- a/lib/libc/arch/sh/string/ffs.S
+++ b/lib/libc/arch/sh/string/ffs.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs.S,v 1.2 2008/06/26 05:42:05 ray Exp $ */
+/* $OpenBSD: ffs.S,v 1.3 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: ffs.S,v 1.1 2005/12/20 19:28:50 christos Exp $ */
/*-
@@ -30,7 +30,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include "SYS.h"
/*
* ffs - find first bit set
@@ -91,3 +91,4 @@ L8bit:
Lzero: rts
nop
+END_WEAK(ffs)
diff --git a/lib/libc/arch/sh/string/memcpy.S b/lib/libc/arch/sh/string/memcpy.S
index f12004e1edd..ed266caa71c 100644
--- a/lib/libc/arch/sh/string/memcpy.S
+++ b/lib/libc/arch/sh/string/memcpy.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: memcpy.S,v 1.2 2014/11/30 19:43:56 deraadt Exp $ */
+/* $OpenBSD: memcpy.S,v 1.3 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: memcpy.S,v 1.2 2006/04/22 23:53:47 uwe Exp $ */
/*
@@ -28,7 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include "SYS.h"
#define REG_DST0 r3
#define REG_SRC r5
@@ -137,3 +137,4 @@ no_align_delay:
bcopy_return:
rts
mov REG_DST0,r0
+END_STRONG(memcpy)
diff --git a/lib/libc/arch/sh/string/memmove.S b/lib/libc/arch/sh/string/memmove.S
index 3a570c62355..131be417efc 100644
--- a/lib/libc/arch/sh/string/memmove.S
+++ b/lib/libc/arch/sh/string/memmove.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: memmove.S,v 1.2 2014/11/30 19:43:56 deraadt Exp $ */
+/* $OpenBSD: memmove.S,v 1.3 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: memcpy.S,v 1.2 2006/04/22 23:53:47 uwe Exp $ */
/*
@@ -28,7 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include "SYS.h"
#define REG_DST0 r3
#define REG_SRC r5
@@ -239,3 +239,4 @@ ov_no_align_delay:
9:
rts
mov REG_DST0,r0
+END_STRONG(memmove)
diff --git a/lib/libc/arch/sh/string/memset.S b/lib/libc/arch/sh/string/memset.S
index 2ed22197ce8..f82f4a4ecfb 100644
--- a/lib/libc/arch/sh/string/memset.S
+++ b/lib/libc/arch/sh/string/memset.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: memset.S,v 1.1 2006/10/10 22:07:10 miod Exp $ */
+/* $OpenBSD: memset.S,v 1.2 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: memset.S,v 1.1 2005/12/20 19:28:50 christos Exp $ */
/*-
@@ -27,7 +27,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include "SYS.h"
#define REG_PTR r0
#define REG_TMP1 r1
@@ -293,3 +293,8 @@ unaligned_len:
bra aligned
sub REG_DST,REG_LEN
+#ifdef BZERO
+END_WEAK(bzero)
+#else
+END_STRONG(memset)
+#endif