WSL2-Linux-Kernel/arch/powerpc
Alexey Kardashevskiy c14d31bae3 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 d799769188
("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 d799769188, 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
2022-05-05 22:11:58 +10:00
..
boot powerpc/boot: Stop using RELACOUNT 2022-05-05 22:11:58 +10:00
configs arch: Remove references to CONFIG_NFSD_V3 in the default configs 2022-03-11 10:25:16 -05:00
crypto powerpc updates for 5.17 2022-01-14 15:17:26 +01:00
include powerpc/mm: Convert to default topdown mmap layout 2022-05-05 22:11:58 +10:00
kernel powerpc: Simplify and move arch_randomize_brk() 2022-05-05 22:11:58 +10:00
kexec powerpc: Move C prototypes out of asm-prototypes.h 2022-03-08 22:06:25 +11:00
kvm powerpc fixes for 5.18 #3 2022-04-24 12:11:20 -07:00
lib powerpc/sstep: Use bitwise instead of arithmetic operator for flags 2022-05-02 23:02:15 +10:00
math-emu
mm powerpc: Simplify and move arch_randomize_brk() 2022-05-05 22:11:58 +10:00
net powerpc updates for 5.18 2022-03-25 09:39:36 -07:00
perf Linux 5.18-rc4 2022-05-05 22:09:35 +10:00
platforms powerpc/mm: Remove CONFIG_PPC_MM_SLICES 2022-05-05 22:11:57 +10:00
purgatory
sysdev pci-v5.18-changes 2022-03-25 13:02:05 -07:00
tools powerpc/64: Add UADDR64 relocation support 2022-03-09 21:47:53 +11:00
xmon powerpc/xmon: Dump XIVE information for online-only processors. 2022-01-06 21:47:00 +11:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig powerpc/mm: Convert to default topdown mmap layout 2022-05-05 22:11:58 +10:00
Kconfig.debug powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP 2021-08-25 13:35:48 +10:00
Makefile Merge branch 'topic/func-desc-lkdtm' into next 2022-03-07 23:34:32 +11:00
Makefile.postlink