[edk2-devel] [PATCH v5 07/10] BaseTools: drop IMAGE_FILE_MACHINE_ARM hacks

Gerd Hoffmann kraxel at redhat.com
Fri Apr 21 04:45:32 UTC 2023


The #define for IMAGE_FILE_MACHINE_ARM is not present in MdePkg,
this looks like a relic not used any more.  Remove.

Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
 BaseTools/Source/C/Common/BasePeCoff.c | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/BaseTools/Source/C/Common/BasePeCoff.c b/BaseTools/Source/C/Common/BasePeCoff.c
index b8bfb7b58b91..0172370174b6 100644
--- a/BaseTools/Source/C/Common/BasePeCoff.c
+++ b/BaseTools/Source/C/Common/BasePeCoff.c
@@ -176,25 +176,10 @@ PeCoffLoaderCheckImageType (
       ImageContext->Machine != EFI_IMAGE_MACHINE_AARCH64 && \
       ImageContext->Machine != EFI_IMAGE_MACHINE_RISCV64 && \
       ImageContext->Machine != EFI_IMAGE_MACHINE_LOONGARCH64) {
-    if (ImageContext->Machine == IMAGE_FILE_MACHINE_ARM) {
-      //
-      // There are two types of ARM images. Pure ARM and ARM/Thumb.
-      // If we see the ARM say it is the ARM/Thumb so there is only
-      // a single machine type we need to check for ARM.
-      //
-      ImageContext->Machine = EFI_IMAGE_MACHINE_ARMT;
-      if (ImageContext->IsTeImage == FALSE) {
-        PeHdr->Pe32.FileHeader.Machine = ImageContext->Machine;
-      } else {
-        TeHdr->Machine = ImageContext->Machine;
-      }
-
-    } else {
-      //
-      // unsupported PeImage machine type
-      //
-      return RETURN_UNSUPPORTED;
-    }
+    //
+    // unsupported PeImage machine type
+    //
+    return RETURN_UNSUPPORTED;
   }
 
   //
-- 
2.40.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103346): https://edk2.groups.io/g/devel/message/103346
Mute This Topic: https://groups.io/mt/98404599/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list