diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/include/asm.h | 8 | ||||
-rw-r--r-- | sys/arch/amd64/include/asm.h | 5 | ||||
-rw-r--r-- | sys/arch/arm/include/asm.h | 5 | ||||
-rw-r--r-- | sys/arch/hppa/include/asm.h | 3 | ||||
-rw-r--r-- | sys/arch/hppa64/include/asm.h | 3 | ||||
-rw-r--r-- | sys/arch/i386/include/asm.h | 8 | ||||
-rwxr-xr-x | sys/arch/ia64/include/asm.h | 15 | ||||
-rw-r--r-- | sys/arch/m68k/include/asm.h | 6 | ||||
-rw-r--r-- | sys/arch/m88k/include/asm.h | 14 | ||||
-rw-r--r-- | sys/arch/mips64/include/asm.h | 7 | ||||
-rw-r--r-- | sys/arch/powerpc/include/asm.h | 4 | ||||
-rw-r--r-- | sys/arch/sh/include/asm.h | 9 | ||||
-rw-r--r-- | sys/arch/sparc/include/asm.h | 8 | ||||
-rw-r--r-- | sys/arch/sparc64/include/asm.h | 5 | ||||
-rw-r--r-- | sys/arch/vax/include/asm.h | 14 |
15 files changed, 71 insertions, 43 deletions
diff --git a/sys/arch/alpha/include/asm.h b/sys/arch/alpha/include/asm.h index 44b9a2353da..24d9abd39b6 100644 --- a/sys/arch/alpha/include/asm.h +++ b/sys/arch/alpha/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.11 2012/09/21 13:58:48 naddy Exp $ */ +/* $OpenBSD: asm.h,v 1.12 2013/03/28 17:41:03 martynas Exp $ */ /* $NetBSD: asm.h,v 1.23 2000/06/23 12:18:45 kleink Exp $ */ /* @@ -614,9 +614,13 @@ label: ASCIZ msg; \ ldgp gp, 0(reg) /* - * WEAK_ALIAS: create a weak alias (ELF only). + * STRONG_ALIAS, WEAK_ALIAS + * Create a strong or weak alias. */ #ifdef __ELF__ +#define STRONG_ALIAS(alias,sym) \ + .global alias; \ + alias = sym #define WEAK_ALIAS(alias,sym) \ .weak alias; \ alias = sym diff --git a/sys/arch/amd64/include/asm.h b/sys/arch/amd64/include/asm.h index 23bd1caf3b6..880c24f1ec5 100644 --- a/sys/arch/amd64/include/asm.h +++ b/sys/arch/amd64/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.4 2012/08/22 17:19:35 pascal Exp $ */ +/* $OpenBSD: asm.h,v 1.5 2013/03/28 17:41:03 martynas Exp $ */ /* $NetBSD: asm.h,v 1.2 2003/05/02 18:05:47 yamt Exp $ */ /*- @@ -100,6 +100,9 @@ #define RCSID(x) .text; .asciz x +#define STRONG_ALIAS(alias,sym) \ + .global alias; \ + alias = sym #define WEAK_ALIAS(alias,sym) \ .weak alias; \ alias = sym diff --git a/sys/arch/arm/include/asm.h b/sys/arch/arm/include/asm.h index cf51698c1d0..454ad4d735b 100644 --- a/sys/arch/arm/include/asm.h +++ b/sys/arch/arm/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.3 2012/08/25 22:10:59 kettenis Exp $ */ +/* $OpenBSD: asm.h,v 1.4 2013/03/28 17:41:04 martynas Exp $ */ /* $NetBSD: asm.h,v 1.4 2001/07/16 05:43:32 matt Exp $ */ /* @@ -108,6 +108,9 @@ #endif #ifdef __ELF__ +#define STRONG_ALIAS(alias,sym) \ + .global alias; \ + alias = sym #define WEAK_ALIAS(alias,sym) \ .weak alias; \ alias = sym diff --git a/sys/arch/hppa/include/asm.h b/sys/arch/hppa/include/asm.h index c5f9f9cefb1..bac790a7631 100644 --- a/sys/arch/hppa/include/asm.h +++ b/sys/arch/hppa/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.17 2012/09/02 20:30:13 kettenis Exp $ */ +/* $OpenBSD: asm.h,v 1.18 2013/03/28 17:41:04 martynas Exp $ */ /* * Copyright (c) 1990,1991,1994 The University of Utah and @@ -265,6 +265,7 @@ tf4 .reg %fr8 #define BSS(n,s) ! .data ! .label n ! .comm s +#define STRONG_ALIAS(alias,sym) ! .global alias ! .set alias, sym #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 f4796d2d885..6a3caa83dce 100644 --- a/sys/arch/hppa64/include/asm.h +++ b/sys/arch/hppa64/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.2 2010/10/01 05:02:19 guenther Exp $ */ +/* $OpenBSD: asm.h,v 1.3 2013/03/28 17:41:04 martynas Exp $ */ /* * Copyright (c) 1990,1991,1994 The University of Utah and @@ -67,6 +67,7 @@ ap .reg %r29 #define BSS(n,s) ! .data ! .label n ! .comm s +#define STRONG_ALIAS(alias,sym) ! .global alias ! .set alias, sym #define WEAK_ALIAS(alias,sym) ! .weak alias ! .set alias, sym #endif /* _MACHINE_ASM_H_ */ diff --git a/sys/arch/i386/include/asm.h b/sys/arch/i386/include/asm.h index 332afac5fd8..0661dd32886 100644 --- a/sys/arch/i386/include/asm.h +++ b/sys/arch/i386/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.12 2012/08/22 17:19:35 pascal Exp $ */ +/* $OpenBSD: asm.h,v 1.13 2013/03/28 17:41:04 martynas Exp $ */ /* $NetBSD: asm.h,v 1.7 1994/10/27 04:15:56 cgd Exp $ */ /*- @@ -72,8 +72,12 @@ #endif /* - * WEAK ALIAS: create a weak alias + * STRONG_ALIAS, WEAK_ALIAS + * Create a strong or weak alias. */ +#define STRONG_ALIAS(alias,sym) \ + .global alias; \ + alias = sym #define WEAK_ALIAS(alias,sym) \ .weak alias; \ alias = sym diff --git a/sys/arch/ia64/include/asm.h b/sys/arch/ia64/include/asm.h index 12ac3a46bf7..7c619013ab7 100755 --- a/sys/arch/ia64/include/asm.h +++ b/sys/arch/ia64/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */ +/* $OpenBSD: asm.h,v 1.2 2013/03/28 17:41:04 martynas Exp $ */ /* $NetBSD: asm.h,v 1.4 2006/08/30 11:14:23 cherry Exp $ */ /* - @@ -172,15 +172,12 @@ label: ASCIZ msg; \ /* - * WEAK_ALIAS: create a weak alias (ELF only). + * STRONG_ALIAS, WEAK_ALIAS + * Create a strong or weak alias. */ +#define STRONG_ALIAS(alias,sym) \ + .global alias; \ + alias = sym #define WEAK_ALIAS(alias,sym) \ .weak alias; \ alias = sym - -/* - * STRONG_ALIAS: create a strong alias. - */ -#define STRONG_ALIAS(alias,sym) \ - .globl alias; \ - alias = sym diff --git a/sys/arch/m68k/include/asm.h b/sys/arch/m68k/include/asm.h index 98963db805b..fc0fae490af 100644 --- a/sys/arch/m68k/include/asm.h +++ b/sys/arch/m68k/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.11 2013/02/06 20:00:14 miod Exp $ */ +/* $OpenBSD: asm.h,v 1.12 2013/03/28 17:41:04 martynas Exp $ */ /* $NetBSD: asm.h,v 1.13 1997/04/24 22:49:39 thorpej Exp $ */ /* @@ -94,6 +94,10 @@ .asciz x ; \ .even +#define STRONG_ALIAS(alias,sym) \ + .global alias; \ + alias = sym + #define WEAK_ALIAS(alias,sym) \ .weak alias; \ alias = sym diff --git a/sys/arch/m88k/include/asm.h b/sys/arch/m88k/include/asm.h index 272ae7af9dc..f734fe8436b 100644 --- a/sys/arch/m88k/include/asm.h +++ b/sys/arch/m88k/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.12 2013/01/11 21:19:45 miod Exp $ */ +/* $OpenBSD: asm.h,v 1.13 2013/03/28 17:41:04 martynas Exp $ */ /* * Mach Operating System @@ -75,19 +75,19 @@ .comm _ASM_LABEL(name), size #ifdef __ELF__ +#define STRONG_ALIAS(alias,sym) \ + .global alias; \ + alias = sym #define WEAK_ALIAS(alias,sym) \ .weak alias; \ alias = sym #else -#ifdef __STDC__ +#define STRONG_ALIAS(alias,sym) \ + .global _##alias; \ + _##alias = _##sym #define WEAK_ALIAS(alias,sym) \ .weak _##alias; \ _##alias = _##sym -#else -#define WEAK_ALIAS(alias,sym) \ - .weak _/**/alias; \ - _/**/alias = _/**/sym -#endif #endif #ifdef _KERNEL diff --git a/sys/arch/mips64/include/asm.h b/sys/arch/mips64/include/asm.h index 127ad53528b..0180f0368ff 100644 --- a/sys/arch/mips64/include/asm.h +++ b/sys/arch/mips64/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.18 2012/09/29 21:37:03 miod Exp $ */ +/* $OpenBSD: asm.h,v 1.19 2013/03/28 17:41:04 martynas Exp $ */ /* * Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -288,8 +288,11 @@ x: ; \ .end x /* - * WEAK ALIAS: create a weak alias + * STRONG_ALIAS, WEAK_ALIAS + * Create a strong or weak alias. */ +#define STRONG_ALIAS(alias,sym) \ + .global alias; alias = sym #define WEAK_ALIAS(alias,sym) \ .weak alias; alias = sym diff --git a/sys/arch/powerpc/include/asm.h b/sys/arch/powerpc/include/asm.h index 305a55ef9cc..4812acd9933 100644 --- a/sys/arch/powerpc/include/asm.h +++ b/sys/arch/powerpc/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.9 2012/08/22 17:19:35 pascal Exp $ */ +/* $OpenBSD: asm.h,v 1.10 2013/03/28 17:41:04 martynas Exp $ */ /* $NetBSD: asm.h,v 1.1 1996/09/30 16:34:20 ws Exp $ */ /* @@ -103,6 +103,8 @@ _TMP_LABEL(y):; \ #define RCSID(x) .text; .asciz x +#define STRONG_ALIAS(alias,sym) \ + .global alias; .set alias,sym #define WEAK_ALIAS(alias,sym) \ .weak alias; .set alias,sym diff --git a/sys/arch/sh/include/asm.h b/sys/arch/sh/include/asm.h index e0c4afd9d65..20719ef56d4 100644 --- a/sys/arch/sh/include/asm.h +++ b/sys/arch/sh/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.3 2012/08/22 17:19:35 pascal Exp $ */ +/* $OpenBSD: asm.h,v 1.4 2013/03/28 17:41:04 martynas Exp $ */ /* $NetBSD: asm.h,v 1.25 2006/01/20 22:02:40 christos Exp $ */ /*- @@ -206,13 +206,12 @@ #define ASMSTR .asciz #ifdef __ELF__ +#define STRONG_ALIAS(alias,sym) \ + .global _C_LABEL(alias); \ + _C_LABEL(alias) = _C_LABEL(sym) #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/arch/sparc/include/asm.h b/sys/arch/sparc/include/asm.h index 97b770066ff..a25e9292e37 100644 --- a/sys/arch/sparc/include/asm.h +++ b/sys/arch/sparc/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.6 2012/08/22 17:19:35 pascal Exp $ */ +/* $OpenBSD: asm.h,v 1.7 2013/03/28 17:41:04 martynas Exp $ */ /* $NetBSD: asm.h,v 1.5 1997/07/16 15:16:43 christos Exp $ */ /* @@ -53,9 +53,13 @@ #define _ASM_LABEL(name) name /* - * WEAK_ALIAS: create a weak alias (ELF only) + * STRONG_ALIAS, WEAK_ALIAS + * Create a strong or weak alias. */ #ifdef __ELF__ +#define STRONG_ALIAS(alias,sym) \ + .global alias; \ + alias = sym #define WEAK_ALIAS(alias,sym) \ .weak alias; \ alias = sym diff --git a/sys/arch/sparc64/include/asm.h b/sys/arch/sparc64/include/asm.h index 71d1da049a9..090125a58c2 100644 --- a/sys/arch/sparc64/include/asm.h +++ b/sys/arch/sparc64/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.7 2013/02/05 09:33:28 mpi Exp $ */ +/* $OpenBSD: asm.h,v 1.8 2013/03/28 17:41:04 martynas Exp $ */ /* $NetBSD: asm.h,v 1.15 2000/08/02 22:24:39 eeh Exp $ */ /* @@ -116,6 +116,9 @@ #define RCSID(name) .asciz name #ifdef __ELF__ +#define STRONG_ALIAS(alias,sym) \ + .global alias; \ + alias = sym #define WEAK_ALIAS(alias,sym) \ .weak alias; \ alias = sym diff --git a/sys/arch/vax/include/asm.h b/sys/arch/vax/include/asm.h index 13193b10333..b0dd01c8104 100644 --- a/sys/arch/vax/include/asm.h +++ b/sys/arch/vax/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.10 2010/05/29 14:08:21 deraadt Exp $ */ +/* $OpenBSD: asm.h,v 1.11 2013/03/28 17:41:04 martynas Exp $ */ /* $NetBSD: asm.h,v 1.9 1999/01/15 13:31:28 bouyer Exp $ */ /* * Copyright (c) 1982, 1993 @@ -103,19 +103,19 @@ #define RCSID(x) .text; .asciz x #ifdef __ELF__ +#define STRONG_ALIAS(alias,sym) \ + .global alias; \ + alias = sym #define WEAK_ALIAS(alias,sym) \ .weak alias; \ alias = sym #else -#ifdef __STDC__ +#define STRONG_ALIAS(alias,sym) \ + .global _##alias; \ + _##alias = _##sym #define WEAK_ALIAS(alias,sym) \ .weak _##alias; \ _##alias = _##sym -#else -#define WEAK_ALIAS(alias,sym) \ - .weak _/**/alias; \ - _/**/alias = _/**/sym -#endif #endif #ifdef __STDC__ |