From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.4719.1682052347043512372 for ; Thu, 20 Apr 2023 21:45:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TomJZ+RJ; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682052346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UHaPGImG3CILtL7mMHV0uLFqQiV2lr7s0CT++7QqtQE=; b=TomJZ+RJGIJCgdWdcIqYM70wmlhsxoJAn5DvFXS/8Z5J+i9JYFf/aI2VFLBSJ9h2r+1wbE lHl1nv/FS8/eusDS8ClRIQBqZKKrvshQx6dg0lmzWi/XFrwJD4TyzVXlLuL6HcdMwD9I5z zEI99+8iTihBxFUQbXKtZBk6WyYJbc4= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-625-xs9tJMhXPVyvLhHV4OMypQ-1; Fri, 21 Apr 2023 00:45:43 -0400 X-MC-Unique: xs9tJMhXPVyvLhHV4OMypQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2D1953822DEF; Fri, 21 Apr 2023 04:45:42 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED75E2026D16; Fri, 21 Apr 2023 04:45:41 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 7A3BD18003BC; Fri, 21 Apr 2023 06:45:35 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Yuwei Chen , Oliver Steffen , Bob Feng , =?UTF-8?q?Marvin=20H=C3=A4user?= , Daniel Schaefer , Chao Li , Dongyan Qian , Michael D Kinney , Pawel Polawski , Baoqi Zhang , Leif Lindholm , Rebecca Cran , Zhiguang Liu , Sunil V L , Ard Biesheuvel , Liming Gao , Gerd Hoffmann Subject: [PATCH v5 07/10] BaseTools: drop IMAGE_FILE_MACHINE_ARM hacks Date: Fri, 21 Apr 2023 06:45:32 +0200 Message-Id: <20230421044535.4030762-8-kraxel@redhat.com> In-Reply-To: <20230421044535.4030762-1-kraxel@redhat.com> References: <20230421044535.4030762-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 --- 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