]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fixed issue with new MAP file feature a fprintf was using a pointer to the .PDB file...
authorajfish <ajfish@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 11 Aug 2006 18:08:43 +0000 (18:08 +0000)
committerajfish <ajfish@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 11 Aug 2006 18:08:43 +0000 (18:08 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1241 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/TianoTools/PeiRebase/PeiRebaseExe.c

index cc07fa06bb98aa2b2f0fc217af961aea1f6d9a2a..fac6ebe14d7d8dafae87125d8bd3b5a63f6fe64c 100644 (file)
@@ -706,6 +706,18 @@ Returns:
 \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
@@ -929,6 +941,19 @@ Returns:
       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
@@ -972,18 +997,6 @@ Returns:
       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