Apply relocations to the payload image.
The main image must call this function before calling the payload's entry point.