I just looked on the net on linux system calls numbers, and I found different numbers whether it is a 32 bits or 64 bits linux version.
Why did Linux change the ordering of system calls ?? wouldn't that make the compatibility between 32 bits and 64 bits linux programs harder to achieve ??
More informations :
Here is the websites where I found the system calls numbers : 32 bits linux , 64 bits linux .
I also found the system calls numbers in linux system, in theses two files :
/usr/include/asm/unistd_32.hand/usr/include/asm/unistd_64.h.
Edit : I wrote a 32 bits assembly hello world program :
I compiled it with the command nasm -f elf32 prog.asm && ld -m elf_i386 prog.o, it compiles and execute normally. Then I compiled the same program with the command nasm -f elf64 prog.asm && ld -m elf_x86_64 prog.o expecting it to crash, but It did the same thing as the first program, it wrote "Hello World!" to the default output.
How is it possible that the 64-bits program used the same system calls as the 32-bits program (although the system calls table is different for the two architectures).
