What is the difference between executable file in elf format and relocatable file in elf format?
ELF executable, as we can understand from its name, is a file that can be executed. This file can be generated from C code for example.
The process of relocation is fixing the addresses of labels and symbols which were created in the code. For example, if you write a program in assembly language and you look at the listing file of your source code, you'll find some places where [00000000] is written instead of a label mentioned at this line. This zeroes mean that he linker uses relocation in order to fix the address the its future value.