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 04F401A1DF8 for ; Sun, 21 Aug 2016 20:09:08 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 21 Aug 2016 20:09:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,558,1464678000"; d="scan'208";a="869132922" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 21 Aug 2016 20:09:07 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 21 Aug 2016 20:09:06 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 21 Aug 2016 20:09:06 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.107]) with mapi id 14.03.0248.002; Mon, 22 Aug 2016 11:08:00 +0800 From: "Gao, Liming" To: Ard Biesheuvel CC: "edk2-devel@lists.01.org" , "Zhu, Yonghong" , "leif.lindholm@linaro.org" Thread-Topic: [PATCH] BaseTools/GenFv: allow TE/PE images with no .reloc section Thread-Index: AQHR+XIMpEwAnPPo1UaflzRGm/3WsaBP4yKA//+u5wCABLqv4A== Date: Mon, 22 Aug 2016 03:07:59 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155ED540@shsmsx102.ccr.corp.intel.com> References: <1471539628-6257-1-git-send-email-ard.biesheuvel@linaro.org> <4A89E2EF3DFEDB4C8BFDE51014F606A1155ED043@shsmsx102.ccr.corp.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/GenFv: allow TE/PE images with no .reloc section 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 03:09:08 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 QXJkOg0KICBJZiBQRSBpbWFnZSBoYXMgbm8gcmVsb2NhdGlvbiBzZWN0aW9uLCBhbmQgaGFzIG5v dCBzZXQgRUZJX0lNQUdFX0ZJTEVfUkVMT0NTX1NUUklQUEVELCBhZnRlciBpdCBpcyBjb252ZXJ0 ZWQgdG8gVEUgaW1hZ2UsIEdlbkZ3IHdpbGwgc2V0IGl0cyByZWxvY2F0aW9uIHNlY3Rpb24gVmly dHVhbEFkZHJlc3MgdG8gbm9uLXplcm8gYWRkcmVzcywgYW5kIGtlZXAgU2l6ZSB2YWx1ZSBhcyBa ZXJvLiBJZiBQRSBpbWFnZSBpcyB3aXRob3V0IHJlbG9jYXRpb24gc2VjdGlvbiwgYW5kIHNldCBF RklfSU1BR0VfRklMRV9SRUxPQ1NfU1RSSVBQRUQsIGFmdGVyIGl0IGlzIGNvbnZlcnRlZCB0byBU RSBpbWFnZSwgR2VuRncgd2lsbCBrZWVwIGl0cyByZWxvY2F0aW9uIHNlY3Rpb24gVkEgYW5kIFNp emUgYXMgemVyby4gVGhlbiwgQmFzZVBlQ29mZkxpYiBjYW4gYmFzZSBvbiBpdHMgcmVsb2NhdGlv biBzZWN0aW9uIGZpZWxkcyB0byBrbm93IGl0cyByZWxvY2F0aW9uIGF0dHJpYnV0ZS4gZWRrMiBN ZGVQa2cgQmFzZVBlQ29mZkxpYiBoYXMgYXBwbGllZCB0aGlzIHJ1bGUgdG8gZ2V0IF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KPiA+PiBvZiAlcyIsIEZp bGVOYW1lKTsNCj4gPj4gKyAgICAgICAgZnJlZSAoKFZPSUQgKikgTWVtb3J5SW1hZ2VQb2ludGVy KTsNCj4gPj4gKyAgICAgICAgcmV0dXJuIFN0YXR1czsNCj4gPj4gKyAgICAgIH0NCj4gPj4gKw0K PiA+PiArICAgICAgLy8NCj4gPj4gKyAgICAgIC8vIENvcHkgUmVsb2NhdGVkIGRhdGEgdG8gcmF3 IGltYWdlIGZpbGUuDQo+ID4+ICsgICAgICAvLw0KPiA+PiArICAgICAgU2VjdGlvbkhlYWRlciA9 IChFRklfSU1BR0VfU0VDVElPTl9IRUFERVIgKikgKA0KPiA+PiArICAgICAgICAgICAgICAgICAg ICAgICAgIChVSU5UTikgSW1nSGRyICsNCj4gPj4gKyAgICAgICAgICAgICAgICAgICAgICAgICBz aXplb2YgKFVJTlQzMikgKw0KPiA+PiArICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAo RUZJX0lNQUdFX0ZJTEVfSEVBREVSKSArDQo+ID4+ICsgICAgICAgICAgICAgICAgICAgICAgICAg SW1nSGRyLT5QZTMyLkZpbGVIZWFkZXIuU2l6ZU9mT3B0aW9uYWxIZWFkZXINCj4gPj4gKyAgICAg ICAgICAgICAgICAgICAgICAgICApOw0KPiA+PiArDQo+ID4+ICsgICAgICBmb3IgKEluZGV4ID0g MDsgSW5kZXggPCBJbWdIZHItPlBlMzIuRmlsZUhlYWRlci5OdW1iZXJPZlNlY3Rpb25zOw0KPiA+ PiBJbmRleCArKywgU2VjdGlvbkhlYWRlciArKykgew0KPiA+PiArICAgICAgICBDb3B5TWVtICgN Cj4gPj4gKyAgICAgICAgICAoVUlOVDggKikgQ3VycmVudFBlMzJTZWN0aW9uLlBlMzJTZWN0aW9u ICsgQ3VyU2VjSGRyU2l6ZSArDQo+ID4+IFNlY3Rpb25IZWFkZXItPlBvaW50ZXJUb1Jhd0RhdGEs DQo+ID4+ICsgICAgICAgICAgKFZPSUQqKS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