Unverified Commit 926c9ab6 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!2163 Fix the two problems when using binutil 2.41.

Merge Pull Request from: @ci-robot 
 
PR sync from: Hongchen Zhang <zhanghongchen@loongson.cn>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/S6ITRU62LMPHAMR35TIKMGE7MBLOLPGO/ 
LoongArch: Fix the write_fcsr() macro
  LoongArch: Fix module relocation error with binutils 2.41


-- 
2.33.0
 
https://gitee.com/openeuler/kernel/issues/I80YEI 
 
Link:https://gitee.com/openeuler/kernel/pulls/2163

 

Reviewed-by: default avatarLi Xuefeng <lixuefeng@loongson.cn>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 0edd0f75 bc197f7d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@ LDFLAGS_vmlinux += -G0 -static -n -nostdlib
ifdef CONFIG_AS_HAS_EXPLICIT_RELOCS
cflags-y			+= -mexplicit-relocs
KBUILD_CFLAGS_KERNEL		+= -mdirect-extern-access
KBUILD_AFLAGS_MODULE		+= $(call cc-option,-mno-relax) $(call cc-option,-Wa$(comma)-mno-relax)
KBUILD_CFLAGS_MODULE		+= $(call cc-option,-mno-relax) $(call cc-option,-Wa$(comma)-mno-relax)
else
cflags-y			+= $(call cc-option,-mno-explicit-relocs)
KBUILD_AFLAGS_KERNEL		+= -Wa,-mla-global-with-pcrel
+1 −1
Original line number Diff line number Diff line
@@ -1521,7 +1521,7 @@ __BUILD_CSR_OP(tlbidx)
#define write_fcsr(dest, val) \
do {	\
	__asm__ __volatile__(	\
	"	movgr2fcsr	%0, "__stringify(dest)"	\n"	\
	"movgr2fcsr	"__stringify(dest)", %0	\n"	\
	: : "r" (val));	\
} while (0)