From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751417AbdJWDtm (ORCPT ); Sun, 22 Oct 2017 23:49:42 -0400 Received: from regular1.263xmail.com ([211.150.99.141]:45968 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751121AbdJWDtl (ORCPT ); Sun, 22 Oct 2017 23:49:41 -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, linux@armlinux.org.uk, ard.biesheuvel@linaro.org Cc: chris.zhong@rock-chips.com, Jeffy Chen , Ingo Molnar , linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] ARM: Remove .pad section when CONFIG_EFI_STUB enabled Date: Mon, 23 Oct 2017 11:48:57 +0800 Message-Id: <20171023034857.19435-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 Currently we are using the .pad section to ensure the zImage file size aligned to 8 bytes. But that is not needed when CONFIG_EFI_STUB enabled, as it would followed by a 512 bytes aligned .data section. Signed-off-by: Jeffy Chen --- Changes in v2: Remove .pad section when CONFIG_EFI_STUB enabled as Russell King suggested. 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..394b2bf5d28a 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 = .; @@ -91,6 +87,10 @@ SECTIONS . = ALIGN(512); } __pecoff_data_rawsize = . - ADDR(.data); +#else + /* 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); } #endif _edata = .; -- 2.11.0