]> git.baikalelectronics.ru Git - kernel.git/commit
efi/libstub/arm64: align PE/COFF sections to segment alignment
authorArd Biesheuvel <ardb@kernel.org>
Mon, 13 Apr 2020 15:55:18 +0000 (17:55 +0200)
committerWill Deacon <will@kernel.org>
Tue, 28 Apr 2020 16:36:52 +0000 (17:36 +0100)
commit90118623acdd1b38dc55c4b9aba4e5c587e76661
tree1e58cb403639d509472b0b3865c49b35b5c63e33
parent98cce08ad89434dbe1b8becb9dbbaee92cc9c5e2
efi/libstub/arm64: align PE/COFF sections to segment alignment

The arm64 kernel's segment alignment is fixed at 64 KB for any page
size, and relocatable kernels are able to fix up any misalignment of
the kernel image with respect to the 2 MB section alignment that is
mandated by the arm64 boot protocol.

Let's increase the PE/COFF section alignment to the same value, so that
kernels loaded by the UEFI PE/COFF loader are guaranteed to end up at
an address that doesn't require any reallocation to be done if the
kernel is relocatable.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20200413155521.24698-6-ardb@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/efi-header.S
arch/arm64/kernel/vmlinux.lds.S