summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2010-10-01 05:02:20 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2010-10-01 05:02:20 +0000
commitba144dd488c8790f80d30537e84669b98180cd05 (patch)
tree2280d2aa5b3b0cf8f95de0073f5a0da9885fa64f /sys/arch
parent46c7e95a9c07869d323b1b9b8b5c36c101e03478 (diff)
Provide a WEAK_ALIAS macro in <machine/asm.h> for the few platforms
that didn't already have one, and then immediately use it in libc's SYS.h ok miod@
Diffstat (limited to 'sys/arch')
-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
4 files changed, 18 insertions, 4 deletions
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_ */