Use a 64-bit Optional Header when a 64-bit image is detected
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 Sep 2006 18:49:56 +0000 (18:49 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 Sep 2006 18:49:56 +0000 (18:49 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1562 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/TianoTools/GenAcpiTable/GenAcpiTable.c

index 583c742..7a413ea 100644 (file)
@@ -196,6 +196,7 @@ Returns:
   UINT32                      PESigOffset;\r
   EFI_IMAGE_FILE_HEADER       FileHeader;\r
   EFI_IMAGE_OPTIONAL_HEADER32 OptionalHeader32;\r
+  EFI_IMAGE_OPTIONAL_HEADER64 OptionalHeader64;\r
   EFI_IMAGE_SECTION_HEADER    SectionHeader;\r
   UINT8                       *Buffer;\r
   long                        SaveFilePosition;\r
@@ -266,7 +267,7 @@ Returns:
       goto Finish;\r
     }\r
 \r
-    if (fread (&OptionalHeader32, sizeof (EFI_IMAGE_OPTIONAL_HEADER64), 1, InFptr) != 1) {\r
+    if (fread (&OptionalHeader64, sizeof (EFI_IMAGE_OPTIONAL_HEADER64), 1, InFptr) != 1) {\r
       Error (NULL, 0, 0, InFileName, "failed to read optional header from input file");\r
       goto Finish;\r
     }\r