I have the following function that stores a number on the stack (and modifies that number) and then at the end it cleans things up:
.rodata
number: .long 127 # need to keep original value
_start:
# set up stack, align on 16 for syscalls
push %rbp
mov %rsp, %rbp
push number
...
exit:
pop ???
mov %rbp, %rsp
pop %rbp
mov $SYS_EXIT, %eax
syscall
What should I be doing with the pop
to get rid of the number (i.e., re-align the stack before exiting) ?