]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/efi: set PE/COFF section alignment to 4 KB
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 10 Oct 2014 09:25:24 +0000 (11:25 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 5 Nov 2014 08:03:05 +0000 (09:03 +0100)
commit626ef82ed4bf519ddc61462b219f723532ed27a4
tree49f0983836e51ae3cc07ace02011e3766659ffae
parentfbf0620c1728ba48644524c51d5c44e33c77d5d3
arm64/efi: set PE/COFF section alignment to 4 KB

Position independent AArch64 code needs to be linked and loaded at the
same relative offset from a 4 KB boundary, or adrp/add and adrp/ldr
pairs will not work correctly. (This is how PC relative symbol
references with a 4 GB reach are emitted)

We need to declare this in the PE/COFF header, otherwise the PE/COFF
loader may load the Image and invoke the stub at an offset which
violates this rule.

Reviewed-by: Roy Franz <roy.franz@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
arch/arm64/kernel/head.S