LoongArch: Record pc instead of offset in la_abs relocation
authorWANG Rui <wangrui@loongson.cn>
Tue, 21 Nov 2023 07:03:25 +0000 (15:03 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Tue, 21 Nov 2023 07:03:25 +0000 (15:03 +0800)
commitaa0cbc1b506b090c3a775b547c693ada108cc0d7
tree84034641fdf0fc52a79a75cb4fc6d0472eb7f0af
parentcbfd44bd5c6eec0aada0c39130f0b8d7ecba0529
LoongArch: Record pc instead of offset in la_abs relocation

To clarify, the previous version functioned flawlessly. However, it's
worth noting that the LLVM's LoongArch backend currently lacks support
for cross-section label calculations. With this patch, we enable the use
of clang to compile relocatable kernels.

Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: WANG Rui <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/include/asm/asmmacro.h
arch/loongarch/include/asm/setup.h
arch/loongarch/kernel/relocate.c