summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/arch/hppa/SYS.h4
-rw-r--r--lib/libc/arch/hppa64/SYS.h4
-rw-r--r--lib/libc/arch/mips64/SYS.h6
-rw-r--r--lib/libc/arch/powerpc/SYS.h4
-rw-r--r--lib/libc/arch/sh/SYS.h8
-rw-r--r--sys/arch/hppa/include/asm.h4
-rw-r--r--sys/arch/hppa64/include/asm.h4
-rw-r--r--sys/arch/mips64/include/asm.h9
-rw-r--r--sys/arch/powerpc/include/asm.h5
9 files changed, 30 insertions, 18 deletions
diff --git a/lib/libc/arch/hppa/SYS.h b/lib/libc/arch/hppa/SYS.h
index a68b05d96e2..2c1f6a8e9e1 100644
--- a/lib/libc/arch/hppa/SYS.h
+++ b/lib/libc/arch/hppa/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.15 2006/01/05 22:13:55 kettenis Exp $ */
+/* $OpenBSD: SYS.h,v 1.16 2010/10/01 05:02:19 guenther Exp $ */
/*
* Copyright (c) 1998-2002 Michael Shalayeff
@@ -35,7 +35,7 @@
#define SYSENTRY(x) !\
LEAF_ENTRY(__CONCAT(_thread_sys_,x)) !\
- .weak x ! .set x, __CONCAT(_thread_sys_,x)
+ WEAK_ALIAS(x,__CONCAT(_thread_sys_,x))
#define SYSEXIT(x) !\
EXIT(__CONCAT(_thread_sys_,x))
diff --git a/lib/libc/arch/hppa64/SYS.h b/lib/libc/arch/hppa64/SYS.h
index 2e0b7ff7685..c181ca69314 100644
--- a/lib/libc/arch/hppa64/SYS.h
+++ b/lib/libc/arch/hppa64/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.2 2006/01/05 22:19:49 kettenis Exp $ */
+/* $OpenBSD: SYS.h,v 1.3 2010/10/01 05:02:19 guenther Exp $ */
/*
* Copyright (c) 1998-2002 Michael Shalayeff
@@ -35,7 +35,7 @@
#define SYSENTRY(x) !\
LEAF_ENTRY(__CONCAT(_thread_sys_,x)) !\
- .weak x ! .set x, __CONCAT(_thread_sys_,x)
+ WEAK_ALIAS(x,__CONCAT(_thread_sys_,x))
#define SYSEXIT(x) !\
EXIT(__CONCAT(_thread_sys_,x))
diff --git a/lib/libc/arch/mips64/SYS.h b/lib/libc/arch/mips64/SYS.h
index 6893ce6bfd6..384304d8382 100644
--- a/lib/libc/arch/mips64/SYS.h
+++ b/lib/libc/arch/mips64/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.3 2004/09/09 16:14:02 pefo Exp $
+ * $OpenBSD: SYS.h,v 1.4 2010/10/01 05:02:19 guenther Exp $
*/
#include <sys/syscall.h>
@@ -43,7 +43,7 @@
syscall
# define __LEAF2(p,x,sz) LEAF(p ## x, sz) \
- .weak x; x = p ## x;
+ WEAK_ALIAS(x, p ## x);
# define __END2(p,x) END(p ## x)
@@ -56,7 +56,7 @@
syscall
# define __LEAF2(p,x,sz) LEAF(p/**/x, sz) \
- .weak x; x = p/**/x;
+ WEAK_ALIAS(x, p/**/x);
# define __END2(p,x) END(p/**/x)
diff --git a/lib/libc/arch/powerpc/SYS.h b/lib/libc/arch/powerpc/SYS.h
index 9d371f8bd36..67915bc56c0 100644
--- a/lib/libc/arch/powerpc/SYS.h
+++ b/lib/libc/arch/powerpc/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.13 2002/10/07 04:16:33 drahn Exp $ */
+/* $OpenBSD: SYS.h,v 1.14 2010/10/01 05:02:19 guenther Exp $ */
/*-
* Copyright (c) 1994
* Andrew Cagney. All rights reserved.
@@ -65,7 +65,7 @@
#define SUFFIX PSEUDO_SUFFIX
-#define ALIAS(x,y) .weak y; .set y,_CONCAT(x,y);
+#define ALIAS(x,y) WEAK_ALIAS(y,_CONCAT(x,y));
#define PREFIX(x) ALIAS(_thread_sys_,x) \
PSEUDO_PREFIX(_thread_sys_,x,x)
diff --git a/lib/libc/arch/sh/SYS.h b/lib/libc/arch/sh/SYS.h
index 20744df0066..358c935aff2 100644
--- a/lib/libc/arch/sh/SYS.h
+++ b/lib/libc/arch/sh/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.1.1.1 2006/10/10 22:07:10 miod Exp $ */
+/* $OpenBSD: SYS.h,v 1.2 2010/10/01 05:02:19 guenther Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -39,13 +39,11 @@
#ifdef __STDC__
#define SYSENTRY(x) \
- .weak _C_LABEL(x); \
- _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x); \
+ WEAK_ALIAS(x,_thread_sys_ ## x); \
ENTRY(_thread_sys_ ## x)
#else
#define SYSENTRY(x) \
- .weak _C_LABEL(x); \
- _C_LABEL(x) = _C_LABEL(_thread_sys_/**/x); \
+ WEAK_ALIAS(x,_thread_sys_/**/x); \
ENTRY(_thread_sys_/**/x)
#endif
diff --git a/sys/arch/hppa/include/asm.h b/sys/arch/hppa/include/asm.h
index f30669db6a5..8c2997db31b 100644
--- a/sys/arch/hppa/include/asm.h
+++ b/sys/arch/hppa/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.15 2005/01/23 16:28:29 mickey Exp $ */
+/* $OpenBSD: asm.h,v 1.16 2010/10/01 05:02:19 guenther Exp $ */
/*
* Copyright (c) 1990,1991,1994 The University of Utah and
@@ -251,4 +251,6 @@ tf4 .reg %fr8
#define BSS(n,s) ! .data ! .label n ! .comm s
+#define WEAK_ALIAS(alias,sym) ! .weak alias ! .set alias, sym
+
#endif /* _MACHINE_ASM_H_ */
diff --git a/sys/arch/hppa64/include/asm.h b/sys/arch/hppa64/include/asm.h
index ed1ca9acafe..f4796d2d885 100644
--- a/sys/arch/hppa64/include/asm.h
+++ b/sys/arch/hppa64/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.1 2005/04/01 10:40:48 mickey Exp $ */
+/* $OpenBSD: asm.h,v 1.2 2010/10/01 05:02:19 guenther Exp $ */
/*
* Copyright (c) 1990,1991,1994 The University of Utah and
@@ -67,4 +67,6 @@ ap .reg %r29
#define BSS(n,s) ! .data ! .label n ! .comm s
+#define WEAK_ALIAS(alias,sym) ! .weak alias ! .set alias, sym
+
#endif /* _MACHINE_ASM_H_ */
diff --git a/sys/arch/mips64/include/asm.h b/sys/arch/mips64/include/asm.h
index 5b97ab7848c..5fb4f23b98b 100644
--- a/sys/arch/mips64/include/asm.h
+++ b/sys/arch/mips64/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.12 2010/09/11 11:29:49 syuu Exp $ */
+/* $OpenBSD: asm.h,v 1.13 2010/10/01 05:02:19 guenther Exp $ */
/*
* Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -270,6 +270,13 @@ x: ; \
.end x
/*
+ * WEAK ALIAS: create a weak alias
+ */
+#define WEAK_ALIAS(alias,sym) \
+ .weak alias; alias = sym
+
+
+/*
* Macros to panic and printf from assembly language.
*/
#define PANIC(msg) \
diff --git a/sys/arch/powerpc/include/asm.h b/sys/arch/powerpc/include/asm.h
index 4a996b18638..14c950da7e9 100644
--- a/sys/arch/powerpc/include/asm.h
+++ b/sys/arch/powerpc/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.7 2002/09/15 09:01:59 deraadt Exp $ */
+/* $OpenBSD: asm.h,v 1.8 2010/10/01 05:02:19 guenther Exp $ */
/* $NetBSD: asm.h,v 1.1 1996/09/30 16:34:20 ws Exp $ */
/*
@@ -103,4 +103,7 @@ _TMP_LABEL(y):; \
#define RCSID(x) .text; .asciz x
+#define WEAK_ALIAS(alias,sym) \
+ .weak alias; .set alias,sym
+
#endif /* !_POWERPC_ASM_H_ */