linux/arch/riscv/errata
Alexandre Ghiti 8dc2a7e802
riscv: Fix relocatable kernels with early alternatives using -fno-pie
Early alternatives are called with the mmu disabled, and then should not
access any global symbols through the GOT since it requires relocations,
relocations that we do before but *virtually*. So only use medany code
model for this early code.

Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Tested-by: Conor Dooley <conor.dooley@microchip.com> # booted on nezha & unmatched
Fixes: 39b3307294 ("riscv: Introduce CONFIG_RELOCATABLE")
Link: https://lore.kernel.org/r/20230526154630.289374-1-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2023-05-31 07:07:07 -07:00
..
sifive RISC-V: fix sifive and thead section mismatches in errata 2023-04-29 13:18:19 -07:00
thead RISC-V: fix sifive and thead section mismatches in errata 2023-04-29 13:18:19 -07:00
Makefile riscv: Fix relocatable kernels with early alternatives using -fno-pie 2023-05-31 07:07:07 -07:00