summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2002-02-19 03:17:46 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2002-02-19 03:17:46 +0000
commit7986b8f3588094da44856af2c95369f9b8427548 (patch)
tree5ca49cabb41acaf795857dea759fd923ebfd3c34 /sys/arch/powerpc
parent77a76d7ed80c692a93ad13636fc6cd65a434f4c5 (diff)
get rid of old if 0'ed code. add support for __weak_alias and fix
support for __warn_references (both from alpha/sparc4).
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r--sys/arch/powerpc/include/cdefs.h30
1 files changed, 5 insertions, 25 deletions
diff --git a/sys/arch/powerpc/include/cdefs.h b/sys/arch/powerpc/include/cdefs.h
index 8238ad9bca9..8e2efdb3eaf 100644
--- a/sys/arch/powerpc/include/cdefs.h
+++ b/sys/arch/powerpc/include/cdefs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.3 2001/09/01 15:49:05 drahn Exp $ */
+/* $OpenBSD: cdefs.h,v 1.4 2002/02/19 03:17:45 drahn Exp $ */
/* $NetBSD: cdefs.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */
/*
@@ -15,29 +15,9 @@
#define _C_LABEL(x) _STRING(_/**/x)
#endif
-#if 0
-#ifdef __GNUC__
-#ifdef __STDC__
-#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")
-#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")
-#endif
-#endif
-#else
-#define __warn_references(sym,msg)
-/*
-#define __indr_reference(sym,alias)
-*/
-#endif
+#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")
#endif /* !_POWERPC_CDEFS_H_ */