From 2f181e0ba8db654cf9e1b6abe454aebca9587448 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Tue, 27 Feb 2018 22:39:27 -0500 Subject: ARM: linker script: factor out some common definitions between XIP and non-XIP Lots of duplications between vmlinux.lds.S and vmlinux-xip.lds.S. This may lead to one file being updated but not the other. For example, SOFTIRQENTRY_TEXT and HYPERVISOR_TEXT were missing from the XIP version. This creates vmlinux.lds.h where a bunch of common defines are moved. Signed-off-by: Nicolas Pitre Tested-by: Chris Brandt --- arch/arm/kernel/vmlinux-xip.lds.S | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) (limited to 'arch/arm/kernel/vmlinux-xip.lds.S') diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S index 12b87591eb7c..0a8922b61613 100644 --- a/arch/arm/kernel/vmlinux-xip.lds.S +++ b/arch/arm/kernel/vmlinux-xip.lds.S @@ -15,38 +15,7 @@ #include #include -#define PROC_INFO \ - . = ALIGN(4); \ - VMLINUX_SYMBOL(__proc_info_begin) = .; \ - *(.proc.info.init) \ - VMLINUX_SYMBOL(__proc_info_end) = .; - -#define IDMAP_TEXT \ - ALIGN_FUNCTION(); \ - VMLINUX_SYMBOL(__idmap_text_start) = .; \ - *(.idmap.text) \ - VMLINUX_SYMBOL(__idmap_text_end) = .; \ - . = ALIGN(PAGE_SIZE); \ - VMLINUX_SYMBOL(__hyp_idmap_text_start) = .; \ - *(.hyp.idmap.text) \ - VMLINUX_SYMBOL(__hyp_idmap_text_end) = .; - -#ifdef CONFIG_HOTPLUG_CPU -#define ARM_CPU_DISCARD(x) -#define ARM_CPU_KEEP(x) x -#else -#define ARM_CPU_DISCARD(x) x -#define ARM_CPU_KEEP(x) -#endif - -#if (defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)) || \ - defined(CONFIG_GENERIC_BUG) -#define ARM_EXIT_KEEP(x) x -#define ARM_EXIT_DISCARD(x) -#else -#define ARM_EXIT_KEEP(x) -#define ARM_EXIT_DISCARD(x) x -#endif +#include "vmlinux.lds.h" OUTPUT_ARCH(arm) ENTRY(stext) @@ -100,10 +69,12 @@ SECTIONS *(.entry.text) __entry_text_end = .; IRQENTRY_TEXT + SOFTIRQENTRY_TEXT TEXT_TEXT SCHED_TEXT CPUIDLE_TEXT LOCK_TEXT + HYPERVISOR_TEXT KPROBES_TEXT *(.gnu.warning) *(.glue_7) -- cgit