\r
memcpy (CurrentPe32Section.Pe32Section + 1, (VOID *) MemoryImagePointerAligned, (UINT32) ImageSize);\r
\r
+ //\r
+ // If a map file was selected output mapping information for any file that\r
+ // was rebased.\r
+ //\r
+ if (MapFile != NULL) {\r
+ fprintf (MapFile, "PE32 File: %s Base:%08lx", FileGuidString, BaseAddress);\r
+ if (ImageContext.PdbPointer != NULL) {\r
+ fprintf (MapFile, " FileName: %s", ImageContext.PdbPointer);\r
+ }\r
+ fprintf (MapFile, "\n");\r
+ }\r
+\r
free ((VOID *) MemoryImagePointer);\r
\r
//\r
GetLength (CurrentPe32Section.Pe32Section->CommonHeader.Size) - sizeof (EFI_PE32_SECTION) -\r
sizeof (EFI_TE_IMAGE_HEADER)\r
);\r
+\r
+ //\r
+ // If a map file was selected output mapping information for any file that\r
+ // was rebased.\r
+ //\r
+ if (MapFile != NULL) {\r
+ fprintf (MapFile, "TE File: %s Base:%08lx", FileGuidString, BaseAddress);\r
+ if (ImageContext.PdbPointer != NULL) {\r
+ fprintf (MapFile, " FileName: %s", ImageContext.PdbPointer);\r
+ }\r
+ fprintf (MapFile, "\n");\r
+ }\r
+\r
free ((VOID *) MemoryImagePointer);\r
free (TEBuffer);\r
if (FfsFile->Attributes & FFS_ATTRIB_TAIL_PRESENT) {\r
return EFI_NOT_FOUND;\r
}\r
}\r
-\r
- //\r
- // If a map file was selected output mapping information for any file that\r
- // was rebased.\r
- //\r
- if (MapFile != NULL) {\r
- fprintf (MapFile, "File: %s Base:%08lx", FileGuidString, BaseAddress);\r
- if (ImageContext.PdbPointer != NULL) {\r
- fprintf (MapFile, " FileName: %s", ImageContext.PdbPointer);\r
- }\r
- fprintf (MapFile, "\n");\r
- }\r
\r
return EFI_SUCCESS;\r
}\r