how the instructions are stored in relocatable format on disk I understand how the instructions are kept in relocatable format in RAM. It is done so by keeping a base register and a limit register. Physical address = base register value + logical address. And logical address = the logical distance from the starting location of process's address space, just like an array.

But what I don't understand how are they kept in relocatable format on the disk, is there some base value there too. Plus how are they linked to a computer program say C Program or Java program using dynamic loading of shared libraries.

Please help me understand !! 

Thanks.
A compiled entity (say, a library) has a sequence of instructions. Each instruction has a particular location in sequence. This location is a value which can be considered simply as an offset from a base address. Loader loads the library at a particular address in the virtual address space of process and this address becomes the base address for the library and subsequently each instruction's location added to this base address becomes the actual address of the instruction in virtual address space of process.