Indexed mode is not the answer because it can be used in relocatable code not positional independent code.
Code relocation can be done whenever addresses are not directly specified in the program (absolute), but are relative to some variable or other modifiable source.
Whether static or dynamic, a linked library is going to be situated in virtual memory somewhere that the library can’t predict, which is problematic for accessing its own memory. Fortunately, the linker (whether static or dynamic) can help us out by relocating the library’s code, so that it knows where it is. Unfortunately, library writers have to help the linker out by specifying, in the object file, the set of instructions or initialized data that need to be modified to properly relocate it. As long as all that “relocation information” is present, the object file is said to be relocatable.
On the other hand, position-independent code (PIC), as the name suggests, doesn't even need to be relocated. None of its instructions or initialized data encode any assumptions about the region of virtual memory the program will be loaded into; it figures out where it is (usually by referencing the instruction pointer) and makes all memory accesses based on what it finds out.
For more info : http://davidad.github.io/blog/2014/02/19/relocatable-vs-position-independent-code-or/