]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ARM: 9471/1: module: fix unwind section relocation out of range error
authorWilliam Zhang <william.zhang@broadcom.com>
Thu, 2 Apr 2026 01:43:25 +0000 (02:43 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 9 Apr 2026 10:51:52 +0000 (11:51 +0100)
commit5a21253b3073df578ee074da2f9427cbb4c3146a
tree50d3e87695872dcb5f272276689702d237f7d096
parent6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
ARM: 9471/1: module: fix unwind section relocation out of range error

In an armv7 system that uses non-3G/1G split and with more than 512MB physical memory, driver load may fail with following error:
   section 29 reloc 0 sym '': relocation 42 out of range (0xc2ab9be8 ->
0x7fad5998)

This happens when relocation R_ARM_PREL31 from the unwind section
.ARM.extab and .ARM.exidx are allocated from the VMALLOC space while
.text section is from MODULES_VADDR space. It exceeds the +/-1GB
relocation requirement of R_ARM_PREL31 hence triggers the error.

The fix is to mark .ARM.extab and .ARM.exidx sections as executable so
they can be allocated along with .text section and always meet range
requirement.

Co-developed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/kernel/module-plts.c