diff options
author | 2010-10-01 05:02:19 +0000 | |
---|---|---|
committer | 2010-10-01 05:02:19 +0000 | |
commit | eca0a8db625d25afc34637ccf8044cc346cf377d (patch) | |
tree | 0865012e6f0e20b2016efce42bdf23da4f1298d4 /lib/libc | |
parent | Add __only_inline, for use in headers like <ctype.h> for defining copies (diff) | |
download | wireguard-openbsd-eca0a8db625d25afc34637ccf8044cc346cf377d.tar.xz wireguard-openbsd-eca0a8db625d25afc34637ccf8044cc346cf377d.zip |
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')
-rw-r--r-- | lib/libc/arch/hppa/SYS.h | 4 | ||||
-rw-r--r-- | lib/libc/arch/hppa64/SYS.h | 4 | ||||
-rw-r--r-- | lib/libc/arch/mips64/SYS.h | 6 | ||||
-rw-r--r-- | lib/libc/arch/powerpc/SYS.h | 4 | ||||
-rw-r--r-- | lib/libc/arch/sh/SYS.h | 8 |
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 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 |