summaryrefslogtreecommitdiff
path: root/kernel/module/internal.h
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2022-02-23 13:02:13 +0100
committerLuis Chamberlain <mcgrof@kernel.org>2022-04-05 08:43:05 -0700
commit6ab9942c44b2d213a16b2620e4baf0223122222f (patch)
tree0ca6816cea5a0928994fa94ae4868df9b4f48b56 /kernel/module/internal.h
parent446d55666d5599ca58c1ceac25ce4b5191e70835 (diff)
module: Introduce data_layout
In order to allow separation of data from text, add another layout, called data_layout. For architectures requesting separation of text and data, only text will go in core_layout and data will go in data_layout. For architectures which keep text and data together, make data_layout an alias of core_layout, that way data_layout can be used for all data manipulations, regardless of whether data is in core_layout or data_layout. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/module/internal.h')
-rw-r--r--kernel/module/internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/module/internal.h b/kernel/module/internal.h
index 0f3146347256..0aabbf5cbcd1 100644
--- a/kernel/module/internal.h
+++ b/kernel/module/internal.h
@@ -20,6 +20,8 @@
/* Maximum number of characters written by module_flags() */
#define MODULE_FLAGS_BUF_SIZE (TAINT_FLAGS_COUNT + 4)
+#define data_layout core_layout
+
/*
* Modules' sections will be aligned on page boundaries
* to ensure complete separation of code and data, but