"What is exactly the difference between the position independant code and Relocatable code."
If in doubt, ask Wikipedia:
https://en.wikipedia.org/wiki/Position-independent_code[
^]
" position-independent code (PIC) or position-independent executable (PIE) is a body of machine code that, being placed somewhere in the primary memory, executes properly regardless of its absolute address
...
This differs from relocatable code, in which a link editor or program loader modifies a program before execution so it can be run only from a particular memory location. "
Does all compiler/linker supports PIC generation and relocation?
No.
Modern ones do, but very old ones may not.