From 37fe7afd5ffef1cd09656f1f0b67e89b89bd9449 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sun, 6 Dec 2020 03:03:07 -0600 Subject: [PATCH] everywhere: rename __setcontext to libucontext_setcontext --- arch/aarch64/setcontext.S | 6 +++--- arch/aarch64/startcontext.S | 2 +- arch/aarch64/swapcontext.S | 2 +- arch/arm/setcontext.S | 6 +++--- arch/arm/startcontext.S | 2 +- arch/m68k/setcontext.S | 6 +++--- arch/m68k/startcontext.S | 2 +- arch/mips/setcontext.S | 10 +++++----- arch/mips/startcontext.S | 2 +- arch/mips64/setcontext.S | 10 +++++----- arch/mips64/startcontext.S | 2 +- arch/ppc/setcontext.S | 6 +++--- arch/ppc/startcontext.S | 2 +- arch/ppc64/setcontext.S | 12 ++++++------ arch/riscv64/setcontext.S | 6 +++--- arch/riscv64/startcontext.S | 2 +- arch/s390x/makecontext.c | 4 ++-- arch/s390x/setcontext.S | 6 +++--- arch/x86/setcontext.S | 6 +++--- arch/x86/startcontext.S | 4 ++-- arch/x86_64/setcontext.S | 6 +++--- arch/x86_64/startcontext.S | 2 +- 22 files changed, 53 insertions(+), 53 deletions(-) diff --git a/arch/aarch64/setcontext.S b/arch/aarch64/setcontext.S index 213a471..d7c8d8c 100644 --- a/arch/aarch64/setcontext.S +++ b/arch/aarch64/setcontext.S @@ -12,9 +12,9 @@ #include "defs.h" -ALIAS(setcontext, __setcontext) +ALIAS(setcontext, libucontext_setcontext) -FUNC(__setcontext) +FUNC(libucontext_setcontext) /* restore GPRs */ ldp x18, x19, [x0, #REG_OFFSET(18)] ldp x20, x21, [x0, #REG_OFFSET(20)] @@ -41,4 +41,4 @@ FUNC(__setcontext) /* jump to new PC */ br x16 -END(__setcontext) +END(libucontext_setcontext) diff --git a/arch/aarch64/startcontext.S b/arch/aarch64/startcontext.S index aa9558e..f75e8f3 100644 --- a/arch/aarch64/startcontext.S +++ b/arch/aarch64/startcontext.S @@ -15,7 +15,7 @@ FUNC(libucontext_trampoline) /* get the proper context into position and test for NULL */ mov x0, x19 - cbnz x0, __setcontext + cbnz x0, libucontext_setcontext /* something went wrong, exit */ b exit diff --git a/arch/aarch64/swapcontext.S b/arch/aarch64/swapcontext.S index 7295858..ffc3d4c 100644 --- a/arch/aarch64/swapcontext.S +++ b/arch/aarch64/swapcontext.S @@ -50,7 +50,7 @@ FUNC(__swapcontext) /* move x1 to x0 and call setcontext */ mov x0, x1 - bl __setcontext + bl libucontext_setcontext /* hmm, we came back here try to return */ mov x30, x28 diff --git a/arch/arm/setcontext.S b/arch/arm/setcontext.S index 2d5420f..f222667 100644 --- a/arch/arm/setcontext.S +++ b/arch/arm/setcontext.S @@ -12,9 +12,9 @@ #include "defs.h" -ALIAS(setcontext, __setcontext) +ALIAS(setcontext, libucontext_setcontext) -FUNC(__setcontext) +FUNC(libucontext_setcontext) /* copy all of the current registers into the ucontext structure */ add r14, r0, #REG_OFFSET(0) ldmia r14, {r0-r12} @@ -23,4 +23,4 @@ FUNC(__setcontext) /* load link register and jump to new context */ ldmia r14, {r14, pc} -END(__setcontext) +END(libucontext_setcontext) diff --git a/arch/arm/startcontext.S b/arch/arm/startcontext.S index 51f1c4a..3b6108c 100644 --- a/arch/arm/startcontext.S +++ b/arch/arm/startcontext.S @@ -17,7 +17,7 @@ libucontext_trampoline: /* get the proper context into position and test for NULL */ movs r0, r4 - bne __setcontext@plt + bne libucontext_setcontext@plt /* we are returning into a null context, it seems, so maybe we should exit */ b exit@plt diff --git a/arch/m68k/setcontext.S b/arch/m68k/setcontext.S index f89f5f9..8d3589e 100644 --- a/arch/m68k/setcontext.S +++ b/arch/m68k/setcontext.S @@ -12,9 +12,9 @@ #include "defs.h" -ALIAS(setcontext, __setcontext) +ALIAS(setcontext, libucontext_setcontext) -FUNC(__setcontext) +FUNC(libucontext_setcontext) move.l 4(%sp), %a0 /* load ucontext_t pointer from stack */ move.l REG_OFFSET(REG_SP)(%a0), %sp /* load new stack pointer */ @@ -27,4 +27,4 @@ FUNC(__setcontext) move.l REG_OFFSET(REG_PC)(%a0), %a1 /* load jump target */ jmp (%a1) /* jump to *$a1 */ -END(__setcontext) +END(libucontext_setcontext) diff --git a/arch/m68k/startcontext.S b/arch/m68k/startcontext.S index 799c04b..d561ab3 100644 --- a/arch/m68k/startcontext.S +++ b/arch/m68k/startcontext.S @@ -18,7 +18,7 @@ FUNC(libucontext_trampoline) tst.l (%sp) /* test next content for NULL */ jeq no_linked_context - jbsr __setcontext /* call setcontext */ + jbsr libucontext_setcontext /* call setcontext */ move.l %d0, (%sp) no_linked_context: diff --git a/arch/mips/setcontext.S b/arch/mips/setcontext.S index bdc2a96..edd1332 100644 --- a/arch/mips/setcontext.S +++ b/arch/mips/setcontext.S @@ -14,10 +14,10 @@ LOCALSZ = 1 #include "defs.h" -ALIAS(setcontext, __setcontext) +ALIAS(setcontext, libucontext_setcontext) -FUNC(__setcontext) - PUSH_FRAME(__setcontext) +FUNC(libucontext_setcontext) + PUSH_FRAME(libucontext_setcontext) /* move the context to $v0 */ move $v0, $a0 @@ -46,5 +46,5 @@ FUNC(__setcontext) move $v0, $zero jr $t9 - POP_FRAME(__setcontext) -END(__setcontext) + POP_FRAME(libucontext_setcontext) +END(libucontext_setcontext) diff --git a/arch/mips/startcontext.S b/arch/mips/startcontext.S index a25dfda..588cadb 100644 --- a/arch/mips/startcontext.S +++ b/arch/mips/startcontext.S @@ -22,7 +22,7 @@ FUNC(libucontext_trampoline) /* call setcontext */ move $a0, $s0 - la $t9, __setcontext + la $t9, libucontext_setcontext jr $t9 diff --git a/arch/mips64/setcontext.S b/arch/mips64/setcontext.S index cd55f36..ea0502b 100644 --- a/arch/mips64/setcontext.S +++ b/arch/mips64/setcontext.S @@ -14,10 +14,10 @@ LOCALSZ = 1 #include "defs.h" -ALIAS(setcontext, __setcontext) +ALIAS(setcontext, libucontext_setcontext) -FUNC(__setcontext) - PUSH_FRAME(__setcontext) +FUNC(libucontext_setcontext) + PUSH_FRAME(libucontext_setcontext) /* move the context to $v0 */ move $v0, $a0 @@ -50,5 +50,5 @@ FUNC(__setcontext) move $v0, $zero jr $t9 - POP_FRAME(__setcontext) -END(__setcontext) + POP_FRAME(libucontext_setcontext) +END(libucontext_setcontext) diff --git a/arch/mips64/startcontext.S b/arch/mips64/startcontext.S index 7b07c6f..fb50af1 100644 --- a/arch/mips64/startcontext.S +++ b/arch/mips64/startcontext.S @@ -22,7 +22,7 @@ FUNC(libucontext_trampoline) /* call setcontext */ move $a0, $s0 - dla $t9, __setcontext + dla $t9, libucontext_setcontext jr $t9 diff --git a/arch/ppc/setcontext.S b/arch/ppc/setcontext.S index 89e6de0..592b1bd 100644 --- a/arch/ppc/setcontext.S +++ b/arch/ppc/setcontext.S @@ -10,12 +10,12 @@ * from the use of this software. */ -.global __setcontext +.global libucontext_setcontext .hidden __swapcontext -__setcontext: +libucontext_setcontext: mr 4, 3 li 3, 0 b __swapcontext@local .weak setcontext -setcontext = __setcontext +setcontext = libucontext_setcontext diff --git a/arch/ppc/startcontext.S b/arch/ppc/startcontext.S index da3cdd6..ab0d4f0 100644 --- a/arch/ppc/startcontext.S +++ b/arch/ppc/startcontext.S @@ -19,7 +19,7 @@ libucontext_trampoline: beq no_linked_context /* jump to setcontext */ - bl __setcontext@local + bl libucontext_setcontext@local no_linked_context: b exit@GOT diff --git a/arch/ppc64/setcontext.S b/arch/ppc64/setcontext.S index 5a0cde3..b13255c 100644 --- a/arch/ppc64/setcontext.S +++ b/arch/ppc64/setcontext.S @@ -10,17 +10,17 @@ * from the use of this software. */ -.global __setcontext +.global libucontext_setcontext .hidden __swapcontext -__setcontext: - addis 2, 12, .TOC.-__setcontext@ha - addi 2, 12, .TOC.-__setcontext@l +libucontext_setcontext: + addis 2, 12, .TOC.-libucontext_setcontext@ha + addi 2, 12, .TOC.-libucontext_setcontext@l - .localentry __setcontext,.-__setcontext + .localentry libucontext_setcontext,.-libucontext_setcontext mr 4, 3 li 3, 0 b __swapcontext .weak setcontext -setcontext = __setcontext +setcontext = libucontext_setcontext diff --git a/arch/riscv64/setcontext.S b/arch/riscv64/setcontext.S index fc10c14..18f9545 100644 --- a/arch/riscv64/setcontext.S +++ b/arch/riscv64/setcontext.S @@ -12,9 +12,9 @@ #include "defs.h" -ALIAS(setcontext, __setcontext) +ALIAS(setcontext, libucontext_setcontext) -FUNC(__setcontext) +FUNC(libucontext_setcontext) /* move $a0 to $t0 to avoid clobbering. */ mv t0, a0 @@ -52,4 +52,4 @@ FUNC(__setcontext) /* done saving, return */ ret -END(__setcontext) +END(libucontext_setcontext) diff --git a/arch/riscv64/startcontext.S b/arch/riscv64/startcontext.S index 3908b4e..0174afa 100644 --- a/arch/riscv64/startcontext.S +++ b/arch/riscv64/startcontext.S @@ -21,7 +21,7 @@ FUNC(libucontext_trampoline) /* if one is set, invoke it */ mv a0, s2 - jal __setcontext + jal libucontext_setcontext /* otherwise, exit. */ no_linked_context: diff --git a/arch/s390x/makecontext.c b/arch/s390x/makecontext.c index 05940c0..6b089e7 100644 --- a/arch/s390x/makecontext.c +++ b/arch/s390x/makecontext.c @@ -22,7 +22,7 @@ extern void libucontext_trampoline(void); -extern int __setcontext(const ucontext_t *ucp); +extern int libucontext_setcontext(const ucontext_t *ucp); void @@ -37,7 +37,7 @@ libucontext_makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...) ucp->uc_mcontext.gregs[7] = (uintptr_t) func; ucp->uc_mcontext.gregs[8] = (uintptr_t) ucp->uc_link; - ucp->uc_mcontext.gregs[9] = (uintptr_t) &__setcontext; + ucp->uc_mcontext.gregs[9] = (uintptr_t) &libucontext_setcontext; ucp->uc_mcontext.gregs[14] = (uintptr_t) &libucontext_trampoline; va_start(va, argc); diff --git a/arch/s390x/setcontext.S b/arch/s390x/setcontext.S index 52618b8..d07e272 100644 --- a/arch/s390x/setcontext.S +++ b/arch/s390x/setcontext.S @@ -12,13 +12,13 @@ #include "defs.h" -ALIAS(setcontext, __setcontext) +ALIAS(setcontext, libucontext_setcontext) -FUNC(__setcontext) +FUNC(libucontext_setcontext) lgr %r1, %r2 /* use %r1 as our working register */ lam %a2, %a15, AREG_OFFSET(2)(%r1) /* load access registers, but skip %a0 and %a1 which are for TLS */ lmg %r0, %r15, REG_OFFSET(0)(%r1) /* store general-purpose registers */ br %r14 /* return to new link register address */ -END(__setcontext) +END(libucontext_setcontext) diff --git a/arch/x86/setcontext.S b/arch/x86/setcontext.S index 50861b1..afbcca0 100644 --- a/arch/x86/setcontext.S +++ b/arch/x86/setcontext.S @@ -12,9 +12,9 @@ #include "defs.h" -ALIAS(setcontext, __setcontext) +ALIAS(setcontext, libucontext_setcontext) -FUNC(__setcontext) +FUNC(libucontext_setcontext) /* load address of the ucontext structure */ movl 4(%esp), %eax @@ -41,4 +41,4 @@ FUNC(__setcontext) movl REG_OFFSET(REG_EAX)(%eax), %eax ret -END(__setcontext) +END(libucontext_setcontext) diff --git a/arch/x86/startcontext.S b/arch/x86/startcontext.S index 4d1168a..1cbc68c 100644 --- a/arch/x86/startcontext.S +++ b/arch/x86/startcontext.S @@ -17,7 +17,7 @@ FUNC(libucontext_trampoline) leal (%esp,%ebx,4), %esp cmpl $0, (%esp) - /* restore global offset table, exit@plt and __setcontext@plt need this */ + /* restore global offset table, exit@plt and libucontext_setcontext@plt need this */ call __i686.get_pc_thunk.bx addl $_GLOBAL_OFFSET_TABLE_, %ebx @@ -25,7 +25,7 @@ FUNC(libucontext_trampoline) je no_linked_context /* call setcontext to switch to the linked context */ - call __setcontext@plt + call libucontext_setcontext@plt movl %eax, (%esp) no_linked_context: diff --git a/arch/x86_64/setcontext.S b/arch/x86_64/setcontext.S index 22098fc..9d29658 100644 --- a/arch/x86_64/setcontext.S +++ b/arch/x86_64/setcontext.S @@ -12,9 +12,9 @@ #include "defs.h" -ALIAS(setcontext, __setcontext) +ALIAS(setcontext, libucontext_setcontext) -FUNC(__setcontext) +FUNC(libucontext_setcontext) /* set all of the registers */ movq REG_OFFSET(REG_R8)(%rdi), %r8 movq REG_OFFSET(REG_R9)(%rdi), %r9 @@ -42,4 +42,4 @@ FUNC(__setcontext) /* we're all done here, return 0 */ xorl %eax, %eax ret -END(__setcontext) +END(libucontext_setcontext) diff --git a/arch/x86_64/startcontext.S b/arch/x86_64/startcontext.S index 9a3a374..bcc3ece 100644 --- a/arch/x86_64/startcontext.S +++ b/arch/x86_64/startcontext.S @@ -22,7 +22,7 @@ FUNC(libucontext_trampoline) je no_linked_context /* call setcontext to switch to the linked context */ - call __setcontext@plt + call libucontext_setcontext@plt movq %rax, %rdi no_linked_context: