Re-implementation of relocations handling.