## Exit with exit status 42 on AMD64 Linux. Compiled with ## `gcc -nostdlib -static` and executed with `valgrind ## --tool=cachegrind` we get the report “I refs: 3”. This is ## probably close to the shortest Linux program execution you ## can do: three machine instructions. Of course the kernel ## is still executing something like 150,000 instructions to ## create and tear down the process... .intel_syntax noprefix .equ __NR_exit, 60 # from /usr/include/x86_64-linux-gnu/asm/unistd_64.h .globl _start _start: mov edi, 42 # return code goes in AMD64 first argument register mov eax, __NR_exit # system call number goes in RAX 9 syscall