Understanding elf file format and program loading



Three main types of object file:

  • A relocation file

  • An executable file

  • A shared object file

File format

Object files participate in program linking (building a program) and program execution (running a program). For convenience and efficiency, the object file format provides parallel views of a file’s contents, reflecting the differing needs of these activities. obj-file-format