From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4B3911A1DF8 for ; Mon, 22 Aug 2016 00:07:31 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP; 22 Aug 2016 00:07:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,558,1464678000"; d="scan'208";a="415111" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga005.fm.intel.com with ESMTP; 22 Aug 2016 00:07:30 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 22 Aug 2016 00:07:30 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 22 Aug 2016 00:07:30 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.116]) with mapi id 14.03.0248.002; Mon, 22 Aug 2016 15:07:29 +0800 From: "Gao, Liming" To: Ard Biesheuvel CC: edk2-devel-01 , "Zhu, Yonghong" , "Gao, Liming" Thread-Topic: [Patch] BaseTools PeCoffLib: Fix the issue to get RelocationsStripped from TE image Thread-Index: AQHR/ELMDuruquATHEuJFWaSwVRvbKBUjT5Q Date: Mon, 22 Aug 2016 07:07:28 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155ED73E@shsmsx102.ccr.corp.intel.com> References: <1471835341-25516-1-git-send-email-liming.gao@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools PeCoffLib: Fix the issue to get RelocationsStripped from TE image X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2016 07:07:31 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 QXJkOg0KICBUaGlzIGlzIGRvbmUgdG8gY29udmVydCBQRS9DT0ZGIGltYWdlIHRvIFRFIGltYWdl LiBURSBpbWFnZSBSZWxvY2F0aW9uIFZpcnR1YWxBZGRyZXNzIHdpbGwgYmUgc2V0IHRvIG5vbi16 ZXJvLiBZb3UgY2FuIGZpbmQgdGhlIGZvbGxvd2luZyBsb2dpYyBpbiBHZW5Gdy5jIGxpbmUgMjUx NS4gVGhlbiwgUGVDb2ZmTGliIGNhbiByZXN0b3JlIFJFTE9DU19TVFJJUFBFRCBmbGFnIGZyb20g VEUgaW1hZ2UuIA0KDQogIGlmICgoKFBlSGRyLT5QZTMyLkZpbGVIZWFkZXIuQ2hhcmFjdGVyaXN0 aWNzICYgRUZJX0lNQUdFX0ZJTEVfUkVMT0NTX1NUUklQUEVEKSA9PSAwKSAmJiBcDQogICAgKFRF SW1hZ2VIZWFkZXIuRGF0YURpcmVjdG9yeVtFRklfVEVfSU1BR0VfRElSRUNUT1JZX0VOVFJZX0JB U0VSRUxPQ10uVmlydHVhbEFkZHJlc3MgPT0gMCkgJiYgXA0KICAgIChURUltYWdlSGVhZGVyLkRh dGFEaXJlY3RvcnlbRUZJX1RFX0lNQUdFX0RJUkVDVE9SWV9FTlRSWV9CQVNFUkVMT0NdLlNpemUg PT0gMCkpIHsNCiAgICAgIC8vDQogICAgICAvLyBQZUltYWdlIGNhbiBiZSBsb2FkZWQgaW50byBt ZW1vcnksIGJ1dCBpdCBoYXMgbm8gcmVsb2NhdGlvbiBzZWN0aW9uLiANCiAgICAgIC8vIEZp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