If so, how can the syscalls work?
Andreas Schamanek
[ Editor ]
from Wien, Österreich
Yes. For instance, you can install a 64 bit kernel on a 32 bit system. You’ll probably need ia32-libs and possibly amd64-libs.
Note that a number of issues have been reported. Just do some web research, and you’ll see.
A good article is Running 32-bit Applications on 64-bit Debian GNU/Linux (see also the comments there).
Your question about syscalls has been amply answered in c – How do 32-bit applications make system calls on 64-bit Linux? – Stack Overflow.
I think that I my question was not clear enough. My fault, sorry!
I know that I can install an amd64 flavor of Debian (complete with 64-bit kernel) and yet have some 32-bit applications (propietary ones, for examples) going through the ia32 “stub libraries” to access kernel space.
What I was asking is whether I can install an i386 flavor of Debian (all userspace apps will be 32 bit, and dpkg will report arch=i386) and have a 64-bit kernel. The ia32 libs are out of discussion here: the ia32-libs package is not even available for an i386 flavor of Debian (remember? dpkg reports i386).
This is not a case I came up with during a sleepless night, it was reported on a Debian forum by a user whose kernel is identified as
Linux DB2-Server-Deb32 2.6.32-5-amd64 #1 SMP Mon Jan 16 17:15:00 UTC 2012 x86_64 GNU/Linux
while dpkg —print-architecture reports “i386”.
I understood and answered your question. It is possible. But note that it is far from being recommended or supported. It’s not straightforward and, as I said, there are pitfalls. It has been documented, though, especially by people migrating from 32 to 64 bit.