aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel
diff options
context:
space:
mode:
authorBernd Schmidt <bernds_cb1@t-online.de>2009-01-07 10:14:39 -0500
committerBryan Wu <cooloney@kernel.org>2009-01-07 10:14:39 -0500
commit6f985294f7df30c0caa80a795ca10fb6f8466702 (patch)
treead88adacfd811de358c967b37c8941504f6229fd /arch/blackfin/kernel
parent5e6d9f511e0188d34fa7a93ce2d0e6194442b0da (diff)
Blackfin arch: fix bugs in linker script when using upstream binutils
Fix a few problems I discovered when building a kernel with upstream CVS binutils. We have to add the NOTES macro to our linker script, since a kernel built with --build-id is otherwise unable to boot. Last time NOTES was added, it broke things, but the definition of the macro has changed not to rely on parts of the linker script that aren't present on Blackfin. I also noticed that _l2_lma_start does not point into the kernel image, but rather somewhere in L1/L2 space, which seems unintended. Also, when the L2 section was added to the linker script, the part following it which computes then length of the init section was not updated. Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r--arch/blackfin/kernel/vmlinux.lds.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S
index 3a1f73794aa8..4b4341da0585 100644
--- a/arch/blackfin/kernel/vmlinux.lds.S
+++ b/arch/blackfin/kernel/vmlinux.lds.S
@@ -68,6 +68,8 @@ SECTIONS
68 __etext = .; 68 __etext = .;
69 } 69 }
70 70
71 NOTES
72
71 /* Just in case the first read only is a 32-bit access */ 73 /* Just in case the first read only is a 32-bit access */
72 RO_DATA(4) 74 RO_DATA(4)
73 75
@@ -167,6 +169,7 @@ SECTIONS
167 . = ALIGN(4); 169 . = ALIGN(4);
168 ___initramfs_start = .; 170 ___initramfs_start = .;
169 *(.init.ramfs) 171 *(.init.ramfs)
172 . = ALIGN(4);
170 ___initramfs_end = .; 173 ___initramfs_end = .;
171 } 174 }
172 175
@@ -212,7 +215,7 @@ SECTIONS
212 __ebss_b_l1 = .; 215 __ebss_b_l1 = .;
213 } 216 }
214 217
215 __l2_lma_start = .; 218 __l2_lma_start = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
216 219
217 .text_data_l2 L2_START : AT(LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1)) 220 .text_data_l2 L2_START : AT(LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1))
218 { 221 {
@@ -236,10 +239,11 @@ SECTIONS
236 . = ALIGN(4); 239 . = ALIGN(4);
237 __ebss_l2 = .; 240 __ebss_l2 = .;
238 } 241 }
242
239 /* Force trailing alignment of our init section so that when we 243 /* Force trailing alignment of our init section so that when we
240 * free our init memory, we don't leave behind a partial page. 244 * free our init memory, we don't leave behind a partial page.
241 */ 245 */
242 . = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1); 246 . = LOADADDR(.text_data_l2) + SIZEOF(.text_data_l2);
243 . = ALIGN(PAGE_SIZE); 247 . = ALIGN(PAGE_SIZE);
244 ___init_end = .; 248 ___init_end = .;
245 249