Re: [rust:rust-next 2/24] ld.lld: error: kernel/built-in.a(kallsyms.o):(function get_symbol_offset: .text+0x5f0): relocation R_RISCV_PCREL_HI20 out of range: -524435 is not in [-524288, 524287]; references kallsyms_names

From: Miguel Ojeda
Date: Fri Jun 03 2022 - 07:03:34 EST


On Fri, Jun 3, 2022 at 12:32 PM kernel test robot <yujie.liu@xxxxxxxxx> wrote:
>
> >> ld.lld: error: kernel/built-in.a(kallsyms.o):(function get_symbol_offset: .text+0x5f0): relocation R_RISCV_PCREL_HI20 out of range: -524435 is not in [-524288, 524287]; references kallsyms_names
> >>> referenced by kallsyms.c
> >>> defined in kernel/built-in.a(kallsyms.o)

There are similar reports for the same relocation type in trees
without Rust support merged, so this might not be being triggered by
Rust itself, e.g.:

https://lore.kernel.org/llvm/202206010956.rOpdU4dr-lkp@xxxxxxxxx/
https://lore.kernel.org/llvm/202205280837.PPVZBhXr-lkp@xxxxxxxxx/

Cheers,
Miguel