projects
/
kopensolaris-gnu
/
glibc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't tail-call to __fork if !SHARED.
[kopensolaris-gnu/glibc.git]
/
linuxthreads
/
sysdeps
/
unix
/
sysv
/
linux
/
alpha
/
vfork.S
diff --git
a/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S
b/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S
index
2481de9
..
e750724
100644
(file)
--- a/
linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S
+++ b/
linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S
@@
-26,26
+26,35
@@
__LABEL(__vfork)
ldgp gp, 0(pv)
.prologue 1
PSEUDO_PROF
ldgp gp, 0(pv)
.prologue 1
PSEUDO_PROF
+
SINGLE_THREAD_P(t0)
#ifdef SHARED
bne t0, HIDDEN_JUMPTARGET (__fork) !samegp
#else
SINGLE_THREAD_P(t0)
#ifdef SHARED
bne t0, HIDDEN_JUMPTARGET (__fork) !samegp
#else
- bne t0, $
hidden
_fork
+ bne t0, $
do
_fork
#endif
#endif
+
lda v0, SYS_ify(vfork)
call_pal PAL_callsys
lda v0, SYS_ify(vfork)
call_pal PAL_callsys
-#ifdef SHARED
- bne a3, __syscall_error !samegp
-#else
- bne a3, $syscall_error
-#endif
+ bne a3, SYSCALL_ERROR_LABEL
ret
ret
+
#ifndef SHARED
#ifndef SHARED
-$hidden_fork:
- jmp zero, HIDDEN_JUMPTARGET (__fork)
+ /* Can't tail-call due to possible mismatch between GP in
+ fork and vfork object files. */
+$do_fork:
+ subq sp, 16, sp
+ stq ra, 0(sp)
+ jsr ra, HIDDEN_JUMPTARGET (__fork)
+ ldgp gp, 0(ra)
+ ldq ra, 0(sp)
+ addq sp, 16, sp
+ ret
+
$syscall_error:
$syscall_error:
- jmp zero, __syscall_error
+ SYSCALL_ERROR_HANDLER
#endif
#endif
+
PSEUDO_END(__vfork)
libc_hidden_def (__vfork)
PSEUDO_END(__vfork)
libc_hidden_def (__vfork)