diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-08-11 12:13:17 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-08-11 12:13:17 +0000 |
commit | 2602573e86449ad72340ab515d5962bad4856642 (patch) | |
tree | b70be10522792b3dbbe6c0a0c635b7b34089f70f /sys/arch/sparc/include/cdefs.h | |
parent | 05722dbc2443ec4362e73a5e2fa77bb8de847d34 (diff) |
Prepare for ELF.
Diffstat (limited to 'sys/arch/sparc/include/cdefs.h')
-rw-r--r-- | sys/arch/sparc/include/cdefs.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/arch/sparc/include/cdefs.h b/sys/arch/sparc/include/cdefs.h index 9173258112a..711af194ebc 100644 --- a/sys/arch/sparc/include/cdefs.h +++ b/sys/arch/sparc/include/cdefs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cdefs.h,v 1.7 2002/02/14 04:23:33 fgsch Exp $ */ +/* $OpenBSD: cdefs.h,v 1.8 2002/08/11 12:13:16 art Exp $ */ /* $NetBSD: cdefs.h,v 1.3 1996/12/27 20:51:31 pk Exp $ */ /* @@ -15,8 +15,14 @@ #define _C_LABEL(x) _STRING(_/**/x) #endif -#ifdef __GNUC__ -#ifdef __STDC__ +#if defined(__GNUC__) && defined(__STDC__) +#ifdef __ELF__ +#define __weak_alias(alias,sym) \ + __asm__(".weak " __STRING(alias) " ; " __STRING(alias) " = " __STRING(sym)) +#define __warn_references(sym,msg) \ + __asm__(".section .gnu.warning." __STRING(sym) " ; .ascii \"" msg "\" ; .text") + +#else #define __indr_reference(sym,alias) \ __asm__(".stabs \"_" #alias "\",11,0,0,0"); \ __asm__(".stabs \"_" #sym "\",1,0,0,0") @@ -25,16 +31,7 @@ __asm__(".stabs \"_" #sym "\",1,0,0,0") #define __weak_alias(alias,sym) \ __asm__(".weak _" #alias "; _" #alias "= _" __STRING(sym)) -#else -#define __indr_reference(sym,alias) \ - __asm__(".stabs \"_/**/alias\",11,0,0,0"); \ - __asm__(".stabs \"_/**/sym\",1,0,0,0") -#define __warn_references(sym,msg) \ - __asm__(".stabs msg,30,0,0,0"); \ - __asm__(".stabs \"_/**/sym\",1,0,0,0") -#define __weak_alias(alias,sym) \ - __asm__(".weak _/**/alias; _/**/alias = _/**/sym") -#endif +#endif /* __ELF__ */ #else #define __indr_reference(sym,alias) #define __warn_references(sym,msg) |