summaryrefslogtreecommitdiff
path: root/lib/libc/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 /lib/libc/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 'lib/libc/arch')
-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
5 files changed, 12 insertions, 14 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 823f6c2769b..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 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