2 * ld script to make SH64 Linux kernel
4 * Copyright (C) 2000, 2001 Paolo Alberelli
6 * benedict.gaster@superh.com: 2nd May 2002
7 * Add definition of empty_zero_page to be the first page of kernel image.
9 * benedict.gaster@superh.com: 3rd May 2002
10 * Added support for ramdisk, removing statically linked romfs at the
13 * lethal@linux-sh.org: 9th May 2003
14 * Kill off GLOBAL_NAME() usage and other CDC-isms.
16 * lethal@linux-sh.org: 19th May 2003
17 * Remove support for ancient toolchains.
19 * This file is subject to the terms and conditions of the GNU General Public
20 * License. See the file "COPYING" in the main directory of this archive
24 #include <asm/cache.h>
25 #include <asm/thread_info.h>
27 #define LOAD_OFFSET CONFIG_PAGE_OFFSET
28 #include <asm-generic/vmlinux.lds.h>
32 #define C_PHYS(x) AT (ADDR(x) - LOAD_OFFSET)
37 . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + PAGE_SIZE;
38 _text = .; /* Text and read-only data */
40 .empty_zero_page : C_PHYS(.empty_zero_page) {
44 .text : C_PHYS(.text) {
54 #ifdef CONFIG_LITTLE_ENDIAN
60 /* We likely want __ex_table to be Cache Line aligned */
61 . = ALIGN(L1_CACHE_BYTES); /* Exception table */
62 __start___ex_table = .;
63 __ex_table : C_PHYS(__ex_table) { *(__ex_table) }
64 __stop___ex_table = .;
66 _etext = .; /* End of text section */
72 . = ALIGN(THREAD_SIZE);
73 .data : C_PHYS(.data) { /* Data */
76 . = ALIGN(L1_CACHE_BYTES);
77 *(.data.cacheline_aligned)
79 . = ALIGN(L1_CACHE_BYTES);
94 _edata = .; /* End of data section */
96 . = ALIGN(PAGE_SIZE); /* Init code and data */
99 .init.text : C_PHYS(.init.text) { INIT_TEXT }
101 .init.data : C_PHYS(.init.data) { INIT_DATA }
102 . = ALIGN(L1_CACHE_BYTES); /* Better if Cache Line aligned */
104 .init.setup : C_PHYS(.init.setup) { *(.init.setup) }
106 __initcall_start = .;
107 .initcall.init : C_PHYS(.initcall.init) {
111 __con_initcall_start = .;
112 .con_initcall.init : C_PHYS(.con_initcall.init) {
113 *(.con_initcall.init)
115 __con_initcall_end = .;
119 #ifdef CONFIG_BLK_DEV_INITRD
120 . = ALIGN(PAGE_SIZE);
121 __initramfs_start = .;
122 .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) }
128 .machvec.init : C_PHYS(.machvec.init) { *(.machvec.init) }
134 * .exit.text is discarded at runtime, not link time, to deal with
135 * references from __bug_table
137 .exit.text : C_PHYS(.exit.text) { EXIT_TEXT }
138 .exit.data : C_PHYS(.exit.data) { EXIT_DATA }
140 . = ALIGN(PAGE_SIZE);
141 .bss : C_PHYS(.bss) {
143 __bss_start = .; /* BSS */
148 _ebss = .; /* uClinux MTD sucks */
153 * When something in the kernel is NOT compiled as a module, the
154 * module cleanup code and data are put into these segments. Both
155 * can then be thrown away, as cleanup code is never called unless