summaryrefslogtreecommitdiff
path: root/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S')
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S b/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
index 920c45eee2..724d4cc541 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
+++ b/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
@@ -31,11 +31,19 @@ ENTRY (__vfork)
#ifdef __NR_vfork
# ifdef SHARED
mflr 9
+# ifdef HAVE_ASM_PPC_REL16
+ bcl 20,31,1f
+1: mflr 10
+ addis 10,10,__libc_pthread_functions-1b@ha
+ lwz 10,__libc_pthread_functions-1b@l(10)
+ mtlr 9
+# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr 10
mtlr 9
lwz 10,__libc_pthread_functions@got(10)
lwz 10,0(10)
+# endif
# else
.weak pthread_create
lis 10,pthread_create@ha