summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/efi-entry.S
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-12-26 12:46:40 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2016-02-24 14:57:25 +0000
commit2bf31a4a05f5b00f37d65ba029d36a0230286cb7 (patch)
treef11b8cd642f42576ea1928ae0625d128c53f99a5 /arch/arm64/kernel/efi-entry.S
parent6ad1fe5d9077a1ab40bf74b61994d2e770b00b14 (diff)
arm64: avoid dynamic relocations in early boot code
Before implementing KASLR for arm64 by building a self-relocating PIE executable, we have to ensure that values we use before the relocation routine is executed are not subject to dynamic relocation themselves. This applies not only to virtual addresses, but also to values that are supplied by the linker at build time and relocated using R_AARCH64_ABS64 relocations. So instead, use assemble time constants, or force the use of static relocations by folding the constants into the instructions. Reviewed-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/efi-entry.S')
-rw-r--r--arch/arm64/kernel/efi-entry.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/efi-entry.S b/arch/arm64/kernel/efi-entry.S
index a773db92908b..f82036e02485 100644
--- a/arch/arm64/kernel/efi-entry.S
+++ b/arch/arm64/kernel/efi-entry.S
@@ -61,7 +61,7 @@ ENTRY(entry)
*/
mov x20, x0 // DTB address
ldr x0, [sp, #16] // relocated _text address
- ldr x21, =stext_offset
+ movz x21, #:abs_g0:stext_offset
add x21, x0, x21
/*