From patchwork Mon Oct 23 03:48:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffy Chen X-Patchwork-Id: 10021937 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5064C60381 for ; Mon, 23 Oct 2017 03:50:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FC9F28726 for ; Mon, 23 Oct 2017 03:50:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 38A7228712; Mon, 23 Oct 2017 03:50:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CE27C28794 for ; Mon, 23 Oct 2017 03:50:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=45vaJR4O98ZDXI0MYUaGrgwaKzGgH6SAvy8QIxew0Dg=; b=DdB zR7oHWypHMobJaxVgvSBlFAKmx+ccDNCmvJsMFcmLT4Ibq0EQXWuFLaUK3pgxLWI0462hV+4YdhC/ j+COSy63sH65kQqkun4ecBEaRB5w1soU92UMp0wCGpJUIhvVrSZccygv3vcxgwHNeB4UhhPQTv1Wj +2FF1BXgPwlB5OVyrFMNl928aj2+wbugMk2mOPP87xfWaZEeJDw0vqya1/IkQGUaj5WsA01EriaGs YCp436Gya21JBPM40DETp/WYYLwjFMRj84Bj5QQ5EuUGdsPJb9+SicJXIsFri8Xj/RCgWJBDTPOec aTkyQVjUmCpJDWt+2gGO26p5SrMWiaA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e6Tke-0002DY-Tr; Mon, 23 Oct 2017 03:50:08 +0000 Received: from regular1.263xmail.com ([211.150.99.141]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e6Tka-0001Vr-Ly for linux-arm-kernel@lists.infradead.org; Mon, 23 Oct 2017 03:50:06 +0000 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.130]) by regular1.263xmail.com (Postfix) with ESMTP id BCD04A7; Mon, 23 Oct 2017 11:49:38 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 6546E359; Mon, 23 Oct 2017 11:49:01 +0800 (CST) 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-SENDER: cjf@rock-chips.com X-DNS-TYPE: 0 Received: from localhost (unknown [103.29.142.67]) by smtp.263.net (Postfix) whith ESMTP id 26708JUG5LP; Mon, 23 Oct 2017 11:49:17 +0800 (CST) From: Jeffy Chen To: linux-kernel@vger.kernel.org, linux@armlinux.org.uk, ard.biesheuvel@linaro.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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171022_205004_963113_D1C66157 X-CRM114-Status: UNSURE ( 7.88 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jeffy Chen , Ingo Molnar , linux-arm-kernel@lists.infradead.org, chris.zhong@rock-chips.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 = .;