aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/Makefile')
-rw-r--r--arch/arm64/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 7ab6b358cc35..a5004a5b7aa4 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -32,7 +32,11 @@ CHECKFLAGS += -D__aarch64__
head-y := arch/arm64/kernel/head.o
# The byte offset of the kernel image in RAM from the start of RAM.
+ifeq ($(CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET), y)
+TEXT_OFFSET := $(shell awk 'BEGIN {srand(); printf "0x%03x000\n", int(512 * rand())}')
+else
TEXT_OFFSET := 0x00080000
+endif
export TEXT_OFFSET GZFLAGS