From patchwork Mon Jan 14 15:27:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 155543 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3798464jaa; Mon, 14 Jan 2019 07:43:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN4QiFH1QfjsYJtmOAT0xXW2crLFo2g/Bb9kDcJIEAbuguhXpQfS5s2kPjcOTiaW6VqfAWsy X-Received: by 2002:a1c:a6c2:: with SMTP id p185mr11233080wme.133.1547480613217; Mon, 14 Jan 2019 07:43:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547480613; cv=none; d=google.com; s=arc-20160816; b=IMXntmnO+y5o824726mXr/jQyN1Mt0fyO+TuP/cO36Vm6sVQd7qZaz6gFbOibZdU4u Ns/mKAkjMXp5Hsgh1QOhf/qMGWlOCo6s5hksJWYzddQe+XefqkAraMhZ3U+qKP1JtfQy JmsT+0CrkN4g7LS3jXKQl/Ynwotu3YmopAOxkaKy0egLGPVuOJJbEIhpYWe6nmxkr2mX NrUCIijYIVFXlVgdjav+QJdjsggzeMyHH9JFgGuW9cpDuHzDEO+ruqy4/jiQbsdaUl6R 0BOtSHofWGRDwKbVkZcVpeFbV/eCjj8YC+rnrzpdmD2ORue4uD0t94e1zRERvg6rQPVE i2Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :to:from; bh=Q5DLmtv+BQp+Nh7ttRu6LbFPakp7vNCF7NTL509/1ig=; b=N4zYgdYsSZLHO3tizCKeO4MnEXuHOuvRPS72dYM8wdBMOVCsUJfz+rRcqwXtRDybG2 zAA0y1t3mzpw3Ed7iOzmPg4az9L1OKLo9MHCWNcYOnXmEhh7lFitk3O7oz5wy4X1xIOd ysxBLZU5flTo32AOXOogyLaKlZjgL+yTGALe2WgRmB85YIbpmfSVly+HkH6Y+AdiHeTF 1r1yjkcdDloxG1BFOIVTNlk38JRkcCZN/06RLZr8VM7Hh7DRaqeNwYiQ2KfgeITWa+34 gSfr/tcSL4DpOp0XB093DfPIvxVZOXcSApE1S8u2b7+6dPAKaK7StVbn4K6jpGRMtKRs UORg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="grub-devel-bounces+patch=linaro.org@gnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r13si7801865wrj.11.2019.01.14.07.43.32 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 14 Jan 2019 07:43:33 -0800 (PST) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="grub-devel-bounces+patch=linaro.org@gnu.org" Received: from localhost ([127.0.0.1]:57045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gj4Oi-0000tE-88 for patch@linaro.org; Mon, 14 Jan 2019 10:43:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gj499-0003N1-CA for grub-devel@gnu.org; Mon, 14 Jan 2019 10:27:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gj497-0008Az-3S for grub-devel@gnu.org; Mon, 14 Jan 2019 10:27:27 -0500 Received: from mx2.suse.de ([195.135.220.15]:36450 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 1gj496-00089d-TX for grub-devel@gnu.org; Mon, 14 Jan 2019 10:27:25 -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 C3B15AEE5; Mon, 14 Jan 2019 15:27:20 +0000 (UTC) From: Alexander Graf To: grub-devel@gnu.org Subject: [PATCH v3 2/4] mkimage: Use EFI32_HEADER_SIZE define in arm-efi case Date: Mon, 14 Jan 2019 16:27:16 +0100 Message-Id: <20190114152718.60629-3-agraf@suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20190114152718.60629-1-agraf@suse.de> References: <20190114152718.60629-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: , Reply-To: The development of GNU GRUB Cc: Jon Masters , Daniel Kiper , Leif Lindholm , Ard Biesheuvel MIME-Version: 1.0 Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: "Grub-devel" 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(-) -- 2.12.3 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel Reviewed-by: Daniel Kiper diff --git a/util/mkimage.c b/util/mkimage.c index 88b991764..a670db456 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, },