summaryrefslogtreecommitdiff
path: root/arch/loongarch/include/asm/asmmacro.h
diff options
context:
space:
mode:
authorWANG Rui <wangrui@loongson.cn>2023-11-21 10:03:25 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2023-11-21 10:03:25 +0300
commitaa0cbc1b506b090c3a775b547c693ada108cc0d7 (patch)
tree84034641fdf0fc52a79a75cb4fc6d0472eb7f0af /arch/loongarch/include/asm/asmmacro.h
parentcbfd44bd5c6eec0aada0c39130f0b8d7ecba0529 (diff)
downloadlinux-aa0cbc1b506b090c3a775b547c693ada108cc0d7.tar.xz
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>
Diffstat (limited to 'arch/loongarch/include/asm/asmmacro.h')
-rw-r--r--arch/loongarch/include/asm/asmmacro.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/loongarch/include/asm/asmmacro.h b/arch/loongarch/include/asm/asmmacro.h
index c9544f358c33..655db7d7a427 100644
--- a/arch/loongarch/include/asm/asmmacro.h
+++ b/arch/loongarch/include/asm/asmmacro.h
@@ -609,8 +609,7 @@
lu32i.d \reg, 0
lu52i.d \reg, \reg, 0
.pushsection ".la_abs", "aw", %progbits
- 768:
- .dword 768b-766b
+ .dword 766b
.dword \sym
.popsection
#endif