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/processor.h>
28 #include <asm/thread_info.h>
30 #define LOAD_OFFSET CONFIG_CACHED_MEMORY_OFFSET
31 #include <asm-generic/vmlinux.lds.h>
34 #ifdef CONFIG_LITTLE_ENDIAN
35 OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux")
37 OUTPUT_FORMAT("elf32-sh64", "elf32-sh64", "elf32-sh64")
43 #define C_PHYS(x) AT (ADDR(x) - LOAD_OFFSET)
48 . = CONFIG_CACHED_MEMORY_OFFSET + CONFIG_MEMORY_START + PAGE_SIZE;
49 _text = .; /* Text and read-only data */
50 text = .; /* Text and read-only data */
52 .empty_zero_page : C_PHYS(.empty_zero_page) {
56 .text : C_PHYS(.text) {
65 #ifdef CONFIG_LITTLE_ENDIAN
71 /* We likely want __ex_table to be Cache Line aligned */
72 . = ALIGN(L1_CACHE_BYTES); /* Exception table */
73 __start___ex_table = .;
74 __ex_table : C_PHYS(__ex_table) { *(__ex_table) }
75 __stop___ex_table = .;
79 _etext = .; /* End of text section */
81 .data : C_PHYS(.data) { /* Data */
87 .data.page_aligned : C_PHYS(.data.page_aligned) { *(.data.page_aligned) }
91 .data.percpu : C_PHYS(.data.percpu) {
93 *(.data.percpu.shared_aligned)
96 .data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) }
98 _edata = .; /* End of data section */
100 . = ALIGN(THREAD_SIZE); /* init_task: structure size aligned */
101 .data.init_task : C_PHYS(.data.init_task) { *(.data.init_task) }
103 . = ALIGN(PAGE_SIZE); /* Init code and data */
106 .init.text : C_PHYS(.init.text) { *(.init.text) }
108 .init.data : C_PHYS(.init.data) { *(.init.data) }
109 . = ALIGN(L1_CACHE_BYTES); /* Better if Cache Line aligned */
111 .init.setup : C_PHYS(.init.setup) { *(.init.setup) }
113 __initcall_start = .;
114 .initcall.init : C_PHYS(.initcall.init) {
118 __con_initcall_start = .;
119 .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) }
120 __con_initcall_end = .;
123 #ifdef CONFIG_BLK_DEV_INITRD
124 __initramfs_start = .;
125 .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) }
129 . = ALIGN(PAGE_SIZE);
132 /* Align to the biggest single data representation, head and tail */
134 __bss_start = .; /* BSS */
135 .bss : C_PHYS(.bss) {
141 /* Sections to be discarded */
148 /* Stabs debugging sections. */
149 .stab 0 : C_PHYS(.stab) { *(.stab) }
150 .stabstr 0 : C_PHYS(.stabstr) { *(.stabstr) }
151 .stab.excl 0 : C_PHYS(.stab.excl) { *(.stab.excl) }
152 .stab.exclstr 0 : C_PHYS(.stab.exclstr) { *(.stab.exclstr) }
153 .stab.index 0 : C_PHYS(.stab.index) { *(.stab.index) }
154 .stab.indexstr 0 : C_PHYS(.stab.indexstr) { *(.stab.indexstr) }
155 .comment 0 : C_PHYS(.comment) { *(.comment) }
156 /* DWARF debug sections.
157 Symbols in the DWARF debugging section are relative to the beginning
158 of the section so we begin .debug at 0. */
160 .debug 0 : C_PHYS(.debug) { *(.debug) }
161 .line 0 : C_PHYS(.line) { *(.line) }
162 /* GNU DWARF 1 extensions */
163 .debug_srcinfo 0 : C_PHYS(.debug_srcinfo) { *(.debug_srcinfo) }
164 .debug_sfnames 0 : C_PHYS(.debug_sfnames) { *(.debug_sfnames) }
165 /* DWARF 1.1 and DWARF 2 */
166 .debug_aranges 0 : C_PHYS(.debug_aranges) { *(.debug_aranges) }
167 .debug_pubnames 0 : C_PHYS(.debug_pubnames) { *(.debug_pubnames) }
169 .debug_info 0 : C_PHYS(.debug_info) { *(.debug_info) }
170 .debug_abbrev 0 : C_PHYS(.debug_abbrev) { *(.debug_abbrev) }
171 .debug_line 0 : C_PHYS(.debug_line) { *(.debug_line) }
172 .debug_frame 0 : C_PHYS(.debug_frame) { *(.debug_frame) }
173 .debug_str 0 : C_PHYS(.debug_str) { *(.debug_str) }
174 .debug_loc 0 : C_PHYS(.debug_loc) { *(.debug_loc) }
175 .debug_macinfo 0 : C_PHYS(.debug_macinfo) { *(.debug_macinfo) }
176 /* SGI/MIPS DWARF 2 extensions */
177 .debug_weaknames 0 : C_PHYS(.debug_weaknames) { *(.debug_weaknames) }
178 .debug_funcnames 0 : C_PHYS(.debug_funcnames) { *(.debug_funcnames) }
179 .debug_typenames 0 : C_PHYS(.debug_typenames) { *(.debug_typenames) }
180 .debug_varnames 0 : C_PHYS(.debug_varnames) { *(.debug_varnames) }
181 /* These must appear regardless of . */