X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FSource%2FTianoTools%2FPeiRebase%2FPeiRebaseExe.c;fp=Tools%2FSource%2FTianoTools%2FPeiRebase%2FPeiRebaseExe.c;h=fac6ebe14d7d8dafae87125d8bd3b5a63f6fe64c;hp=cc07fa06bb98aa2b2f0fc217af961aea1f6d9a2a;hb=396974d645ad71a8e465491298b252df5cae3c38;hpb=317f832ef8bcf89c59e2e6cc9484989649022477 diff --git a/Tools/Source/TianoTools/PeiRebase/PeiRebaseExe.c b/Tools/Source/TianoTools/PeiRebase/PeiRebaseExe.c index cc07fa06bb..fac6ebe14d 100644 --- a/Tools/Source/TianoTools/PeiRebase/PeiRebaseExe.c +++ b/Tools/Source/TianoTools/PeiRebase/PeiRebaseExe.c @@ -706,6 +706,18 @@ Returns: memcpy (CurrentPe32Section.Pe32Section + 1, (VOID *) MemoryImagePointerAligned, (UINT32) ImageSize); + // + // If a map file was selected output mapping information for any file that + // was rebased. + // + if (MapFile != NULL) { + fprintf (MapFile, "PE32 File: %s Base:%08lx", FileGuidString, BaseAddress); + if (ImageContext.PdbPointer != NULL) { + fprintf (MapFile, " FileName: %s", ImageContext.PdbPointer); + } + fprintf (MapFile, "\n"); + } + free ((VOID *) MemoryImagePointer); // @@ -929,6 +941,19 @@ Returns: GetLength (CurrentPe32Section.Pe32Section->CommonHeader.Size) - sizeof (EFI_PE32_SECTION) - sizeof (EFI_TE_IMAGE_HEADER) ); + + // + // If a map file was selected output mapping information for any file that + // was rebased. + // + if (MapFile != NULL) { + fprintf (MapFile, "TE File: %s Base:%08lx", FileGuidString, BaseAddress); + if (ImageContext.PdbPointer != NULL) { + fprintf (MapFile, " FileName: %s", ImageContext.PdbPointer); + } + fprintf (MapFile, "\n"); + } + free ((VOID *) MemoryImagePointer); free (TEBuffer); if (FfsFile->Attributes & FFS_ATTRIB_TAIL_PRESENT) { @@ -972,18 +997,6 @@ Returns: return EFI_NOT_FOUND; } } - - // - // If a map file was selected output mapping information for any file that - // was rebased. - // - if (MapFile != NULL) { - fprintf (MapFile, "File: %s Base:%08lx", FileGuidString, BaseAddress); - if (ImageContext.PdbPointer != NULL) { - fprintf (MapFile, " FileName: %s", ImageContext.PdbPointer); - } - fprintf (MapFile, "\n"); - } return EFI_SUCCESS; }