How is Linux simultaneously 32bit and 64bit? Or is this something being processed in glibc?

How is Linux both 32-bit and 64-bit? Or is this something being processed in glibc?

I am running CentOS 5.3 and this is a β€œ64-bit” version; although I create things for 64-bit and 32-bit. From what I think I know, Windows presumably has a 32-bit emulator. Does Linux do the same? Is it in user space or in kernel space?

If libc processes it, does it look like an emulator that says I will connect with 32-bit applications but speak with a 64-bit kernel?

+6
x86 linux 64bit 32bit-64bit libc
source share
3 answers

The processor can execute both 64 and 32-bit instructions, and the kernel can switch between modes. The only limitation is that you cannot link 32-bit programs to 64-bit libraries so that you install both 32 and 64-bit versions of libc, etc.

+5
source share

Nothing stops the processor from switching from 64 bits to 32 bits. He just switches.

You can have a 64-bit kernel and run 32-bit applications. You can even have a 32-bit kernel and run 64-bit applications (Mac os x).

However, you need the libraries they use, must also be 32-bit or 64-bit, so you can see the lib64 or lib32 files for Linux for 64-bit or 32-bit libraries.

+3
source share

Since x86_64 processors are developed using x86 technology, they can still support 32-bit programs without any hardware emulation, for example, that you will need to run x86 programs in PowerPC or Sparc environments. On Linux, all you have to do is install the necessary software libraries to run 32-bit software.

+1
source share

All Articles