]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: avoid R_AARCH64_ABS64 relocations for Image header fields
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Sat, 26 Dec 2015 12:48:02 +0000 (13:48 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 24 Feb 2016 14:57:25 +0000 (14:57 +0000)
commit486d7d1ad3b74465005c865fa9779d14fd6251a0
tree88cfed6d43d89bb5e21c7e8ea9c32e54baa88fac
parent15d9bb42246c40e6c9d8b6cb31bd7be9fb421e10
arm64: avoid R_AARCH64_ABS64 relocations for Image header fields

Unfortunately, the current way of using the linker to emit build time
constants into the Image header will no longer work once we switch to
the use of PIE executables. The reason is that such constants are emitted
into the binary using R_AARCH64_ABS64 relocations, which are resolved at
runtime, not at build time, and the places targeted by those relocations
will contain zeroes before that.

So refactor the endian swapping linker script constant generation code so
that it emits the upper and lower 32-bit words separately.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/assembler.h
arch/arm64/kernel/head.S
arch/arm64/kernel/image.h