summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/asm.h
diff options
context:
space:
mode:
authorandreast <andreast@FreeBSD.org>2013-11-21 22:31:18 +0000
committerandreast <andreast@FreeBSD.org>2013-11-21 22:31:18 +0000
commit305492af4723b9c7a9118c02471b58651d2ec999 (patch)
treef17b7ebad3190908338acdaaee5562f547b46c87 /sys/i386/include/asm.h
parent3ce6c522309d1339bd7d2c960630b23199ff13e3 (diff)
downloadFreeBSD-src-305492af4723b9c7a9118c02471b58651d2ec999.zip
FreeBSD-src-305492af4723b9c7a9118c02471b58651d2ec999.tar.gz
Replace the WEAK_ALIAS() alias with the WEAK_REFERENCE() alias. Use it and
get rid of the __CONCAT and CNAME macros. Reviewed by: bde, kib
Diffstat (limited to 'sys/i386/include/asm.h')
-rw-r--r--sys/i386/include/asm.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/i386/include/asm.h b/sys/i386/include/asm.h
index cc8bfe0..b2d4a6b 100644
--- a/sys/i386/include/asm.h
+++ b/sys/i386/include/asm.h
@@ -91,11 +91,15 @@
#endif
/*
- * WEAK_ALIAS: create a weak alias.
+ * WEAK_REFERENCE(): create a weak reference alias from sym.
+ * The macro is not a general asm macro that takes arbitrary names,
+ * but one that takes only C names. It does the non-null name
+ * translation inside the macro.
*/
-#define WEAK_ALIAS(alias,sym) \
- .weak alias; \
- alias = sym
+
+#define WEAK_REFERENCE(sym, alias) \
+ .weak CNAME(alias); \
+ .equ CNAME(alias),CNAME(sym)
/*
* STRONG_ALIAS: create a strong alias.
OpenPOWER on IntegriCloud