OSDN Git Service

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)
commit76085aff29f585139a37a10ea0a7daa63f70872c
tree1e58cb403639d509472b0b3865c49b35b5c63e33
parentf4be140fa33f9c9ba36374a52e1c317f0ba17089
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