Do not apply relocation fixups if the Adjust value is zero, which means the image is XIP.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9333 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
mdkinney 2009-10-08 16:45:40 +00:00
parent d40d3ba499
commit 01e1171ebd

View File

@ -634,6 +634,10 @@ PeCoffLoaderRelocateImage (
}
}
//
// If Adjust is not zero, then apply fix ups to the image
//
if (Adjust != 0) {
//
// Run the relocation information and apply the fixups
//
@ -745,6 +749,7 @@ PeCoffLoaderRelocateImage (
ImageContext->EntryPoint -= (UINT64) ImageContext->ImageAddress;
ImageContext->EntryPoint += (UINT64) ImageContext->DestinationAddress;
}
}
// Applies additional environment specific actions to relocate fixups
// to a PE/COFF image if needed