[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [PATCH v3 4/6] tools: expand export.h with VMLINUX_SYMBOL()
- To: hpa@xxxxxxxxx, acme@xxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, jpoimboe@xxxxxxxxxx, bp@xxxxxxxxx, npiggin@xxxxxxxxx, mhiramat@xxxxxxxxxx, masami.hiramatsu.pt@xxxxxxxxxxx, jbaron@xxxxxxxxxx, heiko.carstens@xxxxxxxxxx, ananth@xxxxxxxxxxxxxxxxxx, anil.s.keshavamurthy@xxxxxxxxx, davem@xxxxxxxxxxxxx, realmz6@xxxxxxxxx, dalias@xxxxxxxx, linux@xxxxxxxxxxxxxxxx
- From: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>
- Date: Mon, 9 Jan 2017 07:02:47 -0800
- Cc: gnomes@xxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, jkosina@xxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, ming.lei@xxxxxxxxxxxxx, linux@xxxxxxxxxxxxxxxxxx, platform-driver-x86@xxxxxxxxxxxxxxx, James.Bottomley@xxxxxxxxxxxxxxxxxxxxx, paul.gortmaker@xxxxxxxxxxxxx, paulus@xxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, wangnan0@xxxxxxxxxx, mchehab@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, markus.heiser@xxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, msalter@xxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, mpe@xxxxxxxxxxxxxx, joro@xxxxxxxxxx, x86@xxxxxxxxxx, fontana@xxxxxxxxxxxxxxx, dsahern@xxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, catalin.marinas@xxxxxxx, dvhart@xxxxxxxxxxxxx, dwmw2@xxxxxxxxxxxxx, linux@xxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, pali.rohar@xxxxxxxxx, keescook@xxxxxxxxxxxx, arnd@xxxxxxxx, jani.nikula@xxxxxxxxx, will.deacon@xxxxxxx, rusty@xxxxxxxxxxxxxxx, rostedt@xxxxxxxxxxx, ak@xxxxxxxxxxxxxxx, namhyung@xxxxxxxxxx, andriy.shevchenko@xxxxxxxxxxxxxxx, mcb30@xxxxxxxx, linux-kbuild@xxxxxxxxxxxxxxx, alan@xxxxxxxxxxxxxxx, jgross@xxxxxxxx, chris@xxxxxxxxxx, pebolle@xxxxxxxxxx, tony.luck@xxxxxxxxx, jcmvbkbc@xxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, dmitry.torokhov@xxxxxxxxx, adrian.hunter@xxxxxxxxx, luto@xxxxxxxxxxxxxx, "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>, mmarek@xxxxxxxx, david.vrabel@xxxxxxxxxx, jolsa@xxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, torvalds@xxxxxxxxxxxxxxxxxxxx, korea.drzix@xxxxxxxxx
- Delivery-date: Mon, 09 Jan 2017 15:03:20 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
This will be used later by the linker-table userspace sandbox.
Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxx>
---
tools/include/linux/export.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/tools/include/linux/export.h b/tools/include/linux/export.h
index d07e586b9ba0..cb7d6b490e08 100644
--- a/tools/include/linux/export.h
+++ b/tools/include/linux/export.h
@@ -1,6 +1,28 @@
#ifndef _TOOLS_LINUX_EXPORT_H_
#define _TOOLS_LINUX_EXPORT_H_
+/*
+ * Export symbols from the kernel to modules. Forked from module.h
+ * to reduce the amount of pointless cruft we feed to gcc when only
+ * exporting a simple symbol or two.
+ *
+ * Try not to add #includes here. It slows compilation and makes kernel
+ * hackers place grumpy comments in header files.
+ */
+
+/* Some toolchains use a `_' prefix for all user symbols. */
+#ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX
+#define __VMLINUX_SYMBOL(x) _##x
+#define __VMLINUX_SYMBOL_STR(x) "_" #x
+#else
+#define __VMLINUX_SYMBOL(x) x
+#define __VMLINUX_SYMBOL_STR(x) #x
+#endif
+
+/* Indirect, so macros are expanded before pasting. */
+#define VMLINUX_SYMBOL(x) __VMLINUX_SYMBOL(x)
+#define VMLINUX_SYMBOL_STR(x) __VMLINUX_SYMBOL_STR(x)
+
#define EXPORT_SYMBOL(sym)
#define EXPORT_SYMBOL_GPL(sym)
#define EXPORT_SYMBOL_GPL_FUTURE(sym)
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|