mirror of https://github.com/acidanthera/audk.git
Correctly skip debug entry.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2232 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
69a99cc635
commit
f92b6f195c
|
@ -391,7 +391,7 @@ PeCoffLoaderGetImageInfo (
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DebugDirectoryEntryFileOffset != 0) {
|
if (DebugDirectoryEntryFileOffset != 0) {
|
||||||
for (Index = 0; Index < DebugDirectoryEntry->Size; Index++) {
|
for (Index = 0; Index < DebugDirectoryEntry->Size; Index += Size) {
|
||||||
//
|
//
|
||||||
// Read next debug directory entry
|
// Read next debug directory entry
|
||||||
//
|
//
|
||||||
|
@ -406,9 +406,8 @@ PeCoffLoaderGetImageInfo (
|
||||||
ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ;
|
ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ;
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DebugEntry.Type == EFI_IMAGE_DEBUG_TYPE_CODEVIEW) {
|
if (DebugEntry.Type == EFI_IMAGE_DEBUG_TYPE_CODEVIEW) {
|
||||||
ImageContext->DebugDirectoryEntryRva = (UINT32) (DebugDirectoryEntryRva + Index * sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY));
|
ImageContext->DebugDirectoryEntryRva = (UINT32) (DebugDirectoryEntryRva + Index);
|
||||||
if (DebugEntry.RVA == 0 && DebugEntry.FileOffset != 0) {
|
if (DebugEntry.RVA == 0 && DebugEntry.FileOffset != 0) {
|
||||||
ImageContext->ImageSize += DebugEntry.SizeOfData;
|
ImageContext->ImageSize += DebugEntry.SizeOfData;
|
||||||
}
|
}
|
||||||
|
@ -480,7 +479,7 @@ PeCoffLoaderGetImageInfo (
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DebugDirectoryEntryFileOffset != 0) {
|
if (DebugDirectoryEntryFileOffset != 0) {
|
||||||
for (Index = 0; Index < DebugDirectoryEntry->Size; Index++) {
|
for (Index = 0; Index < DebugDirectoryEntry->Size; Index += Size) {
|
||||||
//
|
//
|
||||||
// Read next debug directory entry
|
// Read next debug directory entry
|
||||||
//
|
//
|
||||||
|
@ -497,7 +496,7 @@ PeCoffLoaderGetImageInfo (
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DebugEntry.Type == EFI_IMAGE_DEBUG_TYPE_CODEVIEW) {
|
if (DebugEntry.Type == EFI_IMAGE_DEBUG_TYPE_CODEVIEW) {
|
||||||
ImageContext->DebugDirectoryEntryRva = (UINT32) (DebugDirectoryEntryRva + Index * sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY));
|
ImageContext->DebugDirectoryEntryRva = (UINT32) (DebugDirectoryEntryRva + Index);
|
||||||
return RETURN_SUCCESS;
|
return RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue