Relocatable Object Files

Pasted image 20260424170828.png
Fig: Typical ELF relocatable object file

Components of ROF:

- Location and sizes of various sections are described here.
- Everything else is sandwiched between ELF header and this.

- Initialized global and static C variables.
- NOTE: Local C vars are mainitaied at run time on the stack and do not appear in either .data or .bss section.

- Contains all uninitialized global and static variables along with any that are initialized to zero.
- Occupies no actual place and is just a place holder
- At runtime these stuff are initialized to zero

- Relocation info for any any global vars that are referenced or defined by this module

Powered by Forestry.md