diff options
author | 2016-05-27 16:32:38 +0000 | |
---|---|---|
committer | 2016-05-27 16:32:38 +0000 | |
commit | a5cc6a2b14a3d96fcaf582cee1bc576b02bc4ac5 (patch) | |
tree | be24cb52776e2c31371fea20d2e53cd24752468e | |
parent | When resampling, use the exact resampling factor instead of the ratio (diff) | |
download | wireguard-openbsd-a5cc6a2b14a3d96fcaf582cee1bc576b02bc4ac5.tar.xz wireguard-openbsd-a5cc6a2b14a3d96fcaf582cee1bc576b02bc4ac5.zip |
Remove the non ELF macros
ok millert
-rw-r--r-- | sys/arch/alpha/include/asm.h | 11 | ||||
-rw-r--r-- | sys/arch/arm/include/asm.h | 31 | ||||
-rw-r--r-- | sys/arch/arm/include/profile.h | 6 | ||||
-rw-r--r-- | sys/arch/m88k/include/asm.h | 25 | ||||
-rw-r--r-- | sys/arch/sh/include/asm.h | 29 | ||||
-rw-r--r-- | sys/arch/sh/include/profile.h | 6 | ||||
-rw-r--r-- | sys/arch/sparc/include/asm.h | 14 | ||||
-rw-r--r-- | sys/arch/sparc/include/profile.h | 7 | ||||
-rw-r--r-- | sys/arch/sparc64/include/asm.h | 26 |
9 files changed, 13 insertions, 142 deletions
diff --git a/sys/arch/alpha/include/asm.h b/sys/arch/alpha/include/asm.h index 24d9abd39b6..409bce9ac00 100644 --- a/sys/arch/alpha/include/asm.h +++ b/sys/arch/alpha/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.12 2013/03/28 17:41:03 martynas Exp $ */ +/* $OpenBSD: asm.h,v 1.13 2016/05/27 16:32:38 deraadt Exp $ */ /* $NetBSD: asm.h,v 1.23 2000/06/23 12:18:45 kleink Exp $ */ /* @@ -617,20 +617,17 @@ label: ASCIZ msg; \ * 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 -#endif /* * WARN_REFERENCES: create a warning if the specified symbol is referenced * (ELF only). */ -#ifdef __ELF__ #ifdef __STDC__ #define WARN_REFERENCES(_sym,_msg) \ .section .gnu.warning. ## _sym ; .ascii _msg ; .text @@ -638,7 +635,6 @@ label: ASCIZ msg; \ #define WARN_REFERENCES(_sym,_msg) \ .section .gnu.warning./**/_sym ; .ascii _msg ; .text #endif /* __STDC__ */ -#endif /* __ELF__ */ /* * Kernel RCS ID tag and copyright macros @@ -646,13 +642,8 @@ label: ASCIZ msg; \ #ifdef _KERNEL -#ifdef __ELF__ #define __KERNEL_SECTIONSTRING(_sec, _str) \ .section _sec ; .asciz _str ; .text -#else /* __ELF__ */ -#define __KERNEL_SECTIONSTRING(_sec, _str) \ - .data ; .asciz _str ; .align 3 ; .text -#endif /* __ELF__ */ #define __KERNEL_RCSID(_n, _s) __KERNEL_SECTIONSTRING(.ident, _s) #define __KERNEL_COPYRIGHT(_n, _s) __KERNEL_SECTIONSTRING(.copyright, _s) diff --git a/sys/arch/arm/include/asm.h b/sys/arch/arm/include/asm.h index 07fa1a8b07b..e9963628fc7 100644 --- a/sys/arch/arm/include/asm.h +++ b/sys/arch/arm/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.5 2015/08/30 10:19:49 guenther Exp $ */ +/* $OpenBSD: asm.h,v 1.6 2016/05/27 16:32:38 deraadt Exp $ */ /* $NetBSD: asm.h,v 1.4 2001/07/16 05:43:32 matt Exp $ */ /* @@ -38,15 +38,7 @@ #ifndef _ARM_ASM_H_ #define _ARM_ASM_H_ -#ifdef __ELF__ -# define _C_LABEL(x) x -#else -# ifdef __STDC__ -# define _C_LABEL(x) _ ## x -# else -# define _C_LABEL(x) _/**/x -# endif -#endif +#define _C_LABEL(x) x #define _ASM_LABEL(x) x #ifdef __STDC__ @@ -73,13 +65,8 @@ .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x: #ifdef GPROF -# ifdef __ELF__ -# define _PROF_PROLOGUE \ +# define _PROF_PROLOGUE \ mov ip, lr; bl __mcount -# else -# define _PROF_PROLOGUE \ - mov ip,lr; bl mcount -# endif #else # define _PROF_PROLOGUE #endif @@ -92,7 +79,7 @@ #define ASMSTR .asciz -#if defined(__ELF__) && defined(__PIC__) +#if defined(__PIC__) #ifdef __STDC__ #define PIC_SYM(x,y) x ## ( ## y ## ) #else @@ -102,29 +89,19 @@ #define PIC_SYM(x,y) x #endif -#ifdef __ELF__ #define RCSID(x) .section ".ident"; .asciz x -#else -#define RCSID(x) .text; .asciz x -#endif -#ifdef __ELF__ #define STRONG_ALIAS(alias,sym) \ .global alias; \ alias = sym #define WEAK_ALIAS(alias,sym) \ .weak alias; \ alias = sym -#endif #ifdef __STDC__ #define WARN_REFERENCES(sym,msg) \ .stabs msg ## ,30,0,0,0 ; \ .stabs __STRING(_C_LABEL(sym)) ## ,1,0,0,0 -#elif defined(__ELF__) -#define WARN_REFERENCES(sym,msg) \ - .stabs msg,30,0,0,0 ; \ - .stabs __STRING(sym),1,0,0,0 #else #define WARN_REFERENCES(sym,msg) \ .stabs msg,30,0,0,0 ; \ diff --git a/sys/arch/arm/include/profile.h b/sys/arch/arm/include/profile.h index 41c90f83dd2..ecb61a95d89 100644 --- a/sys/arch/arm/include/profile.h +++ b/sys/arch/arm/include/profile.h @@ -1,4 +1,4 @@ -/* $OpenBSD: profile.h,v 1.3 2012/08/22 17:19:35 pascal Exp $ */ +/* $OpenBSD: profile.h,v 1.4 2016/05/27 16:32:38 deraadt Exp $ */ /* $NetBSD: profile.h,v 1.5 2002/03/24 15:49:40 bjh21 Exp $ */ /* @@ -39,14 +39,10 @@ * prologue. */ -#ifdef __ELF__ #define MCOUNT_ASM_NAME "__mcount" #ifdef __PIC__ #define PLTSYM "(PLT)" #endif -#else -#define MCOUNT_ASM_NAME "mcount" -#endif #ifndef PLTSYM #define PLTSYM diff --git a/sys/arch/m88k/include/asm.h b/sys/arch/m88k/include/asm.h index 0126b9be85e..6c858a99382 100644 --- a/sys/arch/m88k/include/asm.h +++ b/sys/arch/m88k/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.14 2013/05/17 22:28:21 miod Exp $ */ +/* $OpenBSD: asm.h,v 1.15 2016/05/27 16:32:38 deraadt Exp $ */ /* * Mach Operating System @@ -30,25 +30,11 @@ #ifndef _M88K_ASM_H_ #define _M88K_ASM_H_ -#ifdef __ELF__ #define _C_LABEL(name) name -#else -#ifdef __STDC__ -#define _C_LABEL(name) _ ## name -#else -#define _C_LABEL(name) _/**/name -#endif -#endif - #define _ASM_LABEL(name) name -#ifdef __ELF__ #define _ENTRY(name) \ .text; .align 3; .globl name; .type name,@function; name: -#else -#define _ENTRY(name) \ - .text; .align 8; .globl name; name: -#endif #define ENTRY(name) _ENTRY(_C_LABEL(name)) #define ASENTRY(name) _ENTRY(_ASM_LABEL(name)) @@ -74,21 +60,12 @@ #define ASBSS(name, size) \ .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 -#define STRONG_ALIAS(alias,sym) \ - .global _##alias; \ - _##alias = _##sym -#define WEAK_ALIAS(alias,sym) \ - .weak _##alias; \ - _##alias = _##sym -#endif #ifdef _KERNEL diff --git a/sys/arch/sh/include/asm.h b/sys/arch/sh/include/asm.h index 20719ef56d4..3429ba67bc8 100644 --- a/sys/arch/sh/include/asm.h +++ b/sys/arch/sh/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.4 2013/03/28 17:41:04 martynas Exp $ */ +/* $OpenBSD: asm.h,v 1.5 2016/05/27 16:32:38 deraadt Exp $ */ /* $NetBSD: asm.h,v 1.25 2006/01/20 22:02:40 christos Exp $ */ /*- @@ -38,15 +38,7 @@ #ifndef _SH_ASM_H_ #define _SH_ASM_H_ -#ifdef __ELF__ -# define _C_LABEL(x) x -#else -#ifdef __STDC__ -# define _C_LABEL(x) _ ## x -#else -# define _C_LABEL(x) _/**/x -#endif -#endif +#define _C_LABEL(x) x #define _ASM_LABEL(x) x #ifdef __STDC__ @@ -62,20 +54,12 @@ # define _ALIGN_TEXT .align 2 #endif -#ifdef __ELF__ #define _ENTRY(x) \ .text ;\ _ALIGN_TEXT ;\ .globl x ;\ .type x,@function ;\ x: -#else /* !__ELF__ */ -#define _ENTRY(x) \ - .text ;\ - _ALIGN_TEXT ;\ - .globl x ;\ - x: -#endif /* !__ELF__ */ #ifdef GPROF #define _PROF_PROLOGUE \ @@ -100,17 +84,10 @@ #define SET_ASENTRY_SIZE(y) \ .size _ASM_LABEL(y), . - _ASM_LABEL(y) -#ifdef __ELF__ #define ALTENTRY(name) \ .globl _C_LABEL(name) ;\ .type _C_LABEL(name),@function ;\ _C_LABEL(name): -#else -#define ALTENTRY(name) \ - .globl _C_LABEL(name) ;\ - _C_LABEL(name): -#endif - /* * Hide the gory details of PIC calls vs. normal calls. Use as in the @@ -205,14 +182,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) -#endif #define WARN_REFERENCES(_sym,_msg) \ .section .gnu.warning._sym; .ascii _msg; .previous diff --git a/sys/arch/sh/include/profile.h b/sys/arch/sh/include/profile.h index 97c0dae63bf..d29b3b24cc1 100644 --- a/sys/arch/sh/include/profile.h +++ b/sys/arch/sh/include/profile.h @@ -1,4 +1,4 @@ -/* $OpenBSD: profile.h,v 1.2 2013/03/02 22:42:48 miod Exp $ */ +/* $OpenBSD: profile.h,v 1.3 2016/05/27 16:32:38 deraadt Exp $ */ /* $NetBSD: profile.h,v 1.5 2006/10/26 23:54:28 uwe Exp $ */ /*- @@ -27,11 +27,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if defined(__ELF__) #define _MCOUNT_DECL static void _mcount -#else -#define _MCOUNT_DECL static void mcount -#endif #define MCOUNT __asm (" \n\ .text \n\ diff --git a/sys/arch/sparc/include/asm.h b/sys/arch/sparc/include/asm.h index 27c94d43dd3..9d737f0dce8 100644 --- a/sys/arch/sparc/include/asm.h +++ b/sys/arch/sparc/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.8 2015/08/30 10:19:49 guenther Exp $ */ +/* $OpenBSD: asm.h,v 1.9 2016/05/27 16:32:39 deraadt Exp $ */ /* $NetBSD: asm.h,v 1.5 1997/07/16 15:16:43 christos Exp $ */ /* @@ -41,38 +41,26 @@ #ifndef _MACHINE_ASM_H_ #define _MACHINE_ASM_H_ -#ifdef __ELF__ #define _C_LABEL(name) name -#else -#ifdef __STDC__ -#define _C_LABEL(name) _ ## name -#else -#define _C_LABEL(name) _/**/name -#endif -#endif #define _ASM_LABEL(name) name /* * 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 -#endif /* * WARN_REFERENCES: create a warning if the specified symbol is referenced * (ELF only). */ -#ifdef __ELF__ #define WARN_REFERENCES(_sym,_msg) \ .section .gnu.warning. ## _sym ; .ascii _msg ; .text -#endif /* __ELF__ */ #ifdef __PIC__ diff --git a/sys/arch/sparc/include/profile.h b/sys/arch/sparc/include/profile.h index ad607e94c70..66e7a815d34 100644 --- a/sys/arch/sparc/include/profile.h +++ b/sys/arch/sparc/include/profile.h @@ -1,4 +1,4 @@ -/* $OpenBSD: profile.h,v 1.9 2012/08/22 17:19:35 pascal Exp $ */ +/* $OpenBSD: profile.h,v 1.10 2016/05/27 16:32:39 deraadt Exp $ */ /* $NetBSD: profile.h,v 1.8 1997/02/01 20:56:40 mrg Exp $ */ /* @@ -45,13 +45,8 @@ * Can't use _C_LABEL here. */ -#ifdef __ELF__ #define _MCOUNT_SYM "__mcount" #define _MCOUNT_ENTRY "_mcount" -#else -#define _MCOUNT_SYM "___mcount" -#define _MCOUNT_ENTRY "mcount" -#endif #ifdef __PIC__ /* Inline expansion of PICCY_SET() (see <machine/asm.h>). */ diff --git a/sys/arch/sparc64/include/asm.h b/sys/arch/sparc64/include/asm.h index c2a65fffbef..20995f01769 100644 --- a/sys/arch/sparc64/include/asm.h +++ b/sys/arch/sparc64/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.9 2015/08/30 10:19:49 guenther Exp $ */ +/* $OpenBSD: asm.h,v 1.10 2016/05/27 16:32:39 deraadt Exp $ */ /* $NetBSD: asm.h,v 1.15 2000/08/02 22:24:39 eeh Exp $ */ /* @@ -52,15 +52,7 @@ #endif #include <machine/frame.h> -#ifdef __ELF__ #define _C_LABEL(name) name -#else -#ifdef __STDC__ -#define _C_LABEL(name) _ ## name -#else -#define _C_LABEL(name) _/**/name -#endif -#endif #define _ASM_LABEL(name) name #ifdef __PIC__ @@ -116,19 +108,16 @@ #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 -#endif /* * WARN_REFERENCES: create a warning if the specified symbol is referenced. */ -#ifdef __ELF__ #ifdef __STDC__ #define WARN_REFERENCES(_sym,_msg) \ .section .gnu.warning. ## _sym ; .ascii _msg ; .text @@ -136,18 +125,5 @@ #define WARN_REFERENCES(_sym,_msg) \ .section .gnu.warning./**/_sym ; .ascii _msg ; .text #endif /* __STDC__ */ -#else -#ifdef __STDC__ -#define __STRING(x) #x -#define WARN_REFERENCES(sym,msg) \ - .stabs msg ## ,30,0,0,0 ; \ - .stabs __STRING(_ ## sym) ## ,1,0,0,0 -#else -#define __STRING(x) "x" -#define WARN_REFERENCES(sym,msg) \ - .stabs msg,30,0,0,0 ; \ - .stabs __STRING(_/**/sym),1,0,0,0 -#endif /* __STDC__ */ -#endif /* __ELF__ */ #endif /* _MACHINE_ASM_H_ */ |