Binary File Formats Clarified: PE/COFF, ELF, Object vs Image Files & Key Terminology
Introduction
Every time you run a program—whether it’s a Windows .exe, a Linux binary, or a mobile app—you’re interacting with a binary file format. These formats are the "language" that operating systems (OSes) and hardware use to understand, load, and execute software. Unlike human-readable source code (e.g., C, Python), binary files contain machine code, data, and metadata structured in a way that computers can process efficiently.
Yet, for many developers, reverse engineers, or tech enthusiasts, binary formats like PE/COFF, ELF, or the distinction between "object" and "image" files remain shrouded in mystery. This blog demystifies these concepts, breaking down key terminology, comparing critical formats, and explaining their real-world roles. By the end, you’ll understand how compilers, linkers, and OS loaders use these formats to turn code into running programs.