Added __weak_reference() macro.
This commit is contained in:
parent
badcc17a6d
commit
50387b6e37
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cdefs.h,v 1.12 1994/07/22 01:44:47 cgd Exp $ */
|
||||
/* $NetBSD: cdefs.h,v 1.13 1994/10/05 17:26:54 jtc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -121,21 +121,22 @@
|
|||
#define __pure
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* The __warn_references macro is used to instruct the linker to print
|
||||
* warning message "msg" if symbol "sym" is referenced.
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
#ifdef __STDC__
|
||||
#define __weak_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\n.stabs \"_" #sym "\",1,0,0,0")
|
||||
__asm__(".stabs \"" msg "\",30,0,0,0"); \
|
||||
__asm__(".stabs \"_" #sym "\",1,0,0,0")
|
||||
#else
|
||||
#define __weak_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\n.stabs \"_/**/sym\",1,0,0,0")
|
||||
__asm__(".stabs msg,30,0,0,0"); \
|
||||
__asm__(".stabs \"_/**/sym\",1,0,0,0")
|
||||
#endif
|
||||
#else
|
||||
#define __warn_references(sym,msg)
|
||||
#endif
|
||||
|
||||
#endif /* !_CDEFS_H_ */
|
||||
|
|
Loading…
Reference in New Issue