Commit 912bcfaf authored by Youling Tang's avatar Youling Tang Committed by Huacai Chen

LoongArch: Remove the .fixup section usage

Use the `.L_xxx` label to improve fixup code and then remove the .fixup
section usage.
Signed-off-by: default avatarYouling Tang <tangyouling@loongson.cn>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 672999cf
...@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment