Object Files
- Comes in 3 flavors:
- Relocatable Object Files: Can be combined at compile time with Static Linker to create Executable Object Files
- Executable Object Files: Contains binary code and data in form that can be directly copied into memory and executed.
- Shared Object File: Special type of Relocatable Object Files that can be loaded at into memory and linked dynamically at load or run time.
- Compilers and Assembler generate Relocatable Object Files and Shared Object File and linkers generate object files.
- Technically, an object module is a sequence of bytes, and an object file is an object module stored on disk in a file.
-Object file formatting for various OS:- Windows: Portable Executable (PE)
- Mac OS-X uses Mach-0 format
- And Linux systems uses Executable and Linkable Format(ELF).
NOTE: Memory resident code means stuff that always lives int the RAM, like kernel which is the memory resident part of the operating system.