how the instructions are stored in relocatable format on disk
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.