ELF Exeucuteable linkable format in operating systems

What is Executable and Linkable format(ELF)?

ELF is a standard file format used in most of the operating systems. ELF is a general standard file format for object code, executable , shared libraries and core dumps.

Default binary system on most of the operating systems.

What are file extensions used for ELF?

.bin, .axf, .o, .elf, .puff, .prx, .so

What is type of format for ELF?

  • Binary format
  •  Executable format
  • Object format
  • Shared libraries format
  •  Core dump file
  • How ELF is important?

    • ELF is flexible in design
    • ELF is extensible in design
    • ELF is not bound to any particular processor or architecture. This allowed it to be adopted by different platforms.
  • What are main types of ELF?

    • Executable files
    • Relocatable files
    • Shared object files
  • What is Executable file?

    • Executable file is a file that contains necessary information for the OS to create a process image suitable for executing the code and it is also suitable for accessing the data and executing the code.
  • What is Relocatable file?

    • Relocatable file  is a file that describes that how to link a file with object file to convert it into the executable file.
  • What is shared object file?

    • Shared object file contains the information needed in dynamic and static linking.
  • What are parts of ELF?

    • ELF Header:

      • ELF header contains the followings;
        • ELF type (.so or .o etc)
        • Byte ordering(Little enidan / Big endian)
        • Machine architecture(32 bit/64 bit)
    • Program Header Table:

      • It contains the following info;
        • Virtual addresses
        • Memory segment and segment size
        • Page size
    • .text Section:

      • It contains the following info
        • Source code
    • .data Section:

      • It contains the following info;
        • Values during initialization of variables
    • .bss Section

      • It contains the following info;
        • Uninitialized data
    • .symtab Section:

      • It contains the following info;
        • Procedure name
        • Static variable names
        • Symbol table
        • Section / Segment names and locations
    • .rel.text Section:

      • It contains the following info;
        • Instruction for modifying
        • Relocation info for .text section
    • .rel.data Section:

      • It contains the following info;
        • Addresses of pointer data
        • Relocation info for .data section
    • .debug Section:

      • It contains the following info;
        • Info for symbolic debugging