From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964817AbdJRFBT (ORCPT ); Wed, 18 Oct 2017 01:01:19 -0400 Received: from regular1.263xmail.com ([211.150.99.138]:60233 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932717AbdJRFBS (ORCPT ); Wed, 18 Oct 2017 01:01:18 -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: jeffy.chen@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Jeffy Chen To: linux-kernel@vger.kernel.org Cc: chris.zhong@rock-chips.com, Jeffy Chen , Ingo Molnar , Ard Biesheuvel , Russell King , linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: Fix zImage file size not aligned with CONFIG_EFI_STUB enabled Date: Wed, 18 Oct 2017 13:01:07 +0800 Message-Id: <20171018050108.10352-1-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.11.0