aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/moduleloader.h
diff options
context:
space:
mode:
authorVincent Whitchurch <vincent.whitchurch@axis.com>2020-05-14 11:36:41 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2020-05-19 11:42:16 +0100
commit2318976619daf0e868de5b8aff19c1fd8d585867 (patch)
tree31bac66616cf9e2dd3c96f85acfb9a3c93f068a3 /include/linux/moduleloader.h
parentARM: 8975/1: module: fix handling of unwind init sections (diff)
downloadwireguard-linux-2318976619daf0e868de5b8aff19c1fd8d585867.tar.xz
wireguard-linux-2318976619daf0e868de5b8aff19c1fd8d585867.zip
ARM: 8976/1: module: allow arch overrides for .init section names
ARM stores unwind information for .init.text in sections named .ARM.extab.init.text and .ARM.exidx.init.text. Since those aren't currently recognized as init sections, they're allocated along with the core section, and relocation fails if the core and the init section are allocated from different regions and can't reach other. final section addresses: ... 0x7f800000 .init.text .. 0xcbb54078 .ARM.exidx.init.text .. section 16 reloc 0 sym '': relocation 42 out of range (0xcbb54078 -> 0x7f800000) Allow architectures to override the section name so that ARM can fix this. Acked-by: Jessica Yu <jeyu@kernel.org> Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
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 ca92aea8a6bd..4fa67a8b2265 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 init section (that is only used during
+ * module loading).
+ */
+bool module_init_section(const char *name);
+
/* Determines if the section name is an exit section (that is only used during
* module unloading)
*/