From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1gmzzS-0008Vs-WA for mharc-grub-devel@gnu.org; Fri, 25 Jan 2019 06:49:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmzzQ-0008U4-Ra for grub-devel@gnu.org; Fri, 25 Jan 2019 06:49:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmzzP-0004HS-SK for grub-devel@gnu.org; Fri, 25 Jan 2019 06:49:40 -0500 Received: from mx2.suse.de ([195.135.220.15]:52248 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gmzzP-0004Bp-Jj for grub-devel@gnu.org; Fri, 25 Jan 2019 06:49:39 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D8CF9ADF5; Fri, 25 Jan 2019 11:49:28 +0000 (UTC) From: Alexander Graf To: grub-devel@gnu.org Cc: Daniel Kiper , Leif Lindholm , Peter Jones , Jon Masters Subject: [PATCH v5 1/3] mkimage: Use EFI32_HEADER_SIZE define in arm-efi case Date: Fri, 25 Jan 2019 12:45:14 +0100 Message-Id: <20190125114516.12127-2-agraf@suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20190125114516.12127-1-agraf@suse.de> References: <20190125114516.12127-1-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2019 11:49:42 -0000 The efi-arm case was defining its own header size calculation, even though it's 100% identical to the common EFI32_HEADER_SIZE definition. So let's clean it up to use the common define. Signed-off-by: Alexander Graf --- util/mkimage.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/util/mkimage.c b/util/mkimage.c index 353bb1098..16af12e0c 100644 --- a/util/mkimage.c +++ b/util/mkimage.c @@ -602,12 +602,7 @@ static const struct grub_install_image_target_desc image_targets[] = .decompressor_uncompressed_size = TARGET_NO_FIELD, .decompressor_uncompressed_addr = TARGET_NO_FIELD, .section_align = GRUB_PE32_SECTION_ALIGNMENT, - .vaddr_offset = ALIGN_UP (GRUB_PE32_MSDOS_STUB_SIZE - + GRUB_PE32_SIGNATURE_SIZE - + sizeof (struct grub_pe32_coff_header) - + sizeof (struct grub_pe32_optional_header) - + 4 * sizeof (struct grub_pe32_section_table), - GRUB_PE32_SECTION_ALIGNMENT), + .vaddr_offset = EFI32_HEADER_SIZE, .pe_target = GRUB_PE32_MACHINE_ARMTHUMB_MIXED, .elf_target = EM_ARM, }, -- 2.12.3