diff options
Diffstat (limited to 'linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32')
-rw-r--r-- | linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S b/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S index 5e98554744..2da7703e31 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S +++ b/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S @@ -20,9 +20,28 @@ #include <sysdep-cancel.h> .text +#ifdef SHARED +.LLGETPC0: + retl + addl %o7, %o0, %o0 +#endif ENTRY(__vfork) - ld [%g7 + MULTIPLE_THREADS_OFFSET], %o0 - cmp %o0, 0 +#ifdef SHARED + mov %o7, %o1 + sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %o0 + call .LLGETPC0 + add %o0, %lo(_GLOBAL_OFFSET_TABLE_+4), %o0 + sethi %hi(__libc_pthread_functions), %o2 + mov %o1, %o7 + or %o2, %lo(__libc_pthread_functions), %o2 + ld [%o0 + %o2], %o2 + ld [%o2], %o2 + cmp %o2, 0 +#else + .weak __pthread_fork + sethi %hi(__pthread_fork), %o0 + orcc %o0, %lo(__pthread_fork), %o0 +#endif #if defined SHARED && !defined BROKEN_SPARC_WDISP22 bne HIDDEN_JUMPTARGET(__fork) #else |