summaryrefslogtreecommitdiffstats
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2008-01-20 18:54:48 +0100
committerSam Ravnborg <sam@ravnborg.org>2008-01-28 23:21:17 +0100
commitf3fe866d59d707c7a2bba0b23add078e19edb3dc (patch)
treee255f81f9401adcaffc101af20ecf54bba033479 /include/linux/compiler.h
parent01ba2bdc6b639764745ff678caf3fb9e5bcd745a (diff)
downloadblackbird-op-linux-f3fe866d59d707c7a2bba0b23add078e19edb3dc.tar.gz
blackbird-op-linux-f3fe866d59d707c7a2bba0b23add078e19edb3dc.zip
compiler.h: introduce __section()
Add a new helper: __section() that makes a section definition much shorter and more readable. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r--include/linux/compiler.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index c68b67b86ef1..e0114a61268f 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -175,4 +175,9 @@ extern void __chk_io_ptr(const volatile void __iomem *);
#define __cold
#endif
+/* Simple shorthand for a section definition */
+#ifndef __section
+# define __section(S) __attribute__ ((__section__(#S)))
+#endif
+
#endif /* __LINUX_COMPILER_H */
OpenPOWER on IntegriCloud