diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-11-20 01:35:42 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-01-27 23:18:49 -0500 |
commit | 6694e8250e37058d5a8db23245a349db4e112fe4 (patch) | |
tree | 4fddb73e555bb50e588cb80dae43443bdb01c503 /arch | |
parent | 1cb80fcfe2beafc55610ebd1cd4a03331d65f8ba (diff) |
sh: Sync up the _64 linker script with the _32 version.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/kernel/vmlinux_64.lds.S | 199 |
1 files changed, 112 insertions, 87 deletions
diff --git a/arch/sh/kernel/vmlinux_64.lds.S b/arch/sh/kernel/vmlinux_64.lds.S index 9e30775ffc2b..f0f5771657dd 100644 --- a/arch/sh/kernel/vmlinux_64.lds.S +++ b/arch/sh/kernel/vmlinux_64.lds.S | |||
@@ -1,11 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * This file is subject to the terms and conditions of the GNU General Public | 2 | * ld script to make SH64 Linux kernel |
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 | * | 3 | * |
10 | * Copyright (C) 2000, 2001 Paolo Alberelli | 4 | * Copyright (C) 2000, 2001 Paolo Alberelli |
11 | * | 5 | * |
@@ -13,15 +7,19 @@ | |||
13 | * Add definition of empty_zero_page to be the first page of kernel image. | 7 | * Add definition of empty_zero_page to be the first page of kernel image. |
14 | * | 8 | * |
15 | * benedict.gaster@superh.com: 3rd May 2002 | 9 | * benedict.gaster@superh.com: 3rd May 2002 |
16 | * Added support for ramdisk, removing statically linked romfs at the same time. | 10 | * Added support for ramdisk, removing statically linked romfs at the |
11 | * same time. | ||
17 | * | 12 | * |
18 | * lethal@linux-sh.org: 9th May 2003 | 13 | * lethal@linux-sh.org: 9th May 2003 |
19 | * Kill off GLOBAL_NAME() usage and other CDC-isms. | 14 | * Kill off GLOBAL_NAME() usage and other CDC-isms. |
20 | * | 15 | * |
21 | * lethal@linux-sh.org: 19th May 2003 | 16 | * lethal@linux-sh.org: 19th May 2003 |
22 | * Remove support for ancient toolchains. | 17 | * Remove support for ancient toolchains. |
18 | * | ||
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 | ||
21 | * for more details. | ||
23 | */ | 22 | */ |
24 | |||
25 | #include <asm/page.h> | 23 | #include <asm/page.h> |
26 | #include <asm/cache.h> | 24 | #include <asm/cache.h> |
27 | #include <asm/thread_info.h> | 25 | #include <asm/thread_info.h> |
@@ -36,104 +34,131 @@ OUTPUT_ARCH(sh:sh5) | |||
36 | ENTRY(__start) | 34 | ENTRY(__start) |
37 | SECTIONS | 35 | SECTIONS |
38 | { | 36 | { |
39 | . = CONFIG_CACHED_MEMORY_OFFSET + CONFIG_MEMORY_START + PAGE_SIZE; | 37 | . = CONFIG_CACHED_MEMORY_OFFSET + CONFIG_MEMORY_START + PAGE_SIZE; |
40 | _text = .; /* Text and read-only data */ | 38 | _text = .; /* Text and read-only data */ |
41 | text = .; /* Text and read-only data */ | ||
42 | 39 | ||
43 | .empty_zero_page : C_PHYS(.empty_zero_page) { | 40 | .empty_zero_page : C_PHYS(.empty_zero_page) { |
44 | *(.empty_zero_page) | 41 | *(.empty_zero_page) |
45 | } = 0 | 42 | } = 0 |
46 | 43 | ||
47 | .text : C_PHYS(.text) { | 44 | .text : C_PHYS(.text) { |
48 | *(.text.head) | 45 | *(.text.head) |
49 | TEXT_TEXT | 46 | TEXT_TEXT |
50 | *(.text64) | 47 | *(.text64) |
51 | *(.text..SHmedia32) | 48 | *(.text..SHmedia32) |
52 | SCHED_TEXT | 49 | SCHED_TEXT |
53 | LOCK_TEXT | 50 | LOCK_TEXT |
54 | *(.fixup) | 51 | KPROBES_TEXT |
55 | *(.gnu.warning) | 52 | *(.fixup) |
53 | *(.gnu.warning) | ||
56 | #ifdef CONFIG_LITTLE_ENDIAN | 54 | #ifdef CONFIG_LITTLE_ENDIAN |
57 | } = 0x6ff0fff0 | 55 | } = 0x6ff0fff0 |
58 | #else | 56 | #else |
59 | } = 0xf0fff06f | 57 | } = 0xf0fff06f |
60 | #endif | 58 | #endif |
61 | 59 | ||
62 | /* We likely want __ex_table to be Cache Line aligned */ | 60 | /* We likely want __ex_table to be Cache Line aligned */ |
63 | . = ALIGN(L1_CACHE_BYTES); /* Exception table */ | 61 | . = ALIGN(L1_CACHE_BYTES); /* Exception table */ |
64 | __start___ex_table = .; | 62 | __start___ex_table = .; |
65 | __ex_table : C_PHYS(__ex_table) { *(__ex_table) } | 63 | __ex_table : C_PHYS(__ex_table) { *(__ex_table) } |
66 | __stop___ex_table = .; | 64 | __stop___ex_table = .; |
67 | 65 | ||
68 | _etext = .; /* End of text section */ | 66 | _etext = .; /* End of text section */ |
69 | 67 | ||
70 | NOTES | 68 | BUG_TABLE |
69 | NOTES | ||
70 | RO_DATA(PAGE_SIZE) | ||
71 | 71 | ||
72 | RODATA | 72 | . = ALIGN(THREAD_SIZE); |
73 | .data : C_PHYS(.data) { /* Data */ | ||
74 | *(.data.init_task) | ||
73 | 75 | ||
74 | .data : C_PHYS(.data) { /* Data */ | 76 | . = ALIGN(L1_CACHE_BYTES); |
75 | DATA_DATA | 77 | *(.data.cacheline_aligned) |
76 | CONSTRUCTORS | 78 | |
79 | . = ALIGN(L1_CACHE_BYTES); | ||
80 | *(.data.read_mostly) | ||
81 | |||
82 | . = ALIGN(PAGE_SIZE); | ||
83 | *(.data.page_aligned) | ||
84 | |||
85 | __nosave_begin = .; | ||
86 | *(.data.nosave) | ||
87 | . = ALIGN(PAGE_SIZE); | ||
88 | __nosave_end = .; | ||
89 | |||
90 | DATA_DATA | ||
91 | CONSTRUCTORS | ||
77 | } | 92 | } |
78 | 93 | ||
79 | . = ALIGN(PAGE_SIZE); | 94 | _edata = .; /* End of data section */ |
80 | .data.page_aligned : C_PHYS(.data.page_aligned) { *(.data.page_aligned) } | 95 | |
81 | 96 | . = ALIGN(PAGE_SIZE); /* Init code and data */ | |
82 | PERCPU(PAGE_SIZE) | 97 | __init_begin = .; |
83 | 98 | _sinittext = .; | |
84 | . = ALIGN(L1_CACHE_BYTES); | 99 | .init.text : C_PHYS(.init.text) { *(.init.text) } |
85 | .data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) } | 100 | _einittext = .; |
86 | 101 | .init.data : C_PHYS(.init.data) { *(.init.data) } | |
87 | _edata = .; /* End of data section */ | 102 | . = ALIGN(L1_CACHE_BYTES); /* Better if Cache Line aligned */ |
88 | 103 | __setup_start = .; | |
89 | . = ALIGN(THREAD_SIZE); /* init_task: structure size aligned */ | 104 | .init.setup : C_PHYS(.init.setup) { *(.init.setup) } |
90 | .data.init_task : C_PHYS(.data.init_task) { *(.data.init_task) } | 105 | __setup_end = .; |
91 | 106 | __initcall_start = .; | |
92 | . = ALIGN(PAGE_SIZE); /* Init code and data */ | 107 | .initcall.init : C_PHYS(.initcall.init) { |
93 | __init_begin = .; | 108 | INITCALLS |
94 | _sinittext = .; | 109 | } |
95 | .init.text : C_PHYS(.init.text) { *(.init.text) } | 110 | __initcall_end = .; |
96 | _einittext = .; | 111 | __con_initcall_start = .; |
97 | .init.data : C_PHYS(.init.data) { *(.init.data) } | 112 | .con_initcall.init : C_PHYS(.con_initcall.init) { |
98 | . = ALIGN(L1_CACHE_BYTES); /* Better if Cache Line aligned */ | 113 | *(.con_initcall.init) |
99 | __setup_start = .; | 114 | } |
100 | .init.setup : C_PHYS(.init.setup) { *(.init.setup) } | 115 | __con_initcall_end = .; |
101 | __setup_end = .; | 116 | |
102 | __initcall_start = .; | 117 | SECURITY_INIT |
103 | .initcall.init : C_PHYS(.initcall.init) { | ||
104 | INITCALLS | ||
105 | } | ||
106 | __initcall_end = .; | ||
107 | __con_initcall_start = .; | ||
108 | .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) } | ||
109 | __con_initcall_end = .; | ||
110 | SECURITY_INIT | ||
111 | 118 | ||
112 | #ifdef CONFIG_BLK_DEV_INITRD | 119 | #ifdef CONFIG_BLK_DEV_INITRD |
113 | __initramfs_start = .; | 120 | . = ALIGN(PAGE_SIZE); |
114 | .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) } | 121 | __initramfs_start = .; |
115 | __initramfs_end = .; | 122 | .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) } |
123 | __initramfs_end = .; | ||
116 | #endif | 124 | #endif |
117 | 125 | ||
118 | . = ALIGN(PAGE_SIZE); | 126 | . = ALIGN(8); |
119 | __init_end = .; | 127 | __machvec_start = .; |
120 | 128 | .machvec.init : C_PHYS(.machvec.init) { *(.machvec.init) } | |
121 | /* Align to the biggest single data representation, head and tail */ | 129 | __machvec_end = .; |
122 | . = ALIGN(8); | 130 | |
123 | __bss_start = .; /* BSS */ | 131 | PERCPU(PAGE_SIZE) |
124 | .bss : C_PHYS(.bss) { | 132 | |
125 | *(.bss) | 133 | /* |
134 | * .exit.text is discarded at runtime, not link time, to deal with | ||
135 | * references from __bug_table | ||
136 | */ | ||
137 | .exit.text : C_PHYS(.exit.text) { *(.exit.text) } | ||
138 | .exit.data : C_PHYS(.exit.data) { *(.exit.data) } | ||
139 | |||
140 | . = ALIGN(PAGE_SIZE); | ||
141 | .bss : C_PHYS(.bss) { | ||
142 | __init_end = .; | ||
143 | __bss_start = .; /* BSS */ | ||
144 | *(.bss.page_aligned) | ||
145 | *(.bss) | ||
146 | *(COMMON) | ||
147 | . = ALIGN(4); | ||
148 | _ebss = .; /* uClinux MTD sucks */ | ||
149 | _end = . ; | ||
126 | } | 150 | } |
127 | . = ALIGN(8); | 151 | |
128 | _end = . ; | 152 | /* |
129 | 153 | * When something in the kernel is NOT compiled as a module, the | |
130 | /* Sections to be discarded */ | 154 | * module cleanup code and data are put into these segments. Both |
131 | /DISCARD/ : { | 155 | * can then be thrown away, as cleanup code is never called unless |
132 | *(.exit.text) | 156 | * it's a module. |
133 | *(.exit.data) | 157 | */ |
134 | *(.exitcall.exit) | 158 | /DISCARD/ : { |
159 | *(.exitcall.exit) | ||
135 | } | 160 | } |
136 | 161 | ||
137 | STABS_DEBUG | 162 | STABS_DEBUG |
138 | DWARF_DEBUG | 163 | DWARF_DEBUG |
139 | } | 164 | } |