1 |
1275 |
phoenix |
/*
|
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
|
4 |
|
|
* for more details.
|
5 |
|
|
*
|
6 |
|
|
* arch/sh5/vmlinux.lds.S
|
7 |
|
|
*
|
8 |
|
|
* ld script to make ST50 Linux kernel
|
9 |
|
|
*
|
10 |
|
|
* Copyright (C) 2000, 2001 Paolo Alberelli
|
11 |
|
|
*
|
12 |
|
|
* benedict.gaster@superh.com: 2nd May 2002
|
13 |
|
|
* Add definition of empty_zero_page to be the first page of kernel image.
|
14 |
|
|
*
|
15 |
|
|
* benedict.gaster@superh.com: 3rd May 2002
|
16 |
|
|
* Added support for ramdisk, removing statically linked romfs at the same time.
|
17 |
|
|
*
|
18 |
|
|
* lethal@linux-sh.org: 9th May 2003
|
19 |
|
|
* Kill off GLOBAL_NAME() usage and other CDC-isms.
|
20 |
|
|
*
|
21 |
|
|
* lethal@linux-sh.org: 19th May 2003
|
22 |
|
|
* Remove support for ancient toolchains.
|
23 |
|
|
*/
|
24 |
|
|
|
25 |
|
|
#include
|
26 |
|
|
#include
|
27 |
|
|
#include
|
28 |
|
|
#include
|
29 |
|
|
|
30 |
|
|
#ifdef NOTDEF
|
31 |
|
|
#ifdef CONFIG_LITTLE_ENDIAN
|
32 |
|
|
OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux")
|
33 |
|
|
#else
|
34 |
|
|
OUTPUT_FORMAT("elf32-sh64", "elf32-sh64", "elf32-sh64")
|
35 |
|
|
#endif
|
36 |
|
|
#endif
|
37 |
|
|
|
38 |
|
|
OUTPUT_ARCH(sh:sh5)
|
39 |
|
|
|
40 |
|
|
#define C_PHYS(x) AT (ADDR(x) - CONFIG_CACHED_MEMORY_OFFSET)
|
41 |
|
|
#define U_PHYS(x) AT (ADDR(x) - CONFIG_UNCACHED_MEMORY_OFFSET)
|
42 |
|
|
|
43 |
|
|
ENTRY(__start)
|
44 |
|
|
SECTIONS
|
45 |
|
|
{
|
46 |
|
|
. = CONFIG_CACHED_MEMORY_OFFSET + CONFIG_MEMORY_START + PAGE_SIZE;
|
47 |
|
|
_text = .; /* Text and read-only data */
|
48 |
|
|
text = .; /* Text and read-only data */
|
49 |
|
|
|
50 |
|
|
.empty_zero_page : C_PHYS(.empty_zero_page) {
|
51 |
|
|
*(.empty_zero_page)
|
52 |
|
|
} = 0
|
53 |
|
|
|
54 |
|
|
.text : C_PHYS(.text) {
|
55 |
|
|
*(.text)
|
56 |
|
|
*(.text64)
|
57 |
|
|
*(.text..SHmedia32)
|
58 |
|
|
*(.fixup)
|
59 |
|
|
*(.gnu.warning)
|
60 |
|
|
#ifdef CONFIG_LITTLE_ENDIAN
|
61 |
|
|
} = 0x6ff0fff0
|
62 |
|
|
#else
|
63 |
|
|
} = 0xf0fff06f
|
64 |
|
|
#endif
|
65 |
|
|
.text.lock : C_PHYS(.text.lock) { *(.text.lock) } /* out-of-line lock text */
|
66 |
|
|
.rodata : C_PHYS(.rodata) { *(.rodata) *(.rodata.str1.8) }
|
67 |
|
|
.kstrtab : C_PHYS(.kstrtab) { *(.kstrtab) }
|
68 |
|
|
|
69 |
|
|
/* We likely want __ex_table to be Cache Line aligned */
|
70 |
|
|
. = ALIGN(L1_CACHE_BYTES); /* Exception table */
|
71 |
|
|
__start___ex_table = .;
|
72 |
|
|
__ex_table : C_PHYS(__ex_table) { *(__ex_table) }
|
73 |
|
|
__stop___ex_table = .;
|
74 |
|
|
|
75 |
|
|
__start___ksymtab = .; /* Kernel symbol table */
|
76 |
|
|
__ksymtab : C_PHYS(__ksymtab) { *(__ksymtab) }
|
77 |
|
|
__stop___ksymtab = .;
|
78 |
|
|
|
79 |
|
|
_etext = .; /* End of text section */
|
80 |
|
|
|
81 |
|
|
.data : C_PHYS(.data) { /* Data */
|
82 |
|
|
*(.data)
|
83 |
|
|
CONSTRUCTORS
|
84 |
|
|
}
|
85 |
|
|
|
86 |
|
|
_edata = .; /* End of data section */
|
87 |
|
|
|
88 |
|
|
. = ALIGN(INIT_TASK_SIZE); /* init_task: structure size aligned */
|
89 |
|
|
.data.init_task : C_PHYS(.data.init_task) { *(.data.init_task) }
|
90 |
|
|
|
91 |
|
|
. = ALIGN(PAGE_SIZE); /* Init code and data */
|
92 |
|
|
__init_begin = .;
|
93 |
|
|
.text.init : C_PHYS(.text.init) { *(.text.init) }
|
94 |
|
|
.data.init : C_PHYS(.data.init) { *(.data.init) }
|
95 |
|
|
. = ALIGN(L1_CACHE_BYTES); /* Better if Cache Line aligned */
|
96 |
|
|
__setup_start = .;
|
97 |
|
|
.setup.init : C_PHYS(.setup.init) { *(.setup.init) }
|
98 |
|
|
__setup_end = .;
|
99 |
|
|
__initcall_start = .;
|
100 |
|
|
.initcall.init : C_PHYS(.initcall.init) { *(.initcall.init) }
|
101 |
|
|
__initcall_end = .;
|
102 |
|
|
. = ALIGN(PAGE_SIZE);
|
103 |
|
|
__init_end = .;
|
104 |
|
|
|
105 |
|
|
. = ALIGN(L1_CACHE_BYTES);
|
106 |
|
|
.data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) }
|
107 |
|
|
|
108 |
|
|
/* Align to the biggest single data representation, head and tail */
|
109 |
|
|
. = ALIGN(8);
|
110 |
|
|
__bss_start = .; /* BSS */
|
111 |
|
|
.bss : C_PHYS(.bss) {
|
112 |
|
|
*(.bss)
|
113 |
|
|
}
|
114 |
|
|
. = ALIGN(8);
|
115 |
|
|
_end = . ;
|
116 |
|
|
|
117 |
|
|
/* Sections to be discarded */
|
118 |
|
|
/DISCARD/ : {
|
119 |
|
|
*(.text.exit)
|
120 |
|
|
*(.data.exit)
|
121 |
|
|
*(.exitcall.exit)
|
122 |
|
|
}
|
123 |
|
|
|
124 |
|
|
/* Stabs debugging sections. */
|
125 |
|
|
.stab 0 : C_PHYS(.stab) { *(.stab) }
|
126 |
|
|
.stabstr 0 : C_PHYS(.stabstr) { *(.stabstr) }
|
127 |
|
|
.stab.excl 0 : C_PHYS(.stab.excl) { *(.stab.excl) }
|
128 |
|
|
.stab.exclstr 0 : C_PHYS(.stab.exclstr) { *(.stab.exclstr) }
|
129 |
|
|
.stab.index 0 : C_PHYS(.stab.index) { *(.stab.index) }
|
130 |
|
|
.stab.indexstr 0 : C_PHYS(.stab.indexstr) { *(.stab.indexstr) }
|
131 |
|
|
.comment 0 : C_PHYS(.comment) { *(.comment) }
|
132 |
|
|
/* DWARF debug sections.
|
133 |
|
|
Symbols in the DWARF debugging section are relative to the beginning
|
134 |
|
|
of the section so we begin .debug at 0. */
|
135 |
|
|
/* DWARF 1 */
|
136 |
|
|
.debug 0 : C_PHYS(.debug) { *(.debug) }
|
137 |
|
|
.line 0 : C_PHYS(.line) { *(.line) }
|
138 |
|
|
/* GNU DWARF 1 extensions */
|
139 |
|
|
.debug_srcinfo 0 : C_PHYS(.debug_srcinfo) { *(.debug_srcinfo) }
|
140 |
|
|
.debug_sfnames 0 : C_PHYS(.debug_sfnames) { *(.debug_sfnames) }
|
141 |
|
|
/* DWARF 1.1 and DWARF 2 */
|
142 |
|
|
.debug_aranges 0 : C_PHYS(.debug_aranges) { *(.debug_aranges) }
|
143 |
|
|
.debug_pubnames 0 : C_PHYS(.debug_pubnames) { *(.debug_pubnames) }
|
144 |
|
|
/* DWARF 2 */
|
145 |
|
|
.debug_info 0 : C_PHYS(.debug_info) { *(.debug_info) }
|
146 |
|
|
.debug_abbrev 0 : C_PHYS(.debug_abbrev) { *(.debug_abbrev) }
|
147 |
|
|
.debug_line 0 : C_PHYS(.debug_line) { *(.debug_line) }
|
148 |
|
|
.debug_frame 0 : C_PHYS(.debug_frame) { *(.debug_frame) }
|
149 |
|
|
.debug_str 0 : C_PHYS(.debug_str) { *(.debug_str) }
|
150 |
|
|
.debug_loc 0 : C_PHYS(.debug_loc) { *(.debug_loc) }
|
151 |
|
|
.debug_macinfo 0 : C_PHYS(.debug_macinfo) { *(.debug_macinfo) }
|
152 |
|
|
/* SGI/MIPS DWARF 2 extensions */
|
153 |
|
|
.debug_weaknames 0 : C_PHYS(.debug_weaknames) { *(.debug_weaknames) }
|
154 |
|
|
.debug_funcnames 0 : C_PHYS(.debug_funcnames) { *(.debug_funcnames) }
|
155 |
|
|
.debug_typenames 0 : C_PHYS(.debug_typenames) { *(.debug_typenames) }
|
156 |
|
|
.debug_varnames 0 : C_PHYS(.debug_varnames) { *(.debug_varnames) }
|
157 |
|
|
/* These must appear regardless of . */
|
158 |
|
|
}
|