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)
139 PERCPU(32, PAGE_SIZE)
146 .text_l1 L1_CODE_START : AT(LOADADDR(.exit.data) + SIZEOF(.exit.data))
148 .init.data : AT(__data_lma + __data_len)
160 ___per_cpu_start = .;
161 *(.data.percpu.first)
162 *(.data.percpu.page_aligned)
164 *(.data.percpu.shared_aligned)
170 __init_data_lma = LOADADDR(.init.data);
171 __init_data_len = SIZEOF(.init.data);
174 .text_l1 L1_CODE_START : AT(__init_data_lma + __init_data_len)
181 #ifdef CONFIG_SCHEDULE_L1
187 __text_l1_lma = LOADADDR(.text_l1);
188 __text_l1_len = SIZEOF(.text_l1);
189 ASSERT (__text_l1_len <= L1_CODE_LENGTH, "L1 text overflow!")
191 .data_l1 L1_DATA_A_START : AT(__text_l1_lma + __text_l1_len)
199 *(.data_l1.cacheline_aligned)
207 __data_l1_lma = LOADADDR(.data_l1);
208 __data_l1_len = SIZEOF(.data_l1);
209 ASSERT (__data_l1_len <= L1_DATA_A_LENGTH, "L1 data A overflow!")
211 .data_b_l1 L1_DATA_B_START : AT(__data_l1_lma + __data_l1_len)
224 __data_b_l1_lma = LOADADDR(.data_b_l1);
225 __data_b_l1_len = SIZEOF(.data_b_l1);
226 ASSERT (__data_b_l1_len <= L1_DATA_B_LENGTH, "L1 data B overflow!")
228 .text_data_l2 L2_START : AT(__data_b_l1_lma + __data_b_l1_len)
242 *(.data_l2.cacheline_aligned)
250 __l2_lma = LOADADDR(.text_data_l2);
251 __l2_len = SIZEOF(.text_data_l2);
252 ASSERT (__l2_len <= L2_LENGTH, "L2 overflow!")
254 /* Force trailing alignment of our init section so that when we
255 * free our init memory, we don't leave behind a partial page.
257 #ifdef CONFIG_RAMKERNEL
258 . = __l2_lma + __l2_len;
262 . = ALIGN(PAGE_SIZE);