Received: from list by lists.gnu.org with archive (Exim 4.71) id 1hLZbr-0008Kh-Gq for mharc-grub-devel@gnu.org; Tue, 30 Apr 2019 16:44:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLZbo-0008I8-TB for grub-devel@gnu.org; Tue, 30 Apr 2019 16:44:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLZbk-00073a-Vo for grub-devel@gnu.org; Tue, 30 Apr 2019 16:44:12 -0400 Received: from zulu616.server4you.de ([188.138.100.120]:52374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLZbh-0006yg-9i for grub-devel@gnu.org; Tue, 30 Apr 2019 16:44:07 -0400 Received: from server.alex.local (x4d0924b7.dyn.telefonica.de [77.9.36.183]) by csgraf.de (Postfix) with ESMTPSA id 2F7863900587; Tue, 30 Apr 2019 22:43:59 +0200 (CEST) From: Alexander Graf To: grub-devel@gnu.org Cc: Daniel Kiper , Leif Lindholm , Heinrich Schuchardt , Julien ROBIN , Steve McIntyre , Colin Watson Subject: [PATCH v2 2/2] arm: Align section alignment with manual relocation offset code Date: Tue, 30 Apr 2019 22:43:57 +0200 Message-Id: <20190430204357.25059-3-agraf@csgraf.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190430204357.25059-1-agraf@csgraf.de> References: <20190430204357.25059-1-agraf@csgraf.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 188.138.100.120 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: Tue, 30 Apr 2019 20:44:14 -0000 The arm relocation code has a manual special case for EFI binaries to add the natural alignment to its own relocation awareness. Since commit a51f953f4ee87 ("mkimage: Align efi sections on 4k boundary") we changed that alignment from 0x400 to 0x1000 bytes. Reflect the change in that branch that we forgot as well. This fixes running 32bit arm grub efi binaries for me again. Fixes: a51f953f4ee87 ("mkimage: Align efi sections on 4k boundary") Reported-by: Heinrich Schuchardt Reported-by: Steve McIntyre Signed-off-by: Alexander Graf Reviewed-by: Daniel Kiper Tested-by: Julien ROBIN --- util/grub-mkimagexx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c index 470fbf4dd..bc087c2b5 100644 --- a/util/grub-mkimagexx.c +++ b/util/grub-mkimagexx.c @@ -1137,7 +1137,7 @@ SUFFIX (relocate_addrs) (Elf_Ehdr *e, struct section_metadata *smd, (int) sym_addr, (int) sym_addr); /* Data will be naturally aligned */ if (image_target->id == IMAGE_EFI) - sym_addr += 0x400; + sym_addr += GRUB_PE32_SECTION_ALIGNMENT; *target = grub_host_to_target32 (grub_target_to_host32 (*target) + sym_addr); } break; -- 2.16.4