aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@kernel.org>2016-06-23 17:37:34 -0700
committerLuis R. Rodriguez <mcgrof@kernel.org>2016-06-27 17:52:55 -0700
commite63ca7ecdd50f6aeb9ec9f6bb0026b260327c605 (patch)
tree1152281cd1ada2e8392e3593553f1c41a2bd5d0c
parent1e052b4d366436af18e9ec4a27dd309d2dd8cb36 (diff)
downloadlinker-tables-e63ca7ecdd50f6aeb9ec9f6bb0026b260327c605.tar.gz
sections.h, ranges.h. add support for asm version of SECTION_RANGE()
To support an asm version of SECTION_RANGE(), add a respective asm version of SECTION_TYPE(). Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
-rw-r--r--include/linux/ranges.h4
-rw-r--r--include/linux/sections.h7
2 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/ranges.h b/include/linux/ranges.h
index 9e1f766..8b07d1a 100644
--- a/include/linux/ranges.h
+++ b/include/linux/ranges.h
@@ -5,11 +5,11 @@
#define SECTION_TYPE_RANGES ranges
-#ifndef __ASSEMBLY__
-
#define SECTION_RANGE(section, name, level) \
SECTION_TYPE(section, SECTION_TYPE_RANGES, name, level)
+#ifndef __ASSEMBLY__
+
/* Linker tables shalt not use this */
#define SECTION_ADDR_IN_RANGE(name, addr) \
(addr >= (unsigned long) LINUX_SECTION_START(name) && \
diff --git a/include/linux/sections.h b/include/linux/sections.h
index 2806bc7..f679399 100644
--- a/include/linux/sections.h
+++ b/include/linux/sections.h
@@ -16,7 +16,12 @@
#define SECTION_REF_RODATA .ref.rodata
#define SECTION_SCHED .sched.text
-#ifndef __ASSEMBLY__
+#ifdef __ASSEMBLY__
+
+#define SECTION_TYPE(section, type, name, level) \
+ .pushsection section ## . ## type ## . ## name ## . ## level
+
+#else
#define LINUX_SECTION_ALIGNMENT(name) __alignof__(__typeof__(name[0]))