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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2023 16:01:57 +0000 (17:01 +0100)
commitab3f300524697919f64ae920e904d0836b4057b0
tree8cd447f4d7a0a9581c55936d0104fe71863c02e9
parent03372601f5f1f143e759b611d93c0f2c2cb0b0b3
LoongArch: Record pc instead of offset in la_abs relocation

[ Upstream commit aa0cbc1b506b090c3a775b547c693ada108cc0d7 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/loongarch/include/asm/asmmacro.h
arch/loongarch/include/asm/setup.h
arch/loongarch/kernel/relocate.c