Object file formats
As we explained in the previous chapter, Chapter 2, Compilation and Linking, on a platform, object files have their own specific format for storing machine-level instructions. Note that this is about the structure of object files and this is different from the fact that each architecture has its own instruction set. As we know from the previous discussion, these two variations are different parts of the ABI in a platform; the object file format and the architecture's instruction set.
In this section, we are going to have a brief look into some widely known object file formats. To start with, let's look at some object file formats used in various operating systems:
- ELF used by Linux and many other Unix-like operating systems
- Mach-O used in OS X (macOS and iOS) systems
- PE used in Microsoft Windows
To give some history and context about the current and past object file formats, we can say that all object file formats that exist today...