MdePkg/BasePeCoffLib: Remove DEBUG() statements from runtime code

PeCoffLoaderRelocateImageForRuntime() executes after boot services, and
so it should not use DEBUG() prints at all, given that these may rely on
MMIO mappings or other boot time facilities that are no longer
available.

So revert the changes in aedcaa3df8 ("MdePkg: Fix overflow issue in
PeCoffLoaderRelocateImageForRuntime") that replaced code comments with
DBEUG() statements.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Ard Biesheuvel 2025-01-29 00:09:20 +01:00 committed by mergify[bot]
parent 254937f0bc
commit 3600675368
1 changed files with 6 additions and 2 deletions

View File

@ -1845,11 +1845,15 @@ PeCoffLoaderRelocateImageForRuntime (
}
if ((RelocBase == NULL) || (RelocBaseEnd == NULL) || ((UINTN)RelocBaseEnd < (UINTN)RelocBase)) {
DEBUG ((DEBUG_ERROR, "Relocation block is not valid\n"));
//
// relocation block is not valid, just return
//
return;
}
} else {
DEBUG ((DEBUG_ERROR, "Cannot find relocations, cannot continue to relocate the image\n"));
//
// Cannot find relocations, cannot continue to relocate the image, ASSERT for this invalid image.
//
ASSERT (FALSE);
return;
}