diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-02-23 07:16:27 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-02-23 07:16:27 +0000 |
commit | 7ee2b312b1ee12952b625fe0ef8c8872269b1877 (patch) | |
tree | 13b8907c4e6d5101694b4a87f0d828c6084b2a2b /sys/arch/riscv64 | |
parent | ba309d70a8bccfbe64601502089e8a8f19d3259f (diff) |
unifdef __ELF__
ok guenther@
Diffstat (limited to 'sys/arch/riscv64')
-rw-r--r-- | sys/arch/riscv64/include/asm.h | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/sys/arch/riscv64/include/asm.h b/sys/arch/riscv64/include/asm.h index 156f7dfc932..746c35531d0 100644 --- a/sys/arch/riscv64/include/asm.h +++ b/sys/arch/riscv64/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.2 2021/05/12 01:20:52 jsg Exp $ */ +/* $OpenBSD: asm.h,v 1.3 2022/02/23 07:16:26 jsg Exp $ */ /* * Copyright (c) 2020 Brian Bamsch <bbamsch@google.com> @@ -38,16 +38,8 @@ #ifndef _MACHINE_ASM_H_ #define _MACHINE_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 _ASM_LABEL(x) x +#define _C_LABEL(x) x +#define _ASM_LABEL(x) x #ifdef __STDC__ # define __CONCAT(x,y) x ## y @@ -99,7 +91,7 @@ #define EENTRY(sym) .globl sym; sym: #define EEND(sym) -#if defined(__ELF__) && defined(__PIC__) +#ifdef __PIC__ #ifdef __STDC__ #define PIC_SYM(x,y) x ## ( ## y ## ) #else @@ -109,28 +101,22 @@ #define PIC_SYM(x,y) 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 ; \ - .stabs __STRING(_/**/sym),1,0,0,0 -#endif /* __STDC__ */ + .stabs __STRING(sym),1,0,0,0 +#endif #define WEAK_REFERENCE(sym, alias) \ .weak alias; \ |