summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2013-03-28 17:30:46 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2013-03-28 17:30:46 +0000
commitdd27625163090c5e5b351e017cd1ffd03a373b5f (patch)
treef866b9f603ad996d274d4f4ab20ca3a2f0f97b0c /sys/arch/mips64
parentfcc4d6add65a985a9353ecdcfdc4f44880982afb (diff)
Add __strong_alias macros for all architectures to be able to alias
another symbol without weak attribute. To be used in libc and libm soon. Agreed by kettenis@, guenther@, matthew@.
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r--sys/arch/mips64/include/cdefs.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/arch/mips64/include/cdefs.h b/sys/arch/mips64/include/cdefs.h
index d2db0bc7aee..b16a3e72abd 100644
--- a/sys/arch/mips64/include/cdefs.h
+++ b/sys/arch/mips64/include/cdefs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.5 2011/03/23 16:54:36 pirofti Exp $ */
+/* $OpenBSD: cdefs.h,v 1.6 2013/03/28 17:30:45 martynas Exp $ */
/*
* Copyright (c) 2002-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -26,15 +26,12 @@
*
*/
-
#ifndef _MIPS64_CDEFS_H_
#define _MIPS64_CDEFS_H_
-#if defined(lint)
-#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
-#define __warn_references(sym,msg)
-#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
-#elif defined(__GNUC__) && defined(__STDC__)
+#define __strong_alias(alias,sym) \
+ __asm__(".global " __STRING(alias) " ; " \
+ __STRING(alias) " = " __STRING(sym))
#define __weak_alias(alias,sym) \
__asm__(".weak " __STRING(alias) " ; " \
__STRING(alias) " = " __STRING(sym))
@@ -42,6 +39,5 @@
__asm__(".section .gnu.warning." __STRING(sym) \
" ; .ascii \"" msg "\" ; .text")
#define __indr_references(sym,msg) /* nothing */
-#endif
#endif /* !_MIPS64_CDEFS_H_ */