aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-07-06 05:39:34 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-07-07 18:36:31 -0400
commit3835d69a6c7048a28d0aea3cb8403d5e83a0f867 (patch)
tree3c655f48fe1a36100ad193b79555750e8745c7f9 /arch/arm/kernel/vmlinux.lds.S
parent43fc9d2fa5585adfadd0fdc06a20626727cf985a (diff)
ARM: vmlinux.lds: move init sections between text and data sections
Place the init sections between the text and data sections. This means all code is grouped together at the beginning of the kernel image, and all data is at the end of the image. This avoids problems with the 24-bit branch instruction relocations becoming invalid with large initramfs images. 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.S96
1 files changed, 48 insertions, 48 deletions
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index fa812d03ff47..18574b7dbc14 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -69,6 +69,53 @@ SECTIONS
69 _stext = .; 69 _stext = .;
70 HEAD_TEXT 70 HEAD_TEXT
71 } 71 }
72 .text : { /* Real text segment */
73 _text = .; /* Text and read-only data */
74 __exception_text_start = .;
75 *(.exception.text)
76 __exception_text_end = .;
77 IRQENTRY_TEXT
78 TEXT_TEXT
79 SCHED_TEXT
80 LOCK_TEXT
81 KPROBES_TEXT
82#ifdef CONFIG_MMU
83 *(.fixup)
84#endif
85 *(.gnu.warning)
86 *(.glue_7)
87 *(.glue_7t)
88 . = ALIGN(4);
89 *(.got) /* Global offset table */
90 ARM_CPU_KEEP(PROC_INFO)
91 }
92
93 RO_DATA(PAGE_SIZE)
94
95#ifdef CONFIG_ARM_UNWIND
96 /*
97 * Stack unwinding tables
98 */
99 . = ALIGN(8);
100 .ARM.unwind_idx : {
101 __start_unwind_idx = .;
102 *(.ARM.exidx*)
103 __stop_unwind_idx = .;
104 }
105 .ARM.unwind_tab : {
106 __start_unwind_tab = .;
107 *(.ARM.extab*)
108 __stop_unwind_tab = .;
109 }
110#endif
111
112 _etext = .; /* End of text and rodata section */
113
114#ifndef CONFIG_XIP_KERNEL
115 . = ALIGN(PAGE_SIZE);
116 __init_begin = .;
117#endif
118
72 INIT_TEXT_SECTION(8) 119 INIT_TEXT_SECTION(8)
73 .exit.text : { 120 .exit.text : {
74 ARM_EXIT_KEEP(EXIT_TEXT) 121 ARM_EXIT_KEEP(EXIT_TEXT)
@@ -116,58 +163,11 @@ SECTIONS
116 163
117 PERCPU_SECTION(32) 164 PERCPU_SECTION(32)
118 165
119#ifndef CONFIG_XIP_KERNEL
120 __init_begin = _stext;
121 . = ALIGN(PAGE_SIZE);
122 __init_end = .;
123#endif
124
125 .text : { /* Real text segment */
126 _text = .; /* Text and read-only data */
127 __exception_text_start = .;
128 *(.exception.text)
129 __exception_text_end = .;
130 IRQENTRY_TEXT
131 TEXT_TEXT
132 SCHED_TEXT
133 LOCK_TEXT
134 KPROBES_TEXT
135#ifdef CONFIG_MMU
136 *(.fixup)
137#endif
138 *(.gnu.warning)
139 *(.glue_7)
140 *(.glue_7t)
141 . = ALIGN(4);
142 *(.got) /* Global offset table */
143 ARM_CPU_KEEP(PROC_INFO)
144 }
145
146 RO_DATA(PAGE_SIZE)
147
148#ifdef CONFIG_ARM_UNWIND
149 /*
150 * Stack unwinding tables
151 */
152 . = ALIGN(8);
153 .ARM.unwind_idx : {
154 __start_unwind_idx = .;
155 *(.ARM.exidx*)
156 __stop_unwind_idx = .;
157 }
158 .ARM.unwind_tab : {
159 __start_unwind_tab = .;
160 *(.ARM.extab*)
161 __stop_unwind_tab = .;
162 }
163#endif
164
165 _etext = .; /* End of text and rodata section */
166
167#ifdef CONFIG_XIP_KERNEL 166#ifdef CONFIG_XIP_KERNEL
168 __data_loc = ALIGN(4); /* location in binary */ 167 __data_loc = ALIGN(4); /* location in binary */
169 . = PAGE_OFFSET + TEXT_OFFSET; 168 . = PAGE_OFFSET + TEXT_OFFSET;
170#else 169#else
170 __init_end = .;
171 . = ALIGN(THREAD_SIZE); 171 . = ALIGN(THREAD_SIZE);
172 __data_loc = .; 172 __data_loc = .;
173#endif 173#endif