What is the difference between leave-ret and system call exit? So I am using GNU assembler with gcc compiler in the Ubuntu 20.04 and when I turn a c program to an assembly program with this command:
gcc -S foo.c
the foo.s file always ends with this code:
leave
ret
Should I use system call exit instead of leave and ret? Like this:
movl $1, %eax
movl $0, %ebx
int $0x80