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 _text = .; /* Text and read-only data */
31 .empty_zero_page : AT(ADDR(.empty_zero_page) - LOAD_OFFSET) {
35 .text : AT(ADDR(.text) - LOAD_OFFSET) {
39 #ifdef CONFIG_SUPERH64
50 _etext = .; /* End of text section */
53 . = ALIGN(16); /* Exception table */
54 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
55 __start___ex_table = .;
57 __stop___ex_table = .;
64 * Code which must be executed uncached and the associated data
67 .uncached : AT(ADDR(.uncached) - LOAD_OFFSET) {
74 . = ALIGN(THREAD_SIZE);
75 .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
78 . = ALIGN(L1_CACHE_BYTES);
79 *(.data.cacheline_aligned)
81 . = ALIGN(L1_CACHE_BYTES);
96 _edata = .; /* End of data section */
98 . = ALIGN(PAGE_SIZE); /* Init code and data */
99 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
106 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { INIT_DATA }
109 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
115 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
116 __initcall_start = .;
121 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
122 __con_initcall_start = .;
123 *(.con_initcall.init)
124 __con_initcall_end = .;
129 #ifdef CONFIG_BLK_DEV_INITRD
130 . = ALIGN(PAGE_SIZE);
131 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
132 __initramfs_start = .;
139 .machvec.init : AT(ADDR(.machvec.init) - LOAD_OFFSET) {
148 * .exit.text is discarded at runtime, not link time, to deal with
149 * references from __bug_table
151 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { EXIT_TEXT }
152 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { EXIT_DATA }
154 . = ALIGN(PAGE_SIZE);
155 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
157 __bss_start = .; /* BSS */
162 _ebss = .; /* uClinux MTD sucks */
167 * When something in the kernel is NOT compiled as a module, the
168 * module cleanup code and data are put into these segments. Both
169 * can then be thrown away, as cleanup code is never called unless