* commit '655dba09c72ceb5852dae296cef49cbad6b1053f': Rename __bionic_clone_entry to __start_thread.
This commit is contained in:
commit
12e98b459d
@ -60,10 +60,10 @@ ENTRY(__bionic_clone)
|
||||
b __set_errno
|
||||
|
||||
1: # The child.
|
||||
# Setting lr to 0 will make the unwinder stop at __bionic_clone_entry
|
||||
# Setting lr to 0 will make the unwinder stop at __start_thread
|
||||
mov lr, #0
|
||||
ldr r0, [sp, #-4]
|
||||
ldr r1, [sp, #-8]
|
||||
b __bionic_clone_entry
|
||||
b __start_thread
|
||||
END(__bionic_clone)
|
||||
.hidden __bionic_clone
|
||||
|
@ -62,10 +62,10 @@ ENTRY(__bionic_clone)
|
||||
.L_bc_child:
|
||||
# We're in the child now. Set the end of the frame record chain...
|
||||
mov x29, xzr
|
||||
# Setting x30 to 0 will make the unwinder stop at __bionic_clone_entry
|
||||
# Setting x30 to 0 will make the unwinder stop at __start_thread
|
||||
mov x30, xzr
|
||||
# ...and call __bionic_clone_entry with the 'fn' and 'arg' we stored on the child stack.
|
||||
# ...and call __start_thread with the 'fn' and 'arg' we stored on the child stack.
|
||||
ldp x0, x1, [sp, #-16]
|
||||
b __bionic_clone_entry
|
||||
b __start_thread
|
||||
END(__bionic_clone)
|
||||
.hidden __bionic_clone
|
||||
|
@ -60,8 +60,8 @@ ENTRY(__bionic_clone)
|
||||
lw a0,0(sp) # fn
|
||||
lw a1,4(sp) # arg
|
||||
|
||||
# void __bionic_clone_entry(int (*func)(void*), void *arg)
|
||||
la t9,__bionic_clone_entry
|
||||
# void __start_thread(int (*func)(void*), void *arg)
|
||||
la t9,__start_thread
|
||||
j t9
|
||||
|
||||
.L__error_bc:
|
||||
|
@ -78,10 +78,10 @@ LEAF(__bionic_clone, FRAMESZ)
|
||||
# Clear return address in child so we don't unwind further.
|
||||
li ra,0
|
||||
|
||||
# void __bionic_clone_entry(int (*func)(void*), void *arg)
|
||||
# void __start_thread(int (*func)(void*), void *arg)
|
||||
PTR_L a0,FRAME_FN(sp) # fn
|
||||
PTR_L a1,FRAME_ARG(sp) # arg
|
||||
LA t9,__bionic_clone_entry
|
||||
LA t9,__start_thread
|
||||
RESTORE_GP64
|
||||
/*
|
||||
* For O32 etc the child stack must have space for a0..a3 to be stored
|
||||
|
@ -39,7 +39,7 @@ ENTRY(__bionic_clone)
|
||||
.L_bc_child:
|
||||
# We don't want anyone to unwind past this point.
|
||||
.cfi_undefined %eip
|
||||
call __bionic_clone_entry
|
||||
call __start_thread
|
||||
hlt
|
||||
|
||||
.L_bc_parent:
|
||||
|
@ -62,12 +62,12 @@ ENTRY(__bionic_clone)
|
||||
.cfi_undefined %rip
|
||||
.cfi_undefined %rbp
|
||||
|
||||
# We're in the child now, so call __bionic_clone_entry
|
||||
# We're in the child now, so call __start_thread
|
||||
# with the arguments from the child stack moved into
|
||||
# the appropriate registers.
|
||||
popq %rdi # fn
|
||||
popq %rsi # arg
|
||||
call __bionic_clone_entry
|
||||
call __start_thread
|
||||
hlt
|
||||
|
||||
.L_bc_parent:
|
||||
|
@ -35,7 +35,7 @@ extern "C" pid_t __bionic_clone(uint32_t flags, void* child_stack, int* parent_t
|
||||
extern "C" __noreturn void __exit(int status);
|
||||
|
||||
// Called from the __bionic_clone assembler to call the thread function then exit.
|
||||
extern "C" __LIBC_HIDDEN__ void __bionic_clone_entry(int (*fn)(void*), void* arg) {
|
||||
extern "C" __LIBC_HIDDEN__ void __start_thread(int (*fn)(void*), void* arg) {
|
||||
int status = (*fn)(arg);
|
||||
__exit(status);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user