Received: from list by lists.gnu.org with archive (Exim 4.71) id 1hKWEX-0003vf-PZ for mharc-grub-devel@gnu.org; Sat, 27 Apr 2019 18:55:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKWEV-0003oO-Cn for grub-devel@gnu.org; Sat, 27 Apr 2019 18:55:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hKWET-0004Wt-NZ for grub-devel@gnu.org; Sat, 27 Apr 2019 18:55:47 -0400 Received: from zulu616.server4you.de ([188.138.100.120]:49370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKWET-0004W6-HN for grub-devel@gnu.org; Sat, 27 Apr 2019 18:55:45 -0400 Received: from server.alex.local (x5f7241a8.dyn.telefonica.de [95.114.65.168]) by csgraf.de (Postfix) with ESMTPSA id 667FF390034F; Sun, 28 Apr 2019 00:55:42 +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] arm: Align section alignment with manual relocation offset code Date: Sun, 28 Apr 2019 00:55:42 +0200 Message-Id: <20190427225542.15050-1-agraf@csgraf.de> X-Mailer: git-send-email 2.16.4 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: Sat, 27 Apr 2019 22:55:48 -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 --- 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 a79034e7b..2059890c3 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