aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-10-09 02:53:16 -0400
committerPaul Mundt <lethal@linux-sh.org>2007-10-09 02:53:16 -0400
commit3f7a0ce3b7db6906275eff042c9562aa8baf8487 (patch)
treeb2f898eef3297389de41ce5ba23f445cfc49ec7c
parent0f1d884d3aad334dc603303b7cc2a79aae9b2057 (diff)
sh64: linker script tidying and alignment fixups.
Use more of the generic section helpers, and get the alignment for some of the sections reduced. Follows the sh change. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh64/kernel/vmlinux.lds.S60
1 files changed, 9 insertions, 51 deletions
diff --git a/arch/sh64/kernel/vmlinux.lds.S b/arch/sh64/kernel/vmlinux.lds.S
index 267b4f9af2e1..f533a064da5f 100644
--- a/arch/sh64/kernel/vmlinux.lds.S
+++ b/arch/sh64/kernel/vmlinux.lds.S
@@ -30,14 +30,6 @@
30#define LOAD_OFFSET CONFIG_CACHED_MEMORY_OFFSET 30#define LOAD_OFFSET CONFIG_CACHED_MEMORY_OFFSET
31#include <asm-generic/vmlinux.lds.h> 31#include <asm-generic/vmlinux.lds.h>
32 32
33#ifdef NOTDEF
34#ifdef CONFIG_LITTLE_ENDIAN
35OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux")
36#else
37OUTPUT_FORMAT("elf32-sh64", "elf32-sh64", "elf32-sh64")
38#endif
39#endif
40
41OUTPUT_ARCH(sh:sh5) 33OUTPUT_ARCH(sh:sh5)
42 34
43#define C_PHYS(x) AT (ADDR(x) - LOAD_OFFSET) 35#define C_PHYS(x) AT (ADDR(x) - LOAD_OFFSET)
@@ -74,10 +66,12 @@ SECTIONS
74 __ex_table : C_PHYS(__ex_table) { *(__ex_table) } 66 __ex_table : C_PHYS(__ex_table) { *(__ex_table) }
75 __stop___ex_table = .; 67 __stop___ex_table = .;
76 68
77 RODATA
78
79 _etext = .; /* End of text section */ 69 _etext = .; /* End of text section */
80 70
71 NOTES
72
73 RODATA
74
81 .data : C_PHYS(.data) { /* Data */ 75 .data : C_PHYS(.data) { /* Data */
82 DATA_DATA 76 DATA_DATA
83 CONSTRUCTORS 77 CONSTRUCTORS
@@ -86,13 +80,9 @@ SECTIONS
86 . = ALIGN(PAGE_SIZE); 80 . = ALIGN(PAGE_SIZE);
87 .data.page_aligned : C_PHYS(.data.page_aligned) { *(.data.page_aligned) } 81 .data.page_aligned : C_PHYS(.data.page_aligned) { *(.data.page_aligned) }
88 82
89 . = ALIGN(PAGE_SIZE); 83 PERCPU(PAGE_SIZE)
90 __per_cpu_start = .; 84
91 .data.percpu : C_PHYS(.data.percpu) { 85 . = ALIGN(L1_CACHE_BYTES);
92 *(.data.percpu)
93 *(.data.percpu.shared_aligned)
94 }
95 __per_cpu_end = . ;
96 .data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) } 86 .data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) }
97 87
98 _edata = .; /* End of data section */ 88 _edata = .; /* End of data section */
@@ -145,38 +135,6 @@ SECTIONS
145 *(.exitcall.exit) 135 *(.exitcall.exit)
146 } 136 }
147 137
148 /* Stabs debugging sections. */ 138 STABS_DEBUG
149 .stab 0 : C_PHYS(.stab) { *(.stab) } 139 DWARF_DEBUG
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. */
159 /* DWARF 1 */
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) }
168 /* DWARF 2 */
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 . */
182} 140}