提交 d048dade 编写于 作者: Y Youling Tang 提交者: openeuler-sync-bot

LoongArch: Remove the .fixup section usage

mainline inclusion
from mainline-v6.2-rc1
commit 912bcfaf
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I6BWFP
CVE: NA

--------------------------------

Use the `.L_xxx` label to improve fixup code and then remove the .fixup
section usage.
Signed-off-by: NYouling Tang <tangyouling@loongson.cn>
Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
Change-Id: I01c14c9bbc99baffe611d7e27f4c87d494b73026
(cherry picked from commit 070fb8af)
上级 5aec39d2
...@@ -9,15 +9,11 @@ ...@@ -9,15 +9,11 @@
#include <asm/export.h> #include <asm/export.h>
#include <asm/regdef.h> #include <asm/regdef.h>
.macro fixup_ex from, to, offset, fix .irp to, 0
.if \fix .L_fixup_handle_\to\():
.section .fixup, "ax" addi.d a0, a1, (\to) * (-8)
\to: addi.d a0, a1, \offset
jr ra jr ra
.previous .endr
.endif
_asm_extable \from\()b, \to\()b
.endm
/* /*
* unsigned long __clear_user(void *addr, size_t size) * unsigned long __clear_user(void *addr, size_t size)
...@@ -36,7 +32,7 @@ SYM_FUNC_START(__clear_user) ...@@ -36,7 +32,7 @@ SYM_FUNC_START(__clear_user)
2: move a0, a1 2: move a0, a1
jr ra jr ra
fixup_ex 1, 3, 0, 1 _asm_extable 1b, .L_fixup_handle_0
SYM_FUNC_END(__clear_user) SYM_FUNC_END(__clear_user)
EXPORT_SYMBOL(__clear_user) EXPORT_SYMBOL(__clear_user)
...@@ -9,15 +9,11 @@ ...@@ -9,15 +9,11 @@
#include <asm/export.h> #include <asm/export.h>
#include <asm/regdef.h> #include <asm/regdef.h>
.macro fixup_ex from, to, offset, fix .irp to, 0
.if \fix .L_fixup_handle_\to\():
.section .fixup, "ax" addi.d a0, a2, (\to) * (-8)
\to: addi.d a0, a2, \offset
jr ra jr ra
.previous .endr
.endif
_asm_extable \from\()b, \to\()b
.endm
/* /*
* unsigned long __copy_user(void *to, const void *from, size_t n) * unsigned long __copy_user(void *to, const void *from, size_t n)
...@@ -39,8 +35,8 @@ SYM_FUNC_START(__copy_user) ...@@ -39,8 +35,8 @@ SYM_FUNC_START(__copy_user)
3: move a0, a2 3: move a0, a2
jr ra jr ra
fixup_ex 1, 4, 0, 1 _asm_extable 1b, .L_fixup_handle_0
fixup_ex 2, 4, 0, 0 _asm_extable 2b, .L_fixup_handle_0
SYM_FUNC_END(__copy_user) SYM_FUNC_END(__copy_user)
EXPORT_SYMBOL(__copy_user) EXPORT_SYMBOL(__copy_user)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册