I study the Linux kernel and found out that for x86_64 architecture the interrupt int 0x80
doesn't work for calling system calls1.
For the i386 architecture (32-bit x86 user-space), what is more preferable: syscall
or int 0x80
and why?
I use Linux kernel version 3.4.
Footnote 1: int 0x80
does work in some cases in 64-bit code, but is never recommended. What happens if you use the 32-bit int 0x80 Linux ABI in 64-bit code?
int 0x80
? Can you specify some files? – Rosetterosewallint 0x80
works on thex86-64
kernel directly for backwards compatibility. And the Intel manual says thatsyscall
is invalid in 32-bit mode. – Hinterland