Elf file
An ELF file is a standard way of describing executable, shared libraries and object, it’s the default executable format in several system such as Linux, *BSD, and more esoteric system like the PS3 OS.
An ELF file is described by its header, Elf32_Ehdr
, which is present at the
beginning of it. It contain information about segments and sections of the
executable.
Sections contains information needed by the linker, while segments contains information needed to create a memory image of the binary. Common section are:
- .bss which contain uninitialized data,
- .rodata which contain read only data,
- .text which contain the code,
- .symtab which contain all the symbols of the file.
The sections are described by the section header table, Elf32_Shdr
, while the
segments are described by the program header table, Elf32_Phdr
.
Notes
For more information about the ELF format, look at the elf.h file given and into the elf(5) man page.