summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/C/GenFw/GenFw.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2023-05-24 22:05:58 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-06-01 10:53:35 +0000
commitc15941a643e2e82bdf516a27ef7e3a15ebc2686c (patch)
tree0966e4b119b85f2331718e9005819fd63ba34e92 /BaseTools/Source/C/GenFw/GenFw.c
parentfdc6288f81f6e4cd20c75768d6e968467cbc07bf (diff)
downloadedk2-c15941a643e2e82bdf516a27ef7e3a15ebc2686c.tar.gz
edk2-c15941a643e2e82bdf516a27ef7e3a15ebc2686c.tar.bz2
edk2-c15941a643e2e82bdf516a27ef7e3a15ebc2686c.zip
BaseTools: switch from EFI_IMAGE_MACHINE_* to IMAGE_FILE_MACHINE_*
Use the newer versions of the machine #defines. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Chao Li <lichao@loongson.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
Diffstat (limited to 'BaseTools/Source/C/GenFw/GenFw.c')
-rw-r--r--BaseTools/Source/C/GenFw/GenFw.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c
index 0da25fd055..0289c8ef8a 100644
--- a/BaseTools/Source/C/GenFw/GenFw.c
+++ b/BaseTools/Source/C/GenFw/GenFw.c
@@ -2197,12 +2197,6 @@ Returns:
}
}
- if (PeHdr->Pe32.FileHeader.Machine == IMAGE_FILE_MACHINE_ARM) {
- // Some tools kick out IMAGE_FILE_MACHINE_ARM (0x1c0) vs IMAGE_FILE_MACHINE_ARMT (0x1c2)
- // so patch back to the official UEFI value.
- PeHdr->Pe32.FileHeader.Machine = IMAGE_FILE_MACHINE_ARMT;
- }
-
//
// Set new base address into image
//
@@ -3117,7 +3111,7 @@ Returns:
// Get Debug, Export and Resource EntryTable RVA address.
// Resource Directory entry need to review.
//
- if (FileHdr->Machine == EFI_IMAGE_MACHINE_IA32) {
+ if (FileHdr->Machine == IMAGE_FILE_MACHINE_I386) {
Optional32Hdr = (EFI_IMAGE_OPTIONAL_HEADER32 *) ((UINT8*) FileHdr + sizeof (EFI_IMAGE_FILE_HEADER));
SectionHeader = (EFI_IMAGE_SECTION_HEADER *) ((UINT8 *) Optional32Hdr + FileHdr->SizeOfOptionalHeader);
if (Optional32Hdr->NumberOfRvaAndSizes > EFI_IMAGE_DIRECTORY_ENTRY_EXPORT && \