From 3571151aaef3a5009360106d2bc9cb1ece04a12d Mon Sep 17 00:00:00 2001 From: Sami Tolvanen Date: Tue, 10 Oct 2017 10:56:17 -0700 Subject: [PATCH] FROMLIST: arm64: keep .altinstructions and .altinstr_replacement Make sure the linker doesn't remove .altinstructions or .altinstr_replacement when CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is enabled. Bug: 62093296 Bug: 67506682 Change-Id: I73f8a96679083909ec6865ee87519163ac7dcbe3 (am from https://patchwork.kernel.org/patch/10085799/) Signed-off-by: Sami Tolvanen --- arch/arm64/kernel/vmlinux.lds.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index e9ad6914a4fb..cb3e4393b412 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -150,11 +150,11 @@ SECTIONS . = ALIGN(4); .altinstructions : { __alt_instructions = .; - *(.altinstructions) + KEEP(*(.altinstructions)) __alt_instructions_end = .; } .altinstr_replacement : { - *(.altinstr_replacement) + KEEP(*(.altinstr_replacement)) } . = ALIGN(PAGE_SIZE); -- 2.20.1