1 /* $NetBSD: cdefs_aout.h,v 1.10 2002/05/11 11:57:14 itohy Exp $ */ 2 3 /* 4 * Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. 5 * Public domain. 6 */ 7 8 #ifndef _SYS_CDEFS_AOUT_H_ 9 #define _SYS_CDEFS_AOUT_H_ 10 11 #define _C_LABEL(x) __CONCAT(_,x) 12 13 #if __STDC__ 14 #define ___RENAME(x) __asm__(___STRING(_C_LABEL(x))) 15 #else 16 #define ___RENAME(x) ____RENAME(_/**/x) 17 #define ____RENAME(x) __asm__(___STRING(x)) 18 #endif 19 20 #ifdef __GNUC__ 21 #if __STDC__ 22 #define __indr_reference(sym,alias) \ 23 __asm__(".stabs \"_" #alias "\",11,0,0,0"); \ 24 __asm__(".stabs \"_" #sym "\",1,0,0,0"); 25 26 #define __warn_references(sym,msg) \ 27 __asm__(".stabs \"" msg "\",30,0,0,0"); \ 28 __asm__(".stabs \"_" #sym "\",1,0,0,0"); 29 #else /* __STDC__ */ 30 #define __indr_reference(sym,alias) \ 31 __asm__(".stabs \"_/**/alias\",11,0,0,0"); \ 32 __asm__(".stabs \"_/**/sym\",1,0,0,0"); 33 34 #define __warn_references(sym,msg) \ 35 __asm__(".stabs msg,30,0,0,0"); \ 36 __asm__(".stabs \"_/**/sym\",1,0,0,0"); 37 #endif /* __STDC__ */ 38 #else /* __GNUC__ */ 39 #define __warn_references(sym,msg) 40 #endif /* __GNUC__ */ 41 42 #if defined(__sh__) /* XXX SH COFF */ 43 #undef __indr_reference(sym,alias) 44 #undef __warn_references(sym,msg) 45 #define __warn_references(sym,msg) 46 #endif 47 48 #define __IDSTRING(_n,_s) \ 49 __asm__(".data ; .asciz \"" _s "\" ; .text") 50 51 #undef __KERNEL_RCSID 52 53 #define __RCSID(_s) __IDSTRING(rcsid,_s) 54 #define __SCCSID(_s) 55 #define __SCCSID2(_s) 56 #if 0 /* XXX userland __COPYRIGHTs have \ns in them */ 57 #define __COPYRIGHT(_s) __IDSTRING(copyright,_s) 58 #else 59 #define __COPYRIGHT(_s) \ 60 static const char copyright[] __attribute__((__unused__)) = _s 61 #endif 62 63 #if defined(USE_KERNEL_RCSIDS) || !defined(_KERNEL) 64 #define __KERNEL_RCSID(_n,_s) __IDSTRING(__CONCAT(rcsid,_n),_s) 65 #else 66 #define __KERNEL_RCSID(_n,_s) 67 #endif 68 #define __KERNEL_SCCSID(_n,_s) 69 #define __KERNEL_COPYRIGHT(_n, _s) __IDSTRING(__CONCAT(copyright,_n),_s) 70 71 #endif /* !_SYS_CDEFS_AOUT_H_ */ 72