--- a/libc/sysdeps/linux/arm/clone.S.orig 2019-11-14 17:45:57.321719826 +0100 +++ b/libc/sysdeps/linux/arm/clone.S 2019-11-14 17:46:29.713827207 +0100 @@ -115,7 +115,7 @@ swi 0x0 cfi_endproc cmp r0, #0 - beq 1f + beq __thread_start pop {r4, r7} blt __error IT(t, ne) @@ -125,9 +125,11 @@ .fnend PSEUDO_END (__clone) -1: +__thread_start: .fnstart .cantunwind + .global __thread_start + .type __thread_start,%function @ pick the function arg and call address off the stack and execute ldr r0, [sp, #4] mov lr, pc @@ -135,6 +137,7 @@ @ and we are done, passing the return value through r0 b HIDDEN_JUMPTARGET(_exit) + .size __thread_start,.-__thread_start __error: b __syscall_error --- a/libc/sysdeps/linux/i386/clone.S.orig 2019-11-15 11:20:48.411479863 +0100 +++ b/libc/sysdeps/linux/i386/clone.S 2019-11-15 11:22:50.875806885 +0100 @@ -94,10 +94,12 @@ test %eax,%eax jl __error - jz .Lthread_start + jz __thread_start ret -.Lthread_start: +__thread_start: +.global __thread_start +.type __thread_start,%function /* Note: %esi is zero. */ movl %esi,%ebp /* terminate the stack frame */ call *%ebx @@ -110,6 +112,7 @@ movl %eax, %ebx movl $__NR_exit, %eax int $0x80 +.size __thread_start,.-__thread_start /* Need to indirect jump to syscall error * or we end up with TEXTREL's