2 * ld script to make SuperH Linux kernel
3 * Written by Niibe Yutaka and Paul Mundt
6 #define LOAD_OFFSET CONFIG_PAGE_OFFSET
13 #include <asm/thread_info.h>
14 #include <asm/cache.h>
15 #include <asm-generic/vmlinux.lds.h>
20 #ifdef CONFIG_PMB_FIXED
21 . = CONFIG_PAGE_OFFSET + (CONFIG_MEMORY_START & 0x1fffffff) +
22 CONFIG_ZERO_PAGE_OFFSET;
23 #elif defined(CONFIG_32BIT)
24 . = CONFIG_PAGE_OFFSET + CONFIG_ZERO_PAGE_OFFSET;
26 . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
29 .empty_zero_page : AT(ADDR(.empty_zero_page) - LOAD_OFFSET) {
33 .text : AT(ADDR(.text) - LOAD_OFFSET) {
34 _text = .; /* Text and read-only data */
38 #ifdef CONFIG_SUPERH64
49 _etext = .; /* End of text section */
52 . = ALIGN(16); /* Exception table */
53 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
54 __start___ex_table = .;
56 __stop___ex_table = .;
63 * Code which must be executed uncached and the associated data
66 .uncached : AT(ADDR(.uncached) - LOAD_OFFSET) {
73 . = ALIGN(THREAD_SIZE);
74 .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
77 . = ALIGN(L1_CACHE_BYTES);
78 *(.data.cacheline_aligned)
80 . = ALIGN(L1_CACHE_BYTES);
95 _edata = .; /* End of data section */
97 . = ALIGN(PAGE_SIZE); /* Init code and data */
98 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
105 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { INIT_DATA }
108 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
114 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
115 __initcall_start = .;
120 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
121 __con_initcall_start = .;
122 *(.con_initcall.init)
123 __con_initcall_end = .;
128 #ifdef CONFIG_BLK_DEV_INITRD
129 . = ALIGN(PAGE_SIZE);
130 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
131 __initramfs_start = .;
138 .machvec.init : AT(ADDR(.machvec.init) - LOAD_OFFSET) {
147 * .exit.text is discarded at runtime, not link time, to deal with
148 * references from __bug_table
150 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { EXIT_TEXT }
151 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { EXIT_DATA }
153 . = ALIGN(PAGE_SIZE);
154 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
156 __bss_start = .; /* BSS */
161 _ebss = .; /* uClinux MTD sucks */
166 * When something in the kernel is NOT compiled as a module, the
167 * module cleanup code and data are put into these segments. Both
168 * can then be thrown away, as cleanup code is never called unless