From patchwork Wed Oct 18 05:01:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffy Chen X-Patchwork-Id: 10013463 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 E3C2D60211 for ; Wed, 18 Oct 2017 05:01:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D936828A9E for ; Wed, 18 Oct 2017 05:01:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCCA028AA0; Wed, 18 Oct 2017 05:01:43 +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 5828E28A9E for ; Wed, 18 Oct 2017 05:01:42 +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=98rnDeZ/Y1yexv5ePR1u/AVB/dzoUQ85Xl4bMZV1Iak=; b=A1H YnQXIkEg5MdgJh+uOD4r9v77nUjnNfQAiGY+zb854OOPxoqFON6X7sH+pgMRp+WeQn3uKtabJL07i IKuejkEDkdq1jcW9S6pK64owbBoeLcCaLc8kIkZyxTOnRjt/ngUNRzYqati+pIQp3j/opKYYLflSk b1CcQ+pVsAdFRqlnroTcSdtHj4U93Sn1bE+5OqsNtkhUQ4tyoL2+wc2cNr9gNuwicFvGHPa4LF23o lCQUfNcWKfK/Us0Je79TVdZ3/fPSHHahGx8r26C89FfdY2HTVKz0mH4Xf70zr4oODIP2UkAMJoaM0 fRMmvf2dGpQco11DB7ndTwj2Qw3pJ3w==; 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 1e4gUA-0007FZ-8f; Wed, 18 Oct 2017 05:01:42 +0000 Received: from regular1.263xmail.com ([211.150.99.138]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e4gU5-0006Fu-Tw for linux-arm-kernel@lists.infradead.org; Wed, 18 Oct 2017 05:01:39 +0000 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.13]) by regular1.263xmail.com (Postfix) with ESMTP id A947579CE; Wed, 18 Oct 2017 13:01:10 +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 B9E693A3; Wed, 18 Oct 2017 13:01:09 +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 11802KYBLWA; Wed, 18 Oct 2017 13:01:11 +0800 (CST) From: Jeffy Chen To: linux-kernel@vger.kernel.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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171017_220138_156125_22F9C0B9 X-CRM114-Status: UNSURE ( 7.97 ) 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: Ard Biesheuvel , Jeffy Chen , Russell King , chris.zhong@rock-chips.com, Ingo Molnar , linux-arm-kernel@lists.infradead.org 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 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 Tested-by: Chris Zhong --- 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);