[PATCH] x86: Allow percpu variables to be page-aligned
[deliverable/linux.git] / arch / sh64 / kernel / vmlinux.lds.S
CommitLineData
1da177e4
LT
1/*
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
1da177e4
LT
25#include <asm/page.h>
26#include <asm/cache.h>
27#include <asm/processor.h>
28#include <asm/thread_info.h>
29
30#define LOAD_OFFSET CONFIG_CACHED_MEMORY_OFFSET
31#include <asm-generic/vmlinux.lds.h>
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)
42
43#define C_PHYS(x) AT (ADDR(x) - LOAD_OFFSET)
44
45ENTRY(__start)
46SECTIONS
47{
48 . = CONFIG_CACHED_MEMORY_OFFSET + CONFIG_MEMORY_START + PAGE_SIZE;
49 _text = .; /* Text and read-only data */
50 text = .; /* Text and read-only data */
51
52 .empty_zero_page : C_PHYS(.empty_zero_page) {
53 *(.empty_zero_page)
54 } = 0
55
56 .text : C_PHYS(.text) {
57 *(.text)
58 *(.text64)
59 *(.text..SHmedia32)
60 SCHED_TEXT
61 LOCK_TEXT
62 *(.fixup)
63 *(.gnu.warning)
64#ifdef CONFIG_LITTLE_ENDIAN
65 } = 0x6ff0fff0
66#else
67 } = 0xf0fff06f
68#endif
69
70 /* We likely want __ex_table to be Cache Line aligned */
71 . = ALIGN(L1_CACHE_BYTES); /* Exception table */
72 __start___ex_table = .;
73 __ex_table : C_PHYS(__ex_table) { *(__ex_table) }
74 __stop___ex_table = .;
75
76 RODATA
77
78 _etext = .; /* End of text section */
79
80 .data : C_PHYS(.data) { /* Data */
81 *(.data)
82 CONSTRUCTORS
83 }
84
85 . = ALIGN(PAGE_SIZE);
86 .data.page_aligned : C_PHYS(.data.page_aligned) { *(.data.page_aligned) }
87
b6e3590f 88 . = ALIGN(PAGE_SIZE);
1da177e4
LT
89 __per_cpu_start = .;
90 .data.percpu : C_PHYS(.data.percpu) { *(.data.percpu) }
91 __per_cpu_end = . ;
92 .data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) }
93
94 _edata = .; /* End of data section */
95
96 . = ALIGN(THREAD_SIZE); /* init_task: structure size aligned */
97 .data.init_task : C_PHYS(.data.init_task) { *(.data.init_task) }
98
99 . = ALIGN(PAGE_SIZE); /* Init code and data */
100 __init_begin = .;
101 _sinittext = .;
102 .init.text : C_PHYS(.init.text) { *(.init.text) }
103 _einittext = .;
104 .init.data : C_PHYS(.init.data) { *(.init.data) }
105 . = ALIGN(L1_CACHE_BYTES); /* Better if Cache Line aligned */
106 __setup_start = .;
107 .init.setup : C_PHYS(.init.setup) { *(.init.setup) }
108 __setup_end = .;
109 __initcall_start = .;
110 .initcall.init : C_PHYS(.initcall.init) {
61ce1efe 111 INITCALLS
1da177e4
LT
112 }
113 __initcall_end = .;
114 __con_initcall_start = .;
115 .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) }
116 __con_initcall_end = .;
117 SECURITY_INIT
67d38229
JPS
118
119#ifdef CONFIG_BLK_DEV_INITRD
1da177e4
LT
120 __initramfs_start = .;
121 .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) }
122 __initramfs_end = .;
67d38229
JPS
123#endif
124
1da177e4
LT
125 . = ALIGN(PAGE_SIZE);
126 __init_end = .;
127
128 /* Align to the biggest single data representation, head and tail */
129 . = ALIGN(8);
130 __bss_start = .; /* BSS */
131 .bss : C_PHYS(.bss) {
132 *(.bss)
133 }
134 . = ALIGN(8);
135 _end = . ;
136
137 /* Sections to be discarded */
138 /DISCARD/ : {
139 *(.exit.text)
140 *(.exit.data)
141 *(.exitcall.exit)
142 }
143
144 /* Stabs debugging sections. */
145 .stab 0 : C_PHYS(.stab) { *(.stab) }
146 .stabstr 0 : C_PHYS(.stabstr) { *(.stabstr) }
147 .stab.excl 0 : C_PHYS(.stab.excl) { *(.stab.excl) }
148 .stab.exclstr 0 : C_PHYS(.stab.exclstr) { *(.stab.exclstr) }
149 .stab.index 0 : C_PHYS(.stab.index) { *(.stab.index) }
150 .stab.indexstr 0 : C_PHYS(.stab.indexstr) { *(.stab.indexstr) }
151 .comment 0 : C_PHYS(.comment) { *(.comment) }
152 /* DWARF debug sections.
153 Symbols in the DWARF debugging section are relative to the beginning
154 of the section so we begin .debug at 0. */
155 /* DWARF 1 */
156 .debug 0 : C_PHYS(.debug) { *(.debug) }
157 .line 0 : C_PHYS(.line) { *(.line) }
158 /* GNU DWARF 1 extensions */
159 .debug_srcinfo 0 : C_PHYS(.debug_srcinfo) { *(.debug_srcinfo) }
160 .debug_sfnames 0 : C_PHYS(.debug_sfnames) { *(.debug_sfnames) }
161 /* DWARF 1.1 and DWARF 2 */
162 .debug_aranges 0 : C_PHYS(.debug_aranges) { *(.debug_aranges) }
163 .debug_pubnames 0 : C_PHYS(.debug_pubnames) { *(.debug_pubnames) }
164 /* DWARF 2 */
165 .debug_info 0 : C_PHYS(.debug_info) { *(.debug_info) }
166 .debug_abbrev 0 : C_PHYS(.debug_abbrev) { *(.debug_abbrev) }
167 .debug_line 0 : C_PHYS(.debug_line) { *(.debug_line) }
168 .debug_frame 0 : C_PHYS(.debug_frame) { *(.debug_frame) }
169 .debug_str 0 : C_PHYS(.debug_str) { *(.debug_str) }
170 .debug_loc 0 : C_PHYS(.debug_loc) { *(.debug_loc) }
171 .debug_macinfo 0 : C_PHYS(.debug_macinfo) { *(.debug_macinfo) }
172 /* SGI/MIPS DWARF 2 extensions */
173 .debug_weaknames 0 : C_PHYS(.debug_weaknames) { *(.debug_weaknames) }
174 .debug_funcnames 0 : C_PHYS(.debug_funcnames) { *(.debug_funcnames) }
175 .debug_typenames 0 : C_PHYS(.debug_typenames) { *(.debug_typenames) }
176 .debug_varnames 0 : C_PHYS(.debug_varnames) { *(.debug_varnames) }
177 /* These must appear regardless of . */
178}
This page took 0.199084 seconds and 5 git commands to generate.