|
@@ -43,11 +43,13 @@ section .note.GNU-stack noalloc noexec nowrite progbits
|
43
|
43
|
section .data
|
44
|
44
|
|
45
|
45
|
rpn_exec:
|
46
|
|
- ; unsigned long int rpn_exec(unsigned long int stack_size, unsigned long args)
|
|
46
|
+ ; unsigned long int rpn_exec(unsigned long int stack_size, unsigned long args, unsigned long int *stack)
|
47
|
47
|
; rdi -> stack size (in values (64 bits))
|
48
|
48
|
; rsi -> args pointers
|
49
|
|
-
|
|
49
|
+ ; rdx -> stack pointer or null
|
|
50
|
+
|
50
|
51
|
enter 32, 0
|
|
52
|
+ push rbx ; rbx MUST BE PRESERVED !!! (like r12 to r15 and rbp !)
|
51
|
53
|
|
52
|
54
|
mov stack_size, rdi
|
53
|
55
|
mov args_ptr, rsi
|
|
@@ -102,6 +104,7 @@ rpn_exec_ret:
|
102
|
104
|
syscall
|
103
|
105
|
pop rax
|
104
|
106
|
.end:
|
|
107
|
+ pop rbx
|
105
|
108
|
leave
|
106
|
109
|
ret
|
107
|
110
|
part_sz rpn_exec_ret
|