From e65e485630a700c6aa4976650d059513bf049a78 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sun, 6 Dec 2020 03:04:22 -0600 Subject: [PATCH] everywhere: rename __swapcontext to libucontext_swapcontext --- arch/aarch64/swapcontext.S | 6 +++--- arch/arm/swapcontext.S | 6 +++--- arch/m68k/swapcontext.S | 6 +++--- arch/mips/swapcontext.S | 10 +++++----- arch/mips64/swapcontext.S | 10 +++++----- arch/ppc/getcontext.S | 4 ++-- arch/ppc/setcontext.S | 4 ++-- arch/ppc/swapcontext.S | 6 +++--- arch/ppc64/getcontext.S | 4 ++-- arch/ppc64/setcontext.S | 4 ++-- arch/ppc64/swapcontext.S | 12 ++++++------ arch/riscv64/swapcontext.S | 6 +++--- arch/s390x/swapcontext.S | 6 +++--- arch/x86/swapcontext.S | 6 +++--- arch/x86_64/swapcontext.S | 6 +++--- 15 files changed, 48 insertions(+), 48 deletions(-) diff --git a/arch/aarch64/swapcontext.S b/arch/aarch64/swapcontext.S index ffc3d4c..17a0b99 100644 --- a/arch/aarch64/swapcontext.S +++ b/arch/aarch64/swapcontext.S @@ -12,9 +12,9 @@ #include "defs.h" -ALIAS(swapcontext, __swapcontext) +ALIAS(swapcontext, libucontext_swapcontext) -FUNC(__swapcontext) +FUNC(libucontext_swapcontext) str xzr, [x0, #REG_OFFSET(0)] /* save GPRs */ @@ -55,4 +55,4 @@ FUNC(__swapcontext) /* hmm, we came back here try to return */ mov x30, x28 ret -END(__swapcontext) +END(libucontext_swapcontext) diff --git a/arch/arm/swapcontext.S b/arch/arm/swapcontext.S index cd28445..7950370 100644 --- a/arch/arm/swapcontext.S +++ b/arch/arm/swapcontext.S @@ -12,9 +12,9 @@ #include "defs.h" -ALIAS(swapcontext, __swapcontext) +ALIAS(swapcontext, libucontext_swapcontext) -FUNC(__swapcontext) +FUNC(libucontext_swapcontext) /* copy all of the current registers into the ucontext structure */ add r2, r0, #REG_OFFSET(0) stmia r2, {r0-r12} @@ -27,4 +27,4 @@ FUNC(__swapcontext) ldr r13, [r14, #52] add r14, r14, #56 ldmia r14, {r14, pc} -END(__swapcontext) +END(libucontext_swapcontext) diff --git a/arch/m68k/swapcontext.S b/arch/m68k/swapcontext.S index d1bb8af..f3abf01 100644 --- a/arch/m68k/swapcontext.S +++ b/arch/m68k/swapcontext.S @@ -12,9 +12,9 @@ #include "defs.h" -ALIAS(swapcontext, __swapcontext) +ALIAS(swapcontext, libucontext_swapcontext) -FUNC(__swapcontext) +FUNC(libucontext_swapcontext) move.l 4(%sp), %a0 /* load save ucontext_t pointer from stack */ movem.l %d2-%d7, REG_OFFSET(REG_D2)(%a0) /* preserve $d2 through $d7 */ @@ -36,4 +36,4 @@ FUNC(__swapcontext) move.l REG_OFFSET(REG_PC)(%a0), %a1 /* load jump target */ jmp (%a1) /* jump to *$a1 */ -END(__swapcontext) +END(libucontext_swapcontext) diff --git a/arch/mips/swapcontext.S b/arch/mips/swapcontext.S index e372551..82d0398 100644 --- a/arch/mips/swapcontext.S +++ b/arch/mips/swapcontext.S @@ -16,14 +16,14 @@ LOCALSZ = 2 A1_OFFSET = FRAMESZ - (1 * REG_SZ) -ALIAS(swapcontext, __swapcontext) +ALIAS(swapcontext, libucontext_swapcontext) -FUNC(__swapcontext) +FUNC(libucontext_swapcontext) /* copy $gp, $sp, $fp to temporary registers so we don't clobber them */ move $a2, $gp move $a3, $sp - PUSH_FRAME(__swapcontext) + PUSH_FRAME(libucontext_swapcontext) /* set registers */ sd $s0, REG_OFFSET(16)($a0) @@ -74,8 +74,8 @@ FUNC(__swapcontext) fail: la $t9, exit - POP_FRAME(__swapcontext) + POP_FRAME(libucontext_swapcontext) move $v0, $zero jalr $t9 -END(__swapcontext) +END(libucontext_swapcontext) diff --git a/arch/mips64/swapcontext.S b/arch/mips64/swapcontext.S index 9d04635..b5cb41e 100644 --- a/arch/mips64/swapcontext.S +++ b/arch/mips64/swapcontext.S @@ -16,15 +16,15 @@ LOCALSZ = 2 A1_OFFSET = FRAMESZ - (1 * REG_SZ) -ALIAS(swapcontext, __swapcontext) +ALIAS(swapcontext, libucontext_swapcontext) -FUNC(__swapcontext) +FUNC(libucontext_swapcontext) /* copy $gp, $sp, $fp to temporary registers so we don't clobber them */ move $a2, $gp move $a3, $sp move $a4, $fp - PUSH_FRAME(__swapcontext) + PUSH_FRAME(libucontext_swapcontext) /* set registers */ sd $s0, REG_OFFSET(16)($a0) @@ -79,8 +79,8 @@ FUNC(__swapcontext) fail: dla $t9, exit - POP_FRAME(__swapcontext) + POP_FRAME(libucontext_swapcontext) move $v0, $zero jalr $t9 -END(__swapcontext) +END(libucontext_swapcontext) diff --git a/arch/ppc/getcontext.S b/arch/ppc/getcontext.S index b1c4aea..532e810 100644 --- a/arch/ppc/getcontext.S +++ b/arch/ppc/getcontext.S @@ -11,10 +11,10 @@ */ .global libucontext_getcontext -.hidden __swapcontext +.hidden libucontext_swapcontext libucontext_getcontext: li 4, 0 - b __swapcontext@local + b libucontext_swapcontext@local .weak getcontext getcontext = libucontext_getcontext diff --git a/arch/ppc/setcontext.S b/arch/ppc/setcontext.S index 592b1bd..4c2f09a 100644 --- a/arch/ppc/setcontext.S +++ b/arch/ppc/setcontext.S @@ -11,11 +11,11 @@ */ .global libucontext_setcontext -.hidden __swapcontext +.hidden libucontext_swapcontext libucontext_setcontext: mr 4, 3 li 3, 0 - b __swapcontext@local + b libucontext_swapcontext@local .weak setcontext setcontext = libucontext_setcontext diff --git a/arch/ppc/swapcontext.S b/arch/ppc/swapcontext.S index 24b6655..aad32a9 100644 --- a/arch/ppc/swapcontext.S +++ b/arch/ppc/swapcontext.S @@ -10,8 +10,8 @@ * from the use of this software. */ -.global __swapcontext -__swapcontext: +.global libucontext_swapcontext +libucontext_swapcontext: li 0, 249 # SYS_swapcontext li 5, 1184 # sizeof(ucontext_t) sc @@ -20,4 +20,4 @@ __swapcontext: b __retfromsyscall@local .weak swapcontext -swapcontext = __swapcontext +swapcontext = libucontext_swapcontext diff --git a/arch/ppc64/getcontext.S b/arch/ppc64/getcontext.S index 813a997..8d27277 100644 --- a/arch/ppc64/getcontext.S +++ b/arch/ppc64/getcontext.S @@ -11,7 +11,7 @@ */ .global libucontext_getcontext -.hidden __swapcontext +.hidden libucontext_swapcontext libucontext_getcontext: addis 2, 12, .TOC.-libucontext_getcontext@ha addi 2, 12, .TOC.-libucontext_getcontext@l @@ -19,7 +19,7 @@ libucontext_getcontext: .localentry libucontext_getcontext,.-libucontext_getcontext li 4, 0 - b __swapcontext + b libucontext_swapcontext .weak getcontext getcontext = libucontext_getcontext diff --git a/arch/ppc64/setcontext.S b/arch/ppc64/setcontext.S index b13255c..a817e7c 100644 --- a/arch/ppc64/setcontext.S +++ b/arch/ppc64/setcontext.S @@ -11,7 +11,7 @@ */ .global libucontext_setcontext -.hidden __swapcontext +.hidden libucontext_swapcontext libucontext_setcontext: addis 2, 12, .TOC.-libucontext_setcontext@ha addi 2, 12, .TOC.-libucontext_setcontext@l @@ -20,7 +20,7 @@ libucontext_setcontext: mr 4, 3 li 3, 0 - b __swapcontext + b libucontext_swapcontext .weak setcontext setcontext = libucontext_setcontext diff --git a/arch/ppc64/swapcontext.S b/arch/ppc64/swapcontext.S index 982537a..c6c05a0 100644 --- a/arch/ppc64/swapcontext.S +++ b/arch/ppc64/swapcontext.S @@ -10,12 +10,12 @@ * from the use of this software. */ -.global __swapcontext -__swapcontext: - addis 2, 12, .TOC.-__swapcontext@ha - addi 2, 12, .TOC.-__swapcontext@l +.global libucontext_swapcontext +libucontext_swapcontext: + addis 2, 12, .TOC.-libucontext_swapcontext@ha + addi 2, 12, .TOC.-libucontext_swapcontext@l - .localentry __swapcontext,.-__swapcontext + .localentry libucontext_swapcontext,.-libucontext_swapcontext li 0, 249 # SYS_swapcontext li 5, 1696 # sizeof(ucontext_t) @@ -25,4 +25,4 @@ __swapcontext: b __retfromsyscall .weak swapcontext -swapcontext = __swapcontext +swapcontext = libucontext_swapcontext diff --git a/arch/riscv64/swapcontext.S b/arch/riscv64/swapcontext.S index 794abfc..f5757f2 100644 --- a/arch/riscv64/swapcontext.S +++ b/arch/riscv64/swapcontext.S @@ -12,9 +12,9 @@ #include "defs.h" -ALIAS(swapcontext, __swapcontext) +ALIAS(swapcontext, libucontext_swapcontext) -FUNC(__swapcontext) +FUNC(libucontext_swapcontext) /* move $a1 to $t0 to avoid clobbering. */ mv t0, a1 @@ -77,4 +77,4 @@ FUNC(__swapcontext) /* done swapping, return */ ret -END(__swapcontext) +END(libucontext_swapcontext) diff --git a/arch/s390x/swapcontext.S b/arch/s390x/swapcontext.S index 8c85cf0..9889353 100644 --- a/arch/s390x/swapcontext.S +++ b/arch/s390x/swapcontext.S @@ -12,9 +12,9 @@ #include "defs.h" -ALIAS(swapcontext, __swapcontext) +ALIAS(swapcontext, libucontext_swapcontext) -FUNC(__swapcontext) +FUNC(libucontext_swapcontext) lgr %r1, %r2 /* use %r1 to save current context to */ lgr %r0, %r3 /* use %r0 for source context */ @@ -26,4 +26,4 @@ FUNC(__swapcontext) lmg %r0, %r15, REG_OFFSET(0)(%r2) /* load general-purpose registers */ br %r14 /* return to new link register address */ -END(__swapcontext) +END(libucontext_swapcontext) diff --git a/arch/x86/swapcontext.S b/arch/x86/swapcontext.S index 930997e..f287c2f 100644 --- a/arch/x86/swapcontext.S +++ b/arch/x86/swapcontext.S @@ -12,9 +12,9 @@ #include "defs.h" -ALIAS(swapcontext, __swapcontext) +ALIAS(swapcontext, libucontext_swapcontext) -FUNC(__swapcontext) +FUNC(libucontext_swapcontext) /* load address of the ucontext structure */ movl 4(%esp), %eax @@ -69,4 +69,4 @@ FUNC(__swapcontext) movl REG_OFFSET(REG_EAX)(%eax), %eax ret -END(__swapcontext) +END(libucontext_swapcontext) diff --git a/arch/x86_64/swapcontext.S b/arch/x86_64/swapcontext.S index 5d3b4b0..25397fe 100644 --- a/arch/x86_64/swapcontext.S +++ b/arch/x86_64/swapcontext.S @@ -12,9 +12,9 @@ #include "defs.h" -ALIAS(swapcontext, __swapcontext) +ALIAS(swapcontext, libucontext_swapcontext) -FUNC(__swapcontext) +FUNC(libucontext_swapcontext) /* copy all of the current registers into the ucontext structure pointed by the first argument */ movq %r8, REG_OFFSET(REG_R8)(%rdi) @@ -71,4 +71,4 @@ FUNC(__swapcontext) /* we're all done here, return 0 */ xorl %eax, %eax ret -END(__swapcontext) +END(libucontext_swapcontext)