Rename __bionic_clone_entry to __start_thread.
This seems a bit less obscure.
Change-Id: I7dc528c253b73c861694f67556ad8f919bf92136
diff --git a/libc/arch-arm/bionic/__bionic_clone.S b/libc/arch-arm/bionic/__bionic_clone.S
index 2643ae0..48f2f98 100644
--- a/libc/arch-arm/bionic/__bionic_clone.S
+++ b/libc/arch-arm/bionic/__bionic_clone.S
@@ -60,10 +60,10 @@
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
diff --git a/libc/arch-arm64/bionic/__bionic_clone.S b/libc/arch-arm64/bionic/__bionic_clone.S
index d3c0374..76fe24e 100644
--- a/libc/arch-arm64/bionic/__bionic_clone.S
+++ b/libc/arch-arm64/bionic/__bionic_clone.S
@@ -62,10 +62,10 @@
.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
diff --git a/libc/arch-mips/bionic/__bionic_clone.S b/libc/arch-mips/bionic/__bionic_clone.S
index 7b138ae..4b4498d 100644
--- a/libc/arch-mips/bionic/__bionic_clone.S
+++ b/libc/arch-mips/bionic/__bionic_clone.S
@@ -60,8 +60,8 @@
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:
diff --git a/libc/arch-mips64/bionic/__bionic_clone.S b/libc/arch-mips64/bionic/__bionic_clone.S
index 8687906..4f053f9 100644
--- a/libc/arch-mips64/bionic/__bionic_clone.S
+++ b/libc/arch-mips64/bionic/__bionic_clone.S
@@ -78,10 +78,10 @@
# 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
diff --git a/libc/arch-x86/bionic/__bionic_clone.S b/libc/arch-x86/bionic/__bionic_clone.S
index 0c0feff..917dc68 100644
--- a/libc/arch-x86/bionic/__bionic_clone.S
+++ b/libc/arch-x86/bionic/__bionic_clone.S
@@ -39,7 +39,7 @@
.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:
diff --git a/libc/arch-x86_64/bionic/__bionic_clone.S b/libc/arch-x86_64/bionic/__bionic_clone.S
index 173ab5c..e0ce5a6 100644
--- a/libc/arch-x86_64/bionic/__bionic_clone.S
+++ b/libc/arch-x86_64/bionic/__bionic_clone.S
@@ -62,12 +62,12 @@
.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:
diff --git a/libc/bionic/clone.cpp b/libc/bionic/clone.cpp
index d38a422..001e245 100644
--- a/libc/bionic/clone.cpp
+++ b/libc/bionic/clone.cpp
@@ -35,7 +35,7 @@
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);
}