these are not a public interface and are not intended to be callable from anywhere but the public clone function or other places in libc.
@@ -141,7 +141,7 @@ int __init_tp(void *);
void *__copy_tls(unsigned char *);
void __reset_tls();
-int __clone(int (*)(void *), void *, int, void *, ...);
+hidden int __clone(int (*)(void *), void *, int, void *, ...);
int __set_thread_area(void *);
int __libc_sigaction(int, const struct sigaction *, struct sigaction *);
void __unmapself(void *, size_t);
@@ -5,6 +5,7 @@
// x8, x0, x1, x2, x3, x4
.global __clone
+.hidden __clone
.type __clone,%function
__clone:
// align stack and save func,arg
@@ -1,6 +1,7 @@
.syntax unified
.text
stmfd sp!,{r4,r5,r6,r7}
@@ -1,5 +1,6 @@
.type __clone,@function
push %ebp
movem.l %d2-%d5,-(%sp)
@@ -1,4 +1,5 @@
# r5, r6, r7, r8, r9, r10, stack
.set noreorder
# Save function pointer and argument pointer on new thread stack
@@ -3,6 +3,7 @@
* sys_clone(flags, stack, ptid, ctid, tls)
*/
l.addi r4, r4, -8
.type __clone, %function
# int clone(fn, stack, flags, arg, ptid, tls, ctid)
# int clone(
.type __clone, @function
! incoming: fn stack flags arg ptid tls ctid
movl $0x40000038,%eax /* SYS_clone */
xor %eax,%eax