2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * arch/sh5/vmlinux.lds.S
8 * ld script to make ST50 Linux kernel
10 * Copyright (C) 2000, 2001 Paolo Alberelli
12 * benedict.gaster@superh.com: 2nd May 2002
13 * Add definition of empty_zero_page to be the first page of kernel image.
15 * benedict.gaster@superh.com: 3rd May 2002
16 * Added support for ramdisk, removing statically linked romfs at the same time.
18 * lethal@linux-sh.org: 9th May 2003
19 * Kill off GLOBAL_NAME() usage and other CDC-isms.
21 * lethal@linux-sh.org: 19th May 2003
22 * Remove support for ancient toolchains.
26 #include <asm/cache.h>
27 #include <asm/thread_info.h>
29 #define LOAD_OFFSET CONFIG_CACHED_MEMORY_OFFSET
30 #include <asm-generic/vmlinux.lds.h>
34 #define C_PHYS(x) AT (ADDR(x) - LOAD_OFFSET)
39 . = CONFIG_CACHED_MEMORY_OFFSET + CONFIG_MEMORY_START + PAGE_SIZE;
40 _text = .; /* Text and read-only data */
41 text = .; /* Text and read-only data */
43 .empty_zero_page : C_PHYS(.empty_zero_page) {
47 .text : C_PHYS(.text) {
56 #ifdef CONFIG_LITTLE_ENDIAN
62 /* We likely want __ex_table to be Cache Line aligned */
63 . = ALIGN(L1_CACHE_BYTES); /* Exception table */
64 __start___ex_table = .;
65 __ex_table : C_PHYS(__ex_table) { *(__ex_table) }
66 __stop___ex_table = .;
68 _etext = .; /* End of text section */
74 .data : C_PHYS(.data) { /* Data */
80 .data.page_aligned : C_PHYS(.data.page_aligned) { *(.data.page_aligned) }
84 . = ALIGN(L1_CACHE_BYTES);
85 .data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) }
87 _edata = .; /* End of data section */
89 . = ALIGN(THREAD_SIZE); /* init_task: structure size aligned */
90 .data.init_task : C_PHYS(.data.init_task) { *(.data.init_task) }
92 . = ALIGN(PAGE_SIZE); /* Init code and data */
95 .init.text : C_PHYS(.init.text) { *(.init.text) }
97 .init.data : C_PHYS(.init.data) { *(.init.data) }
98 . = ALIGN(L1_CACHE_BYTES); /* Better if Cache Line aligned */
100 .init.setup : C_PHYS(.init.setup) { *(.init.setup) }
102 __initcall_start = .;
103 .initcall.init : C_PHYS(.initcall.init) {
107 __con_initcall_start = .;
108 .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) }
109 __con_initcall_end = .;
112 #ifdef CONFIG_BLK_DEV_INITRD
113 __initramfs_start = .;
114 .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) }
118 . = ALIGN(PAGE_SIZE);
121 /* Align to the biggest single data representation, head and tail */
123 __bss_start = .; /* BSS */
124 .bss : C_PHYS(.bss) {
130 /* Sections to be discarded */