arm: Align section alignment with manual relocation offset code

The arm relocation code has a manual special case for EFI binaries to
add the natural alignment to its own relocation awareness.

Since commit a51f953f4e ("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: a51f953f4e ("mkimage: Align efi sections on 4k boundary")
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reported-by: Steve McIntyre <steve@einval.com>
Signed-off-by: Alexander Graf <agraf@csgraf.de>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Tested-by: Julien ROBIN <julien.robin28@free.fr>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Alexander Graf 2019-04-30 22:43:57 +02:00 committed by Vincent Batts
parent 497438f0f5
commit acb3cd33f1
1 changed files with 1 additions and 1 deletions

View File

@ -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;