summaryrefslogtreecommitdiff
path: root/payloads/libpayload/i386/head.S
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/i386/head.S')
-rw-r--r--payloads/libpayload/i386/head.S7
1 files changed, 4 insertions, 3 deletions
diff --git a/payloads/libpayload/i386/head.S b/payloads/libpayload/i386/head.S
index 8dc31aa54d..54f60e1469 100644
--- a/payloads/libpayload/i386/head.S
+++ b/payloads/libpayload/i386/head.S
@@ -63,13 +63,14 @@ _init:
/* Let's rock. */
call start_main
-
+
+ /* %eax has the return value - pass it on unmolested */
_leave:
/* Get old stack pointer. */
popl %ebx
/* Restore old stack. */
- movl %esp, %ebx
+ movl %ebx, %esp
/* Return to the original context. */
- lret
+ ret