]> Git Repo - uclibc-ng.git/commitdiff
arm/clone.S: Fix threading support
authorChristophe Lyon <[email protected]>
Wed, 4 Jul 2018 15:55:27 +0000 (17:55 +0200)
committerWaldemar Brodkorb <[email protected]>
Fri, 10 Aug 2018 14:02:45 +0000 (16:02 +0200)
Change clone.S so that in FDPIC case we take into account the fact
that we are given a function descriptor.

* libc/sysdeps/linux/arm/clone.S (__clone): Support __FDPIC__.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
libc/sysdeps/linux/arm/clone.S

index 8ca50fce42b3347a4ae98be9cbb46e5b96b8f7cc..eacf3dba643416fadcf35ccd5f4638d8b16dcd4e 100644 (file)
@@ -130,8 +130,20 @@ PSEUDO_END (__clone)
        .cantunwind
        @ pick the function arg and call address off the stack and execute
        ldr     r0, [sp, #4]
+#if defined(__FDPIC__)
+       ldr     r12, [sp]
+       mov     r4, r9
+       ldr     r9, [r12, #4]
+       mov     lr, pc
+       ldr     pc, [r12]
+#else
        mov     lr, pc
        ldr     pc, [sp]
+#endif
+
+#if defined(__FDPIC__)
+       mov     r9, r4
+#endif
 
        @ and we are done, passing the return value through r0
        b       HIDDEN_JUMPTARGET(_exit)
This page took 0.027542 seconds and 4 git commands to generate.