x86_64: trampoline: do same cleanups as in x86
parent
ef2fa49912
commit
0622245f06
|
@ -16,13 +16,15 @@ __start_context:
|
||||||
movq %rbx, %rsp
|
movq %rbx, %rsp
|
||||||
movq (%rsp), %rdi
|
movq (%rsp), %rdi
|
||||||
testq %rdi, %rdi
|
testq %rdi, %rdi
|
||||||
je hosed
|
|
||||||
|
/* if we have no linked context, lets get out of here */
|
||||||
|
je no_linked_context
|
||||||
|
|
||||||
/* call setcontext to switch to the linked context */
|
/* call setcontext to switch to the linked context */
|
||||||
call __setcontext@plt
|
call __setcontext@plt
|
||||||
movq %rax, %rdi
|
movq %rax, %rdi
|
||||||
|
|
||||||
hosed:
|
no_linked_context:
|
||||||
/* we are returning into a null context, it seems, so maybe we should exit */
|
/* we are returning into a null context, it seems, so maybe we should exit */
|
||||||
call exit@plt
|
call exit@plt
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue