]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sparc32: Fix truncated relocation errors when linking large kernels
authorAndreas Larsson <andreas@gaisler.com>
Wed, 10 Jul 2024 09:23:41 +0000 (11:23 +0200)
committerAndreas Larsson <andreas@gaisler.com>
Thu, 11 Jul 2024 13:58:18 +0000 (15:58 +0200)
commita7ec177ebc447d541cf25171ba3f5c36e4acc206
treee0ac0bc26eab6a5750d837792301324229f0ff3e
parente51f125b10332914ea4440252abcb3688ca1af59
sparc32: Fix truncated relocation errors when linking large kernels

Use jumps instead of branches when jumping from one section to another
to avoid branches to addresses further away than 22 bit offsets can
handle that results in errors such as

arch/sparc/kernel/signal_32.o:(.fixup+0x0): relocation truncated to fit: R_SPARC_WDISP22 against `.text'

This is the same approach that was taken for sparc64 in commit
52eb053b7191 ("[SPARC64]: Fix linkage of enormous kernels.")

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202405080936.tWaJdO3P-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202406240441.5zaoshVX-lkp@intel.com/
Link: https://lore.kernel.org/r/20240710092341.457591-1-andreas@gaisler.com
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
arch/sparc/include/asm/uaccess_32.h
arch/sparc/kernel/head_32.S