mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-24 02:07:44 +02:00
MdePkg/BasePeCoffLib2: Fix RuntimeRelocate sanity-check
This commit is contained in:
parent
c790116e13
commit
3a16df0e2d
@ -891,6 +891,15 @@ PeCoffRuntimeRelocateImage (
|
||||
RelocBlockOffset += RelocBlockSize;
|
||||
}
|
||||
//
|
||||
// Align TopOfRelocDir because, if the policy does not demand Relocation Block
|
||||
// sizes to be aligned, the code below will manually align them. Thus, the
|
||||
// end offset of the last Relocation Block must be compared to a manually
|
||||
// aligned Relocation Directoriy end offset.
|
||||
//
|
||||
if ((PcdGet32 (PcdImageLoaderAlignmentPolicy) & PCD_ALIGNMENT_POLICY_RELOCATION_BLOCK_SIZES) != 0) {
|
||||
TopOfRelocDir = ALIGN_VALUE (TopOfRelocDir, ALIGNOF (EFI_IMAGE_BASE_RELOCATION_BLOCK));
|
||||
}
|
||||
//
|
||||
// This condition is verified by PeCoffRelocateImage().
|
||||
//
|
||||
ASSERT (RelocBlockOffset == TopOfRelocDir);
|
||||
|
Loading…
x
Reference in New Issue
Block a user