summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup-common.c
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2022-04-06 09:00:38 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2022-05-05 14:11:58 +0200
commitc14d31bae372e050b053f2511fb3f0f90c27e4f9 (patch)
tree1bf9764c251e090aee5b678aa76f05847d0c9c4b /arch/powerpc/kernel/setup-common.c
parentpowerpc: Simplify and move arch_randomize_brk() (diff)
downloadlinux-c14d31bae372e050b053f2511fb3f0f90c27e4f9.tar.xz
linux-c14d31bae372e050b053f2511fb3f0f90c27e4f9.zip
powerpc/boot: Stop using RELACOUNT
So far the RELACOUNT tag from the ELF header was containing the exact number of R_PPC_RELATIVE/R_PPC64_RELATIVE relocations. However the LLVM's recent change [1] make it equal-or-less than the actual number which makes it useless. This replaces RELACOUNT in zImage loader with a pair of RELASZ and RELAENT. The vmlinux relocation code is fixed in commit d79976918852 ("powerpc/64: Add UADDR64 relocation support"). To make it more future proof, this walks through the entire .rela.dyn section instead of assuming that the section is sorter by a relocation type. Unlike d79976918852, this does not add unaligned UADDR/UADDR64 relocations as we are likely not to see those in practice - the zImage is small and very arch specific so there is a smaller chance that some generic feature (such as PRINK_INDEX) triggers unaligned relocations. [1] https://github.com/llvm/llvm-project/commit/da0e5b885b25cf4 Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220406070038.3704604-1-aik@ozlabs.ru
Diffstat (limited to 'arch/powerpc/kernel/setup-common.c')
0 files changed, 0 insertions, 0 deletions