diff options
author | Tim Abbott <tabbott@ksplice.com> | 2009-07-09 10:45:59 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-07-10 02:58:16 -0400 |
commit | 2802e34590f290173a3f2aa5a4d662ae5373b420 (patch) | |
tree | 81d76ceb80d0af8a886fa1eda7304784afb9c1d6 /arch/sh | |
parent | 727dc3fde82969609e1e69f1f12de83c2fe41238 (diff) |
sh: Clean up linker script using new linker script macros.
This patch converts the sh architecture to use the new linker script
macros in include/asm-generic/vmlinux.lds.h.
Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/kernel/vmlinux.lds.S | 87 |
1 files changed, 11 insertions, 76 deletions
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S index f53c76acaede..674ed8feb8ae 100644 --- a/arch/sh/kernel/vmlinux.lds.S +++ b/arch/sh/kernel/vmlinux.lds.S | |||
@@ -50,12 +50,7 @@ SECTIONS | |||
50 | _etext = .; /* End of text section */ | 50 | _etext = .; /* End of text section */ |
51 | } = 0x0009 | 51 | } = 0x0009 |
52 | 52 | ||
53 | . = ALIGN(16); /* Exception table */ | 53 | EXCEPTION_TABLE(16) |
54 | __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { | ||
55 | __start___ex_table = .; | ||
56 | *(__ex_table) | ||
57 | __stop___ex_table = .; | ||
58 | } | ||
59 | 54 | ||
60 | NOTES | 55 | NOTES |
61 | RO_DATA(PAGE_SIZE) | 56 | RO_DATA(PAGE_SIZE) |
@@ -71,69 +66,14 @@ SECTIONS | |||
71 | __uncached_end = .; | 66 | __uncached_end = .; |
72 | } | 67 | } |
73 | 68 | ||
74 | . = ALIGN(THREAD_SIZE); | 69 | RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) |
75 | .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */ | ||
76 | *(.data.init_task) | ||
77 | |||
78 | . = ALIGN(L1_CACHE_BYTES); | ||
79 | *(.data.cacheline_aligned) | ||
80 | |||
81 | . = ALIGN(L1_CACHE_BYTES); | ||
82 | *(.data.read_mostly) | ||
83 | |||
84 | . = ALIGN(PAGE_SIZE); | ||
85 | *(.data.page_aligned) | ||
86 | |||
87 | __nosave_begin = .; | ||
88 | *(.data.nosave) | ||
89 | . = ALIGN(PAGE_SIZE); | ||
90 | __nosave_end = .; | ||
91 | |||
92 | DATA_DATA | ||
93 | CONSTRUCTORS | ||
94 | } | ||
95 | 70 | ||
96 | _edata = .; /* End of data section */ | 71 | _edata = .; /* End of data section */ |
97 | 72 | ||
98 | . = ALIGN(PAGE_SIZE); /* Init code and data */ | 73 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
99 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { | 74 | __init_begin = .; |
100 | __init_begin = .; | 75 | INIT_TEXT_SECTION(PAGE_SIZE) |
101 | _sinittext = .; | 76 | INIT_DATA_SECTION(16) |
102 | INIT_TEXT | ||
103 | _einittext = .; | ||
104 | } | ||
105 | |||
106 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { INIT_DATA } | ||
107 | |||
108 | . = ALIGN(16); | ||
109 | .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { | ||
110 | __setup_start = .; | ||
111 | *(.init.setup) | ||
112 | __setup_end = .; | ||
113 | } | ||
114 | |||
115 | .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { | ||
116 | __initcall_start = .; | ||
117 | INITCALLS | ||
118 | __initcall_end = .; | ||
119 | } | ||
120 | |||
121 | .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) { | ||
122 | __con_initcall_start = .; | ||
123 | *(.con_initcall.init) | ||
124 | __con_initcall_end = .; | ||
125 | } | ||
126 | |||
127 | SECURITY_INIT | ||
128 | |||
129 | #ifdef CONFIG_BLK_DEV_INITRD | ||
130 | . = ALIGN(PAGE_SIZE); | ||
131 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { | ||
132 | __initramfs_start = .; | ||
133 | *(.init.ramfs) | ||
134 | __initramfs_end = .; | ||
135 | } | ||
136 | #endif | ||
137 | 77 | ||
138 | . = ALIGN(4); | 78 | . = ALIGN(4); |
139 | .machvec.init : AT(ADDR(.machvec.init) - LOAD_OFFSET) { | 79 | .machvec.init : AT(ADDR(.machvec.init) - LOAD_OFFSET) { |
@@ -152,16 +92,11 @@ SECTIONS | |||
152 | .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { EXIT_DATA } | 92 | .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { EXIT_DATA } |
153 | 93 | ||
154 | . = ALIGN(PAGE_SIZE); | 94 | . = ALIGN(PAGE_SIZE); |
155 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { | 95 | __init_end = .; |
156 | __init_end = .; | 96 | BSS(PAGE_SIZE) |
157 | __bss_start = .; /* BSS */ | 97 | . = ALIGN(4); |
158 | *(.bss.page_aligned) | 98 | _ebss = .; /* uClinux MTD sucks */ |
159 | *(.bss) | 99 | _end = . ; |
160 | *(COMMON) | ||
161 | . = ALIGN(4); | ||
162 | _ebss = .; /* uClinux MTD sucks */ | ||
163 | _end = . ; | ||
164 | } | ||
165 | 100 | ||
166 | /* | 101 | /* |
167 | * When something in the kernel is NOT compiled as a module, the | 102 | * When something in the kernel is NOT compiled as a module, the |
@@ -170,7 +105,7 @@ SECTIONS | |||
170 | * it's a module. | 105 | * it's a module. |
171 | */ | 106 | */ |
172 | /DISCARD/ : { | 107 | /DISCARD/ : { |
173 | *(.exitcall.exit) | 108 | EXIT_CALL |
174 | } | 109 | } |
175 | 110 | ||
176 | STABS_DEBUG | 111 | STABS_DEBUG |