From nobody Thu Dec 26 13:21:58 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1503381546249499.6579976189413; Mon, 21 Aug 2017 22:59:06 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 81A9621E49BC9; Mon, 21 Aug 2017 22:56:31 -0700 (PDT) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A554F21E49BA7 for ; Mon, 21 Aug 2017 22:56:29 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Aug 2017 22:59:01 -0700 Received: from shwde7172.ccr.corp.intel.com ([10.239.9.14]) by fmsmga005.fm.intel.com with ESMTP; 21 Aug 2017 22:59:00 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,410,1498546800"; d="scan'208";a="142445805" From: Liming Gao To: edk2-devel@lists.01.org Date: Tue, 22 Aug 2017 13:58:57 +0800 Message-Id: <1503381537-6048-1-git-send-email-liming.gao@intel.com> X-Mailer: git-send-email 2.8.0.windows.1 Subject: [edk2] [Patch] BaseTools: Roll back GenFw Change to keep unknown field in RSDS debug entry X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" https://lists.01.org/pipermail/edk2-devel/2017-August/013488.html These fields are actually a GUID and DWORD respectively: the GUID identifies the PDB to make it possible to verify that a given PDB matches the PE file, and the DWORD is the "age" of the PDB which is simply a helper value that is incremented by 1 by the linker every time the file is remade. Wiping the GUID will cause PDB parsers (such as the MS DIA SDK that IDA and most other tools use) to treat the PDB as a mismatch and refuse to load it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao --- BaseTools/Source/C/GenFw/GenFw.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/Ge= nFw.c index af60c92..33ba917 100644 --- a/BaseTools/Source/C/GenFw/GenFw.c +++ b/BaseTools/Source/C/GenFw/GenFw.c @@ -2903,13 +2903,7 @@ Returns: } if (DebugEntry->Type =3D=3D EFI_IMAGE_DEBUG_TYPE_CODEVIEW) { RsdsEntry =3D (EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY *) (FileBuffer = + DebugEntry->FileOffset); - if (RsdsEntry->Signature =3D=3D CODEVIEW_SIGNATURE_RSDS) { - RsdsEntry->Unknown =3D 0; - RsdsEntry->Unknown2 =3D 0; - RsdsEntry->Unknown3 =3D 0; - RsdsEntry->Unknown4 =3D 0; - RsdsEntry->Unknown5 =3D 0; - } else if (RsdsEntry->Signature =3D=3D CODEVIEW_SIGNATURE_MTOC) { + if (RsdsEntry->Signature =3D=3D CODEVIEW_SIGNATURE_MTOC) { // MTOC sets DebugDirectoryEntrySize to size of the .debug secti= on, so fix it. if (!ZeroDebugFlag) { if (Optional32Hdr->Magic =3D=3D EFI_IMAGE_NT_OPTIONAL_HDR32_MA= GIC) { --=20 2.8.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel