summaryrefslogtreecommitdiff
path: root/include/linux/moduleloader.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias.schiffer@ew.tq-group.com>2019-06-07 13:49:11 +0300
committerJessica Yu <jeyu@kernel.org>2019-06-24 15:00:32 +0300
commit38b37d631aec80da0c65ac03a7ef680b468c7857 (patch)
tree3cfcaba903c0c0f2ff933cc6859f6fac16ebb110 /include/linux/moduleloader.h
parent2eef1399a866c57687962e15142b141a4f8e7862 (diff)
downloadlinux-38b37d631aec80da0c65ac03a7ef680b468c7857.tar.xz
module: allow arch overrides for .exit section names
Some archs like ARM store unwind information for .exit.text in sections with unusual names. As this unwind information refers to .exit.text, it must not be loaded when .exit.text is not loaded (when CONFIG_MODULE_UNLOAD is unset); otherwise, loading a module can fail due to relocation failures. Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Signed-off-by: Jessica Yu <jeyu@kernel.org>
Diffstat (limited to 'include/linux/moduleloader.h')
-rw-r--r--include/linux/moduleloader.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h
index 31013c2effd3..5229c18025e9 100644
--- a/include/linux/moduleloader.h
+++ b/include/linux/moduleloader.h
@@ -29,6 +29,11 @@ void *module_alloc(unsigned long size);
/* Free memory returned from module_alloc. */
void module_memfree(void *module_region);
+/* Determines if the section name is an exit section (that is only used during
+ * module unloading)
+ */
+bool module_exit_section(const char *name);
+
/*
* Apply the given relocation to the (simplified) ELF. Return -error
* or 0.