A question was posted to reddit and I couldn’t help but indulge my curiosity. System calls on Linux x86 traditionally use the interrupt vector 0×80. Modern processors have special system call instructions which are much faster, so Linux has an entry point called “linux-gate.so.1″ (a virtual DSO) which will choose the best system call method for your machine. I found a webpage which explains about linux-gate and another which explains how to find the ELF auxv (auxiliary vector) which contains the address of the entry point. So I put together a small assembly program which finds the linux-gate syscall entry point and uses it to print a message to stdout. I haven’t written any assembly for quite a while :-) Use FASM to assemble the code.
Download: linuxgate.asm