Main Page | See live article | Alphabetical index

Position independent

Position independent machine code is not dependent on the memory address it starts from. It can be stored in any memory location and still work correctly. Computers that support virtual memory don't require the use of position independent code since the MMU transparently handles the relocation of code.

Code must generally be written in a special fashion in order to be position independent. Instructions that refer to specific memory addresses, such as absolute branches, must be replaced with the equivalent instruction register relative instruction.