Executable formats
On a modern (after 1975) computer, the operating system is roughly split into two main parts:
- The kernelland: This is the memory space of the code that manages both the hardware and what happens in the userland. It generally doesn't have internal memory protection and any crash here can crash the computer (or even damage the hardware). It is also called ring 0 as an abuse of the memory protection rings on x86 CPUs.
- The userland: This is the (virtual) memory space where the user executable lives. The executables cannot access the hardware directly, they don't have a direct view of the physical memory addresses, their execution can get interrupted by the kernel scheduler, and they can crash happily without too much risk to the system. Also known as ring 3, the least privileged of the x86 CPUs.
Since the kernelland can manage a myriad of userland programs (that it has no clue about beforehand), there must be a standard way to describe these...