2 * Copyright 2004-2009 Analog Devices Inc.
4 * Licensed under the GPL-2 or later
7 #include <asm-generic/vmlinux.lds.h>
8 #include <asm/mem_map.h>
10 #include <asm/thread_info.h>
12 OUTPUT_FORMAT("elf32-bfin")
14 _jiffies = _jiffies_64;
18 #ifdef CONFIG_RAMKERNEL
24 /* Neither the text, ro_data or bss section need to be aligned
25 * So pack them back to back
33 #ifndef CONFIG_SCHEDULE_L1
39 #ifdef CONFIG_ROMKERNEL
57 /* Just in case the first read only is a 32-bit access */
61 #ifdef CONFIG_ROMKERNEL
63 .bss : AT(__rodata_end)
82 #if defined(CONFIG_ROMKERNEL)
83 .data : AT(LOADADDR(.bss) + SIZEOF(.bss))
89 /* This gets done first, so the glob doesn't suck it in */
90 CACHELINE_ALIGNED_DATA(32)
94 *(.data_l1.cacheline_aligned)
102 *(.data_l2.cacheline_aligned)
109 INIT_TASK_DATA(THREAD_SIZE)
113 __data_lma = LOADADDR(.data);
114 __data_len = SIZEOF(.data);
116 /* The init section should be last, so when we free it, it goes into
117 * the general memory pool, and (hopefully) will decrease fragmentation
118 * a tiny bit. The init section has a _requirement_ that it be
121 . = ALIGN(PAGE_SIZE);
124 #ifdef CONFIG_RAMKERNEL
125 INIT_TEXT_SECTION(PAGE_SIZE)
127 /* We have to discard exit text and such at runtime, not link time, to
128 * handle embedded cross-section references (alt instructions, bug
129 * table, eh_frame, etc...). We need all of our .text up front and
130 * .data after it for PCREL call issues.
138 INIT_DATA_SECTION(16)
146 .text_l1 L1_CODE_START : AT(LOADADDR(.exit.data) + SIZEOF(.exit.data))
148 .init.data : AT(__data_lma + __data_len)
158 . = ALIGN(PAGE_SIZE);
165 __init_data_lma = LOADADDR(.init.data);
166 __init_data_len = SIZEOF(.init.data);
169 .text_l1 L1_CODE_START : AT(__init_data_lma + __init_data_len)
176 #ifdef CONFIG_SCHEDULE_L1
182 __text_l1_lma = LOADADDR(.text_l1);
183 __text_l1_len = SIZEOF(.text_l1);
184 ASSERT (__text_l1_len <= L1_CODE_LENGTH, "L1 text overflow!")
186 .data_l1 L1_DATA_A_START : AT(__text_l1_lma + __text_l1_len)
194 *(.data_l1.cacheline_aligned)
202 __data_l1_lma = LOADADDR(.data_l1);
203 __data_l1_len = SIZEOF(.data_l1);
204 ASSERT (__data_l1_len <= L1_DATA_A_LENGTH, "L1 data A overflow!")
206 .data_b_l1 L1_DATA_B_START : AT(__data_l1_lma + __data_l1_len)
219 __data_b_l1_lma = LOADADDR(.data_b_l1);
220 __data_b_l1_len = SIZEOF(.data_b_l1);
221 ASSERT (__data_b_l1_len <= L1_DATA_B_LENGTH, "L1 data B overflow!")
223 .text_data_l2 L2_START : AT(__data_b_l1_lma + __data_b_l1_len)
237 *(.data_l2.cacheline_aligned)
245 __l2_lma = LOADADDR(.text_data_l2);
246 __l2_len = SIZEOF(.text_data_l2);
247 ASSERT (__l2_len <= L2_LENGTH, "L2 overflow!")
249 /* Force trailing alignment of our init section so that when we
250 * free our init memory, we don't leave behind a partial page.
252 #ifdef CONFIG_RAMKERNEL
253 . = __l2_lma + __l2_len;
257 . = ALIGN(PAGE_SIZE);