MdePkg/BasePeCoffLib2: Remove DEBUG_RAISE on invalid DebugDir size

EfiBoot images contain a sum of EFI_IMAGE_DEBUG_DIRECTORY_ENTRY and
EFI_IMAGE_DEBUG_CODEVIEW_MTOC_ENTRY sizes in DebugDir size.
Since our XCODE5 toolchain generates NB10 debug entries and we do not
have access to Apple DEBUG symbols, just ignore this debug information.

Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
This commit is contained in:
Vitaly Cheptsov 2023-02-12 09:55:07 +03:00
parent 76d8185b5c
commit d230c91de9

View File

@ -119,7 +119,12 @@ PeCoffGetPdbPath (
// Verify the Debug Directory has a well-formed size.
//
if (DebugDir->Size % sizeof (*DebugEntries) != 0) {
DEBUG_RAISE ();
//
// Some Apple-made images contain a sum of EFI_IMAGE_DEBUG_DIRECTORY_ENTRY
// and EFI_IMAGE_DEBUG_CODEVIEW_MTOC_ENTRY sizes in DebugDir size.
// Since this violates the spec and nobody but Apple has access
// to the DEBUG symbols, just ignore this debug information.
//
return RETURN_UNSUPPORTED;
}
//