ARM: 8976/1: module: allow arch overrides for .init section names
authorVincent Whitchurch <vincent.whitchurch@axis.com>
Thu, 14 May 2020 10:36:41 +0000 (11:36 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Tue, 19 May 2020 10:42:16 +0000 (11:42 +0100)
commit2318976619daf0e868de5b8aff19c1fd8d585867
tree31bac66616cf9e2dd3c96f85acfb9a3c93f068a3
parentcdcb07e45a911a5be9d38bb1aff1f6de019503b2
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>
include/linux/moduleloader.h
kernel/module.c