From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758967AbdJRGT5 (ORCPT ); Wed, 18 Oct 2017 02:19:57 -0400 Received: from regular1.263xmail.com ([211.150.99.141]:56082 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758491AbdJRGTz (ORCPT ); Wed, 18 Oct 2017 02:19:55 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-RL-SENDER: zyw@rock-chips.com X-FST-TO: linux-arm-kernel@lists.infradead.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: zyw@rock-chips.com X-UNIQUE-TAG: <53b29b087f2678d017654593fc8c921c> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH] ARM: Fix zImage file size not aligned with CONFIG_EFI_STUB enabled To: Jeffy Chen , linux-kernel@vger.kernel.org Cc: chris.zhong@rock-chips.com, Ingo Molnar , Ard Biesheuvel , Russell King , linux-arm-kernel@lists.infradead.org References: <20171018050108.10352-1-jeffy.chen@rock-chips.com> From: Chris Zhong Message-ID: Date: Wed, 18 Oct 2017 14:19:30 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171018050108.10352-1-jeffy.chen@rock-chips.com> Content-Type: text/plain; charset=gb18030; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tested-by: Chris Zhong On Wednesday, October 18, 2017 01:01 PM, Jeffy Chen wrote: > The zImage file size should be aligned. > > Fixes: e4bae4d0b5f3 ("arm/efi: Split zImage code and data into separate PE/COFF sections") > Signed-off-by: Jeffy Chen > --- > > arch/arm/boot/compressed/vmlinux.lds.S | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/arm/boot/compressed/vmlinux.lds.S b/arch/arm/boot/compressed/vmlinux.lds.S > index b38dcef90756..1636fa259577 100644 > --- a/arch/arm/boot/compressed/vmlinux.lds.S > +++ b/arch/arm/boot/compressed/vmlinux.lds.S > @@ -70,10 +70,6 @@ SECTIONS > .got : { *(.got) } > _got_end = .; > > - /* ensure the zImage file size is always a multiple of 64 bits */ > - /* (without a dummy byte, ld just ignores the empty section) */ > - .pad : { BYTE(0); . = ALIGN(8); } > - > #ifdef CONFIG_EFI_STUB > .data : ALIGN(4096) { > __pecoff_data_start = .; > @@ -93,6 +89,10 @@ SECTIONS > __pecoff_data_rawsize = . - ADDR(.data); > #endif > > + /* ensure the zImage file size is always a multiple of 64 bits */ > + /* (without a dummy byte, ld just ignores the empty section) */ > + .pad : { BYTE(0); . = ALIGN(8); } > + > _edata = .; > > _magic_sig = ZIMAGE_MAGIC(0x016f2818); -- Chris Zhong