WSL2-Linux-Kernel/arch
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
..
alpha
arc ARC: remove redundant READ_ONCE() in cmpxchg loop 2022-04-18 14:47:05 -07:00
arm xen: branch for v5.18-rc4 2022-04-23 13:53:21 -07:00
arm64 mm: Add len and flags parameters to arch_get_mmap_end() 2022-05-05 22:11:57 +10:00
csky
h8300
hexagon
ia64
m68k
microblaze
mips
nios2
openrisc
parisc
powerpc powerpc/boot: Stop using RELACOUNT 2022-05-05 22:11:58 +10:00
riscv RISC-V: 2022-04-22 17:58:36 -07:00
s390 RISC-V: 2022-04-22 17:58:36 -07:00
sh
sparc sparc: cacheflush_32.h needs struct page 2022-04-23 09:27:17 -07:00
um
x86 - Add Sapphire Rapids CPU support 2022-04-24 12:01:16 -07:00
xtensa
.gitignore
Kconfig vmalloc: replace VM_NO_HUGE_VMAP with VM_ALLOW_HUGE_VMAP 2022-04-19 12:08:57 -07:00