summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2011-07-19 08:08:49 +0000
committerjsg <jsg@openbsd.org>2011-07-19 08:08:49 +0000
commitecf738e817ec2f67ca3fc54b0f2d44edba9233c3 (patch)
tree8f801c3d768f776bfade4c1adcde589f217ae3ce
parenttweak previous; (diff)
downloadwireguard-openbsd-ecf738e817ec2f67ca3fc54b0f2d44edba9233c3.tar.xz
wireguard-openbsd-ecf738e817ec2f67ca3fc54b0f2d44edba9233c3.zip
we need to alias __movstr* as __movmem* for gcc4
from NetBSD. ok miod@ drahn@
-rw-r--r--sys/arch/sh/include/asm.h6
-rw-r--r--sys/lib/libkern/arch/sh/movstr_i4.S4
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/sh/include/asm.h b/sys/arch/sh/include/asm.h
index c659a9d5915..69a8103db4a 100644
--- a/sys/arch/sh/include/asm.h
+++ b/sys/arch/sh/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.1.1.1 2006/10/06 21:02:55 miod Exp $ */
+/* $OpenBSD: asm.h,v 1.2 2011/07/19 08:08:49 jsg Exp $ */
/* $NetBSD: asm.h,v 1.25 2006/01/20 22:02:40 christos Exp $ */
/*-
@@ -209,6 +209,10 @@
#define WEAK_ALIAS(alias,sym) \
.weak _C_LABEL(alias); \
_C_LABEL(alias) = _C_LABEL(sym)
+
+#define STRONG_ALIAS(alias,sym) \
+ .globl _C_LABEL(alias); \
+ _C_LABEL(alias) = _C_LABEL(sym)
#endif
#define WARN_REFERENCES(_sym,_msg) \
diff --git a/sys/lib/libkern/arch/sh/movstr_i4.S b/sys/lib/libkern/arch/sh/movstr_i4.S
index 835801d933e..8532bc7ff95 100644
--- a/sys/lib/libkern/arch/sh/movstr_i4.S
+++ b/sys/lib/libkern/arch/sh/movstr_i4.S
@@ -70,5 +70,5 @@ even_loop:
/* gcc4 uses movmem, older versions use movstr */
-_C_LABEL(__movmem_i4_odd) = _C_LABEL(__movstr_i4_odd)
-_C_LABEL(__movmem_i4_even) = _C_LABEL(__movstr_i4_even)
+STRONG_ALIAS(__movmem_i4_odd, __movstr_i4_odd)
+STRONG_ALIAS(__movmem_i4_even, __movstr_i4_even)