aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-05-26 06:25:33 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-07-07 18:35:38 -0400
commit39df88872f64b8a7c438861460063eadf2ba9011 (patch)
tree0d166bc7438e8fade3735c97c5342bb9458a5040 /arch/arm/kernel/vmlinux.lds.S
parent3002b41bc6e5d66f7c1b5fd604f8f413e9bb37a5 (diff)
ARM: vmlinux.lds: move discarded sections to beginning
Rather than scattering the discarded sections throughout the linker file, move them to the start. Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Tested-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/vmlinux.lds.S')
-rw-r--r--arch/arm/kernel/vmlinux.lds.S47
1 files changed, 22 insertions, 25 deletions
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index e5287f21badc..cb46a9bad4f5 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -38,6 +38,28 @@ jiffies = jiffies_64 + 4;
38 38
39SECTIONS 39SECTIONS
40{ 40{
41 /*
42 * unwind exit sections must be discarded before the rest of the
43 * unwind sections get included.
44 */
45 /DISCARD/ : {
46 *(.ARM.exidx.exit.text)
47 *(.ARM.extab.exit.text)
48 ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text))
49 ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text))
50#ifndef CONFIG_HOTPLUG
51 *(.ARM.exidx.devexit.text)
52 *(.ARM.extab.devexit.text)
53#endif
54#ifndef CONFIG_MMU
55 *(.fixup)
56 *(__ex_table)
57#endif
58#ifndef CONFIG_SMP_ON_UP
59 *(.alt.smp.init)
60#endif
61 }
62
41#ifdef CONFIG_XIP_KERNEL 63#ifdef CONFIG_XIP_KERNEL
42 . = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR); 64 . = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR);
43#else 65#else
@@ -89,25 +111,6 @@ SECTIONS
89 __init_end = .; 111 __init_end = .;
90#endif 112#endif
91 113
92 /*
93 * unwind exit sections must be discarded before the rest of the
94 * unwind sections get included.
95 */
96 /DISCARD/ : {
97 *(.ARM.exidx.exit.text)
98 *(.ARM.extab.exit.text)
99 ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text))
100 ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text))
101#ifndef CONFIG_HOTPLUG
102 *(.ARM.exidx.devexit.text)
103 *(.ARM.extab.devexit.text)
104#endif
105#ifndef CONFIG_MMU
106 *(.fixup)
107 *(__ex_table)
108#endif
109 }
110
111 .text : { /* Real text segment */ 114 .text : { /* Real text segment */
112 _text = .; /* Text and read-only data */ 115 _text = .; /* Text and read-only data */
113 __exception_text_start = .; 116 __exception_text_start = .;
@@ -270,12 +273,6 @@ SECTIONS
270 273
271 /* Default discards */ 274 /* Default discards */
272 DISCARDS 275 DISCARDS
273
274#ifndef CONFIG_SMP_ON_UP
275 /DISCARD/ : {
276 *(.alt.smp.init)
277 }
278#endif
279} 276}
280 277
281/* 278/*