From 8631580fbbb96c2361791a4f2c7a57e79dc058cc Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sun, 29 Mar 2020 14:37:13 +0000 Subject: [PATCH] mips64: use ALIAS() macro for aliases --- arch/mips64/getcontext.S | 5 ++--- arch/mips64/makecontext.S | 6 ++---- arch/mips64/setcontext.S | 5 ++--- arch/mips64/swapcontext.S | 5 ++--- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/arch/mips64/getcontext.S b/arch/mips64/getcontext.S index 3e7b734..0dc24a3 100644 --- a/arch/mips64/getcontext.S +++ b/arch/mips64/getcontext.S @@ -14,6 +14,8 @@ LOCALSZ = 1 #include "defs.h" +ALIAS(getcontext, __getcontext) + FUNC(__getcontext) /* copy $gp, $sp, $fp to temporary registers so we don't clobber them */ move $a2, $gp @@ -42,6 +44,3 @@ FUNC(__getcontext) jr $ra END(__getcontext) - -.weak getcontext; -getcontext = __getcontext; diff --git a/arch/mips64/makecontext.S b/arch/mips64/makecontext.S index 63050bf..e528f83 100644 --- a/arch/mips64/makecontext.S +++ b/arch/mips64/makecontext.S @@ -26,6 +26,8 @@ A7_OFF = FRAMESZ - (1 * REG_SZ) * assembly rather than C. Annoying, that... */ +ALIAS(makecontext, __makecontext) + FUNC(__makecontext) PUSH_FRAME(__makecontext) @@ -102,7 +104,3 @@ no_more_arguments: jr $ra END(__makecontext) - - -.weak makecontext -makecontext = __makecontext; diff --git a/arch/mips64/setcontext.S b/arch/mips64/setcontext.S index f58d934..c300f20 100644 --- a/arch/mips64/setcontext.S +++ b/arch/mips64/setcontext.S @@ -14,6 +14,8 @@ LOCALSZ = 1 #include "defs.h" +ALIAS(setcontext, __setcontext) + FUNC(__setcontext) PUSH_FRAME(__setcontext) @@ -50,6 +52,3 @@ FUNC(__setcontext) POP_FRAME(__setcontext) END(__setcontext) - -.weak setcontext; -setcontext = __setcontext; diff --git a/arch/mips64/swapcontext.S b/arch/mips64/swapcontext.S index d5f1996..2968c61 100644 --- a/arch/mips64/swapcontext.S +++ b/arch/mips64/swapcontext.S @@ -16,6 +16,8 @@ LOCALSZ = 2 A1_OFFSET = FRAMESZ - (1 * REG_SZ) +ALIAS(swapcontext, __swapcontext) + FUNC(__swapcontext) /* copy $gp, $sp, $fp to temporary registers so we don't clobber them */ move $a2, $gp @@ -82,6 +84,3 @@ fail: move $v0, $zero jalr $t9 END(__swapcontext) - -.weak swapcontext; -swapcontext = __swapcontext;