Commit ca967258b69eb65dcb07bbab90fdf964c6d2ec45

Authored by Sam Ravnborg
1 parent 7664709b44

all-archs: consolidate .data section definition in asm-generic

With this consolidation we can now modify the .data
section definition in one spot for all archs.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

Showing 29 changed files with 40 additions and 28 deletions Inline Diff

arch/alpha/kernel/vmlinux.lds.S
1 #include <asm-generic/vmlinux.lds.h> 1 #include <asm-generic/vmlinux.lds.h>
2 2
3 OUTPUT_FORMAT("elf64-alpha") 3 OUTPUT_FORMAT("elf64-alpha")
4 OUTPUT_ARCH(alpha) 4 OUTPUT_ARCH(alpha)
5 ENTRY(__start) 5 ENTRY(__start)
6 PHDRS { kernel PT_LOAD ; } 6 PHDRS { kernel PT_LOAD ; }
7 jiffies = jiffies_64; 7 jiffies = jiffies_64;
8 SECTIONS 8 SECTIONS
9 { 9 {
10 #ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS 10 #ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
11 . = 0xfffffc0000310000; 11 . = 0xfffffc0000310000;
12 #else 12 #else
13 . = 0xfffffc0001010000; 13 . = 0xfffffc0001010000;
14 #endif 14 #endif
15 15
16 _text = .; /* Text and read-only data */ 16 _text = .; /* Text and read-only data */
17 .text : { 17 .text : {
18 TEXT_TEXT 18 TEXT_TEXT
19 SCHED_TEXT 19 SCHED_TEXT
20 LOCK_TEXT 20 LOCK_TEXT
21 *(.fixup) 21 *(.fixup)
22 *(.gnu.warning) 22 *(.gnu.warning)
23 } :kernel 23 } :kernel
24 _etext = .; /* End of text section */ 24 _etext = .; /* End of text section */
25 25
26 . = ALIGN(16); 26 . = ALIGN(16);
27 __start___ex_table = .; /* Exception table */ 27 __start___ex_table = .; /* Exception table */
28 __ex_table : { *(__ex_table) } 28 __ex_table : { *(__ex_table) }
29 __stop___ex_table = .; 29 __stop___ex_table = .;
30 30
31 RODATA 31 RODATA
32 32
33 /* Will be freed after init */ 33 /* Will be freed after init */
34 . = ALIGN(8192); /* Init code and data */ 34 . = ALIGN(8192); /* Init code and data */
35 __init_begin = .; 35 __init_begin = .;
36 .init.text : { 36 .init.text : {
37 _sinittext = .; 37 _sinittext = .;
38 *(.init.text) 38 *(.init.text)
39 _einittext = .; 39 _einittext = .;
40 } 40 }
41 .init.data : { *(.init.data) } 41 .init.data : { *(.init.data) }
42 42
43 . = ALIGN(16); 43 . = ALIGN(16);
44 __setup_start = .; 44 __setup_start = .;
45 .init.setup : { *(.init.setup) } 45 .init.setup : { *(.init.setup) }
46 __setup_end = .; 46 __setup_end = .;
47 47
48 . = ALIGN(8); 48 . = ALIGN(8);
49 __initcall_start = .; 49 __initcall_start = .;
50 .initcall.init : { 50 .initcall.init : {
51 INITCALLS 51 INITCALLS
52 } 52 }
53 __initcall_end = .; 53 __initcall_end = .;
54 54
55 #ifdef CONFIG_BLK_DEV_INITRD 55 #ifdef CONFIG_BLK_DEV_INITRD
56 . = ALIGN(8192); 56 . = ALIGN(8192);
57 __initramfs_start = .; 57 __initramfs_start = .;
58 .init.ramfs : { *(.init.ramfs) } 58 .init.ramfs : { *(.init.ramfs) }
59 __initramfs_end = .; 59 __initramfs_end = .;
60 #endif 60 #endif
61 61
62 . = ALIGN(8); 62 . = ALIGN(8);
63 .con_initcall.init : { 63 .con_initcall.init : {
64 __con_initcall_start = .; 64 __con_initcall_start = .;
65 *(.con_initcall.init) 65 *(.con_initcall.init)
66 __con_initcall_end = .; 66 __con_initcall_end = .;
67 } 67 }
68 68
69 . = ALIGN(8); 69 . = ALIGN(8);
70 SECURITY_INIT 70 SECURITY_INIT
71 71
72 . = ALIGN(8192); 72 . = ALIGN(8192);
73 __per_cpu_start = .; 73 __per_cpu_start = .;
74 .data.percpu : { *(.data.percpu) } 74 .data.percpu : { *(.data.percpu) }
75 __per_cpu_end = .; 75 __per_cpu_end = .;
76 76
77 . = ALIGN(2*8192); 77 . = ALIGN(2*8192);
78 __init_end = .; 78 __init_end = .;
79 /* Freed after init ends here */ 79 /* Freed after init ends here */
80 80
81 /* Note 2 page alignment above. */ 81 /* Note 2 page alignment above. */
82 .data.init_thread : { *(.data.init_thread) } 82 .data.init_thread : { *(.data.init_thread) }
83 83
84 . = ALIGN(8192); 84 . = ALIGN(8192);
85 .data.page_aligned : { *(.data.page_aligned) } 85 .data.page_aligned : { *(.data.page_aligned) }
86 86
87 . = ALIGN(64); 87 . = ALIGN(64);
88 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 88 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
89 89
90 _data = .; 90 _data = .;
91 .data : { /* Data */ 91 .data : { /* Data */
92 *(.data) 92 DATA_DATA
93 CONSTRUCTORS 93 CONSTRUCTORS
94 } 94 }
95 95
96 .got : { *(.got) } 96 .got : { *(.got) }
97 .sdata : { *(.sdata) } 97 .sdata : { *(.sdata) }
98 98
99 _edata = .; /* End of data section */ 99 _edata = .; /* End of data section */
100 100
101 __bss_start = .; 101 __bss_start = .;
102 .sbss : { *(.sbss) *(.scommon) } 102 .sbss : { *(.sbss) *(.scommon) }
103 .bss : { *(.bss) *(COMMON) } 103 .bss : { *(.bss) *(COMMON) }
104 __bss_stop = .; 104 __bss_stop = .;
105 105
106 _end = .; 106 _end = .;
107 107
108 /* Sections to be discarded */ 108 /* Sections to be discarded */
109 /DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) } 109 /DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) }
110 110
111 .mdebug 0 : { *(.mdebug) } 111 .mdebug 0 : { *(.mdebug) }
112 .note 0 : { *(.note) } 112 .note 0 : { *(.note) }
113 .comment 0 : { *(.comment) } 113 .comment 0 : { *(.comment) }
114 114
115 /* Stabs debugging sections */ 115 /* Stabs debugging sections */
116 .stab 0 : { *(.stab) } 116 .stab 0 : { *(.stab) }
117 .stabstr 0 : { *(.stabstr) } 117 .stabstr 0 : { *(.stabstr) }
118 .stab.excl 0 : { *(.stab.excl) } 118 .stab.excl 0 : { *(.stab.excl) }
119 .stab.exclstr 0 : { *(.stab.exclstr) } 119 .stab.exclstr 0 : { *(.stab.exclstr) }
120 .stab.index 0 : { *(.stab.index) } 120 .stab.index 0 : { *(.stab.index) }
121 .stab.indexstr 0 : { *(.stab.indexstr) } 121 .stab.indexstr 0 : { *(.stab.indexstr) }
122 /* DWARF 1 */ 122 /* DWARF 1 */
123 .debug 0 : { *(.debug) } 123 .debug 0 : { *(.debug) }
124 .line 0 : { *(.line) } 124 .line 0 : { *(.line) }
125 /* GNU DWARF 1 extensions */ 125 /* GNU DWARF 1 extensions */
126 .debug_srcinfo 0 : { *(.debug_srcinfo) } 126 .debug_srcinfo 0 : { *(.debug_srcinfo) }
127 .debug_sfnames 0 : { *(.debug_sfnames) } 127 .debug_sfnames 0 : { *(.debug_sfnames) }
128 /* DWARF 1.1 and DWARF 2 */ 128 /* DWARF 1.1 and DWARF 2 */
129 .debug_aranges 0 : { *(.debug_aranges) } 129 .debug_aranges 0 : { *(.debug_aranges) }
130 .debug_pubnames 0 : { *(.debug_pubnames) } 130 .debug_pubnames 0 : { *(.debug_pubnames) }
131 /* DWARF 2 */ 131 /* DWARF 2 */
132 .debug_info 0 : { *(.debug_info) } 132 .debug_info 0 : { *(.debug_info) }
133 .debug_abbrev 0 : { *(.debug_abbrev) } 133 .debug_abbrev 0 : { *(.debug_abbrev) }
134 .debug_line 0 : { *(.debug_line) } 134 .debug_line 0 : { *(.debug_line) }
135 .debug_frame 0 : { *(.debug_frame) } 135 .debug_frame 0 : { *(.debug_frame) }
136 .debug_str 0 : { *(.debug_str) } 136 .debug_str 0 : { *(.debug_str) }
137 .debug_loc 0 : { *(.debug_loc) } 137 .debug_loc 0 : { *(.debug_loc) }
138 .debug_macinfo 0 : { *(.debug_macinfo) } 138 .debug_macinfo 0 : { *(.debug_macinfo) }
139 /* SGI/MIPS DWARF 2 extensions */ 139 /* SGI/MIPS DWARF 2 extensions */
140 .debug_weaknames 0 : { *(.debug_weaknames) } 140 .debug_weaknames 0 : { *(.debug_weaknames) }
141 .debug_funcnames 0 : { *(.debug_funcnames) } 141 .debug_funcnames 0 : { *(.debug_funcnames) }
142 .debug_typenames 0 : { *(.debug_typenames) } 142 .debug_typenames 0 : { *(.debug_typenames) }
143 .debug_varnames 0 : { *(.debug_varnames) } 143 .debug_varnames 0 : { *(.debug_varnames) }
144 } 144 }
145 145
arch/arm/kernel/vmlinux.lds.S
1 /* ld script to make ARM Linux kernel 1 /* ld script to make ARM Linux kernel
2 * taken from the i386 version by Russell King 2 * taken from the i386 version by Russell King
3 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz> 3 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
4 */ 4 */
5 5
6 #include <asm-generic/vmlinux.lds.h> 6 #include <asm-generic/vmlinux.lds.h>
7 #include <asm/thread_info.h> 7 #include <asm/thread_info.h>
8 #include <asm/memory.h> 8 #include <asm/memory.h>
9 9
10 OUTPUT_ARCH(arm) 10 OUTPUT_ARCH(arm)
11 ENTRY(stext) 11 ENTRY(stext)
12 12
13 #ifndef __ARMEB__ 13 #ifndef __ARMEB__
14 jiffies = jiffies_64; 14 jiffies = jiffies_64;
15 #else 15 #else
16 jiffies = jiffies_64 + 4; 16 jiffies = jiffies_64 + 4;
17 #endif 17 #endif
18 18
19 SECTIONS 19 SECTIONS
20 { 20 {
21 #ifdef CONFIG_XIP_KERNEL 21 #ifdef CONFIG_XIP_KERNEL
22 . = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR); 22 . = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR);
23 #else 23 #else
24 . = PAGE_OFFSET + TEXT_OFFSET; 24 . = PAGE_OFFSET + TEXT_OFFSET;
25 #endif 25 #endif
26 .text.head : { 26 .text.head : {
27 _stext = .; 27 _stext = .;
28 _sinittext = .; 28 _sinittext = .;
29 *(.text.head) 29 *(.text.head)
30 } 30 }
31 31
32 .init : { /* Init code and data */ 32 .init : { /* Init code and data */
33 *(.init.text) 33 *(.init.text)
34 _einittext = .; 34 _einittext = .;
35 __proc_info_begin = .; 35 __proc_info_begin = .;
36 *(.proc.info.init) 36 *(.proc.info.init)
37 __proc_info_end = .; 37 __proc_info_end = .;
38 __arch_info_begin = .; 38 __arch_info_begin = .;
39 *(.arch.info.init) 39 *(.arch.info.init)
40 __arch_info_end = .; 40 __arch_info_end = .;
41 __tagtable_begin = .; 41 __tagtable_begin = .;
42 *(.taglist.init) 42 *(.taglist.init)
43 __tagtable_end = .; 43 __tagtable_end = .;
44 . = ALIGN(16); 44 . = ALIGN(16);
45 __setup_start = .; 45 __setup_start = .;
46 *(.init.setup) 46 *(.init.setup)
47 __setup_end = .; 47 __setup_end = .;
48 __early_begin = .; 48 __early_begin = .;
49 *(.early_param.init) 49 *(.early_param.init)
50 __early_end = .; 50 __early_end = .;
51 __initcall_start = .; 51 __initcall_start = .;
52 INITCALLS 52 INITCALLS
53 __initcall_end = .; 53 __initcall_end = .;
54 __con_initcall_start = .; 54 __con_initcall_start = .;
55 *(.con_initcall.init) 55 *(.con_initcall.init)
56 __con_initcall_end = .; 56 __con_initcall_end = .;
57 __security_initcall_start = .; 57 __security_initcall_start = .;
58 *(.security_initcall.init) 58 *(.security_initcall.init)
59 __security_initcall_end = .; 59 __security_initcall_end = .;
60 #ifdef CONFIG_BLK_DEV_INITRD 60 #ifdef CONFIG_BLK_DEV_INITRD
61 . = ALIGN(32); 61 . = ALIGN(32);
62 __initramfs_start = .; 62 __initramfs_start = .;
63 usr/built-in.o(.init.ramfs) 63 usr/built-in.o(.init.ramfs)
64 __initramfs_end = .; 64 __initramfs_end = .;
65 #endif 65 #endif
66 . = ALIGN(4096); 66 . = ALIGN(4096);
67 __per_cpu_start = .; 67 __per_cpu_start = .;
68 *(.data.percpu) 68 *(.data.percpu)
69 __per_cpu_end = .; 69 __per_cpu_end = .;
70 #ifndef CONFIG_XIP_KERNEL 70 #ifndef CONFIG_XIP_KERNEL
71 __init_begin = _stext; 71 __init_begin = _stext;
72 *(.init.data) 72 *(.init.data)
73 . = ALIGN(4096); 73 . = ALIGN(4096);
74 __init_end = .; 74 __init_end = .;
75 #endif 75 #endif
76 } 76 }
77 77
78 /DISCARD/ : { /* Exit code and data */ 78 /DISCARD/ : { /* Exit code and data */
79 *(.exit.text) 79 *(.exit.text)
80 *(.exit.data) 80 *(.exit.data)
81 *(.exitcall.exit) 81 *(.exitcall.exit)
82 #ifndef CONFIG_MMU 82 #ifndef CONFIG_MMU
83 *(.fixup) 83 *(.fixup)
84 *(__ex_table) 84 *(__ex_table)
85 #endif 85 #endif
86 } 86 }
87 87
88 .text : { /* Real text segment */ 88 .text : { /* Real text segment */
89 _text = .; /* Text and read-only data */ 89 _text = .; /* Text and read-only data */
90 __exception_text_start = .; 90 __exception_text_start = .;
91 *(.exception.text) 91 *(.exception.text)
92 __exception_text_end = .; 92 __exception_text_end = .;
93 TEXT_TEXT 93 TEXT_TEXT
94 SCHED_TEXT 94 SCHED_TEXT
95 LOCK_TEXT 95 LOCK_TEXT
96 #ifdef CONFIG_MMU 96 #ifdef CONFIG_MMU
97 *(.fixup) 97 *(.fixup)
98 #endif 98 #endif
99 *(.gnu.warning) 99 *(.gnu.warning)
100 *(.rodata) 100 *(.rodata)
101 *(.rodata.*) 101 *(.rodata.*)
102 *(.glue_7) 102 *(.glue_7)
103 *(.glue_7t) 103 *(.glue_7t)
104 *(.got) /* Global offset table */ 104 *(.got) /* Global offset table */
105 } 105 }
106 106
107 RODATA 107 RODATA
108 108
109 _etext = .; /* End of text and rodata section */ 109 _etext = .; /* End of text and rodata section */
110 110
111 #ifdef CONFIG_XIP_KERNEL 111 #ifdef CONFIG_XIP_KERNEL
112 __data_loc = ALIGN(4); /* location in binary */ 112 __data_loc = ALIGN(4); /* location in binary */
113 . = PAGE_OFFSET + TEXT_OFFSET; 113 . = PAGE_OFFSET + TEXT_OFFSET;
114 #else 114 #else
115 . = ALIGN(THREAD_SIZE); 115 . = ALIGN(THREAD_SIZE);
116 __data_loc = .; 116 __data_loc = .;
117 #endif 117 #endif
118 118
119 .data : AT(__data_loc) { 119 .data : AT(__data_loc) {
120 __data_start = .; /* address in memory */ 120 __data_start = .; /* address in memory */
121 121
122 /* 122 /*
123 * first, the init task union, aligned 123 * first, the init task union, aligned
124 * to an 8192 byte boundary. 124 * to an 8192 byte boundary.
125 */ 125 */
126 *(.data.init_task) 126 *(.data.init_task)
127 127
128 #ifdef CONFIG_XIP_KERNEL 128 #ifdef CONFIG_XIP_KERNEL
129 . = ALIGN(4096); 129 . = ALIGN(4096);
130 __init_begin = .; 130 __init_begin = .;
131 *(.init.data) 131 *(.init.data)
132 . = ALIGN(4096); 132 . = ALIGN(4096);
133 __init_end = .; 133 __init_end = .;
134 #endif 134 #endif
135 135
136 . = ALIGN(4096); 136 . = ALIGN(4096);
137 __nosave_begin = .; 137 __nosave_begin = .;
138 *(.data.nosave) 138 *(.data.nosave)
139 . = ALIGN(4096); 139 . = ALIGN(4096);
140 __nosave_end = .; 140 __nosave_end = .;
141 141
142 /* 142 /*
143 * then the cacheline aligned data 143 * then the cacheline aligned data
144 */ 144 */
145 . = ALIGN(32); 145 . = ALIGN(32);
146 *(.data.cacheline_aligned) 146 *(.data.cacheline_aligned)
147 147
148 /* 148 /*
149 * The exception fixup table (might need resorting at runtime) 149 * The exception fixup table (might need resorting at runtime)
150 */ 150 */
151 . = ALIGN(32); 151 . = ALIGN(32);
152 __start___ex_table = .; 152 __start___ex_table = .;
153 #ifdef CONFIG_MMU 153 #ifdef CONFIG_MMU
154 *(__ex_table) 154 *(__ex_table)
155 #endif 155 #endif
156 __stop___ex_table = .; 156 __stop___ex_table = .;
157 157
158 /* 158 /*
159 * and the usual data section 159 * and the usual data section
160 */ 160 */
161 *(.data) 161 DATA_DATA
162 CONSTRUCTORS 162 CONSTRUCTORS
163 163
164 _edata = .; 164 _edata = .;
165 } 165 }
166 _edata_loc = __data_loc + SIZEOF(.data); 166 _edata_loc = __data_loc + SIZEOF(.data);
167 167
168 .bss : { 168 .bss : {
169 __bss_start = .; /* BSS */ 169 __bss_start = .; /* BSS */
170 *(.bss) 170 *(.bss)
171 *(COMMON) 171 *(COMMON)
172 _end = .; 172 _end = .;
173 } 173 }
174 /* Stabs debugging sections. */ 174 /* Stabs debugging sections. */
175 .stab 0 : { *(.stab) } 175 .stab 0 : { *(.stab) }
176 .stabstr 0 : { *(.stabstr) } 176 .stabstr 0 : { *(.stabstr) }
177 .stab.excl 0 : { *(.stab.excl) } 177 .stab.excl 0 : { *(.stab.excl) }
178 .stab.exclstr 0 : { *(.stab.exclstr) } 178 .stab.exclstr 0 : { *(.stab.exclstr) }
179 .stab.index 0 : { *(.stab.index) } 179 .stab.index 0 : { *(.stab.index) }
180 .stab.indexstr 0 : { *(.stab.indexstr) } 180 .stab.indexstr 0 : { *(.stab.indexstr) }
181 .comment 0 : { *(.comment) } 181 .comment 0 : { *(.comment) }
182 } 182 }
183 183
184 /* 184 /*
185 * These must never be empty 185 * These must never be empty
186 * If you have to comment these two assert statements out, your 186 * If you have to comment these two assert statements out, your
187 * binutils is too old (for other reasons as well) 187 * binutils is too old (for other reasons as well)
188 */ 188 */
189 ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support") 189 ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
190 ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined") 190 ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")
191 191
arch/arm26/kernel/vmlinux-arm26-xip.lds.in
1 /* ld script to make ARM Linux kernel 1 /* ld script to make ARM Linux kernel
2 * taken from the i386 version by Russell King 2 * taken from the i386 version by Russell King
3 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz> 3 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
4 * borrowed from Russels ARM port by Ian Molton 4 * borrowed from Russels ARM port by Ian Molton
5 */ 5 */
6 6
7 #include <asm-generic/vmlinux.lds.h> 7 #include <asm-generic/vmlinux.lds.h>
8 8
9 OUTPUT_ARCH(arm) 9 OUTPUT_ARCH(arm)
10 ENTRY(stext) 10 ENTRY(stext)
11 jiffies = jiffies_64; 11 jiffies = jiffies_64;
12 SECTIONS 12 SECTIONS
13 { 13 {
14 . = TEXTADDR; 14 . = TEXTADDR;
15 .init : { /* Init code and data */ 15 .init : { /* Init code and data */
16 _stext = .; 16 _stext = .;
17 __init_begin = .; 17 __init_begin = .;
18 _sinittext = .; 18 _sinittext = .;
19 *(.init.text) 19 *(.init.text)
20 _einittext = .; 20 _einittext = .;
21 __proc_info_begin = .; 21 __proc_info_begin = .;
22 *(.proc.info) 22 *(.proc.info)
23 __proc_info_end = .; 23 __proc_info_end = .;
24 __arch_info_begin = .; 24 __arch_info_begin = .;
25 *(.arch.info) 25 *(.arch.info)
26 __arch_info_end = .; 26 __arch_info_end = .;
27 __tagtable_begin = .; 27 __tagtable_begin = .;
28 *(.taglist) 28 *(.taglist)
29 __tagtable_end = .; 29 __tagtable_end = .;
30 . = ALIGN(16); 30 . = ALIGN(16);
31 __setup_start = .; 31 __setup_start = .;
32 *(.init.setup) 32 *(.init.setup)
33 __setup_end = .; 33 __setup_end = .;
34 __early_begin = .; 34 __early_begin = .;
35 *(__early_param) 35 *(__early_param)
36 __early_end = .; 36 __early_end = .;
37 __initcall_start = .; 37 __initcall_start = .;
38 *(.initcall1.init) 38 *(.initcall1.init)
39 *(.initcall2.init) 39 *(.initcall2.init)
40 *(.initcall3.init) 40 *(.initcall3.init)
41 *(.initcall4.init) 41 *(.initcall4.init)
42 *(.initcall5.init) 42 *(.initcall5.init)
43 *(.initcall6.init) 43 *(.initcall6.init)
44 *(.initcall7.init) 44 *(.initcall7.init)
45 __initcall_end = .; 45 __initcall_end = .;
46 __con_initcall_start = .; 46 __con_initcall_start = .;
47 *(.con_initcall.init) 47 *(.con_initcall.init)
48 __con_initcall_end = .; 48 __con_initcall_end = .;
49 #ifdef CONFIG_BLK_DEV_INITRD 49 #ifdef CONFIG_BLK_DEV_INITRD
50 . = ALIGN(32); 50 . = ALIGN(32);
51 __initramfs_start = .; 51 __initramfs_start = .;
52 usr/built-in.o(.init.ramfs) 52 usr/built-in.o(.init.ramfs)
53 __initramfs_end = .; 53 __initramfs_end = .;
54 #endif 54 #endif
55 . = ALIGN(32768); 55 . = ALIGN(32768);
56 __init_end = .; 56 __init_end = .;
57 } 57 }
58 58
59 /DISCARD/ : { /* Exit code and data */ 59 /DISCARD/ : { /* Exit code and data */
60 *(.exit.text) 60 *(.exit.text)
61 *(.exit.data) 61 *(.exit.data)
62 *(.exitcall.exit) 62 *(.exitcall.exit)
63 } 63 }
64 64
65 .text : { /* Real text segment */ 65 .text : { /* Real text segment */
66 _text = .; /* Text and read-only data */ 66 _text = .; /* Text and read-only data */
67 TEXT_TEXT 67 TEXT_TEXT
68 SCHED_TEXT 68 SCHED_TEXT
69 LOCK_TEXT /* FIXME - borrowed from arm32 - check*/ 69 LOCK_TEXT /* FIXME - borrowed from arm32 - check*/
70 *(.fixup) 70 *(.fixup)
71 *(.gnu.warning) 71 *(.gnu.warning)
72 *(.rodata) 72 *(.rodata)
73 *(.rodata.*) 73 *(.rodata.*)
74 *(.glue_7) 74 *(.glue_7)
75 *(.glue_7t) 75 *(.glue_7t)
76 *(.got) /* Global offset table */ 76 *(.got) /* Global offset table */
77 77
78 _etext = .; /* End of text section */ 78 _etext = .; /* End of text section */
79 } 79 }
80 80
81 . = ALIGN(16); 81 . = ALIGN(16);
82 __ex_table : { /* Exception table */ 82 __ex_table : { /* Exception table */
83 __start___ex_table = .; 83 __start___ex_table = .;
84 *(__ex_table) 84 *(__ex_table)
85 __stop___ex_table = .; 85 __stop___ex_table = .;
86 } 86 }
87 87
88 RODATA 88 RODATA
89 89
90 _endtext = .; 90 _endtext = .;
91 91
92 . = DATAADDR; 92 . = DATAADDR;
93 93
94 _sdata = .; 94 _sdata = .;
95 95
96 .data : { 96 .data : {
97 . = ALIGN(8192); 97 . = ALIGN(8192);
98 /* 98 /*
99 * first, the init thread union, aligned 99 * first, the init thread union, aligned
100 * to an 8192 byte boundary. (see arm26/kernel/init_task.c) 100 * to an 8192 byte boundary. (see arm26/kernel/init_task.c)
101 * FIXME - sould this be 32K aligned on arm26? 101 * FIXME - sould this be 32K aligned on arm26?
102 */ 102 */
103 *(.init.task) 103 *(.init.task)
104 104
105 /* 105 /*
106 * The cacheline aligned data 106 * The cacheline aligned data
107 */ 107 */
108 . = ALIGN(32); 108 . = ALIGN(32);
109 *(.data.cacheline_aligned) 109 *(.data.cacheline_aligned)
110 110
111 /* 111 /*
112 * and the usual data section 112 * and the usual data section
113 */ 113 */
114 *(.data) 114 DATA_DATA
115 CONSTRUCTORS 115 CONSTRUCTORS
116 116
117 *(.init.data) 117 *(.init.data)
118 118
119 _edata = .; 119 _edata = .;
120 } 120 }
121 121
122 .bss : { 122 .bss : {
123 __bss_start = .; /* BSS */ 123 __bss_start = .; /* BSS */
124 *(.bss) 124 *(.bss)
125 *(COMMON) 125 *(COMMON)
126 _end = . ; 126 _end = . ;
127 } 127 }
128 /* Stabs debugging sections. */ 128 /* Stabs debugging sections. */
129 .stab 0 : { *(.stab) } 129 .stab 0 : { *(.stab) }
130 .stabstr 0 : { *(.stabstr) } 130 .stabstr 0 : { *(.stabstr) }
131 .stab.excl 0 : { *(.stab.excl) } 131 .stab.excl 0 : { *(.stab.excl) }
132 .stab.exclstr 0 : { *(.stab.exclstr) } 132 .stab.exclstr 0 : { *(.stab.exclstr) }
133 .stab.index 0 : { *(.stab.index) } 133 .stab.index 0 : { *(.stab.index) }
134 .stab.indexstr 0 : { *(.stab.indexstr) } 134 .stab.indexstr 0 : { *(.stab.indexstr) }
135 .comment 0 : { *(.comment) } 135 .comment 0 : { *(.comment) }
136 } 136 }
137 137
arch/arm26/kernel/vmlinux-arm26.lds.in
1 /* ld script to make ARM Linux kernel 1 /* ld script to make ARM Linux kernel
2 * taken from the i386 version by Russell King 2 * taken from the i386 version by Russell King
3 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz> 3 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
4 * borrowed from Russels ARM port by Ian Molton and subsequently modified. 4 * borrowed from Russels ARM port by Ian Molton and subsequently modified.
5 */ 5 */
6 6
7 #include <asm-generic/vmlinux.lds.h> 7 #include <asm-generic/vmlinux.lds.h>
8 8
9 OUTPUT_ARCH(arm) 9 OUTPUT_ARCH(arm)
10 ENTRY(stext) 10 ENTRY(stext)
11 jiffies = jiffies_64; 11 jiffies = jiffies_64;
12 SECTIONS 12 SECTIONS
13 { 13 {
14 . = TEXTADDR; 14 . = TEXTADDR;
15 .init : { /* Init code and data */ 15 .init : { /* Init code and data */
16 _stext = .; 16 _stext = .;
17 __init_begin = .; 17 __init_begin = .;
18 _sinittext = .; 18 _sinittext = .;
19 *(.init.text) 19 *(.init.text)
20 _einittext = .; 20 _einittext = .;
21 __proc_info_begin = .; 21 __proc_info_begin = .;
22 *(.proc.info) 22 *(.proc.info)
23 __proc_info_end = .; 23 __proc_info_end = .;
24 __arch_info_begin = .; 24 __arch_info_begin = .;
25 *(.arch.info) 25 *(.arch.info)
26 __arch_info_end = .; 26 __arch_info_end = .;
27 __tagtable_begin = .; 27 __tagtable_begin = .;
28 *(.taglist) 28 *(.taglist)
29 __tagtable_end = .; 29 __tagtable_end = .;
30 *(.init.data) 30 *(.init.data)
31 . = ALIGN(16); 31 . = ALIGN(16);
32 __setup_start = .; 32 __setup_start = .;
33 *(.init.setup) 33 *(.init.setup)
34 __setup_end = .; 34 __setup_end = .;
35 __early_begin = .; 35 __early_begin = .;
36 *(__early_param) 36 *(__early_param)
37 __early_end = .; 37 __early_end = .;
38 __initcall_start = .; 38 __initcall_start = .;
39 *(.initcall1.init) 39 *(.initcall1.init)
40 *(.initcall2.init) 40 *(.initcall2.init)
41 *(.initcall3.init) 41 *(.initcall3.init)
42 *(.initcall4.init) 42 *(.initcall4.init)
43 *(.initcall5.init) 43 *(.initcall5.init)
44 *(.initcall6.init) 44 *(.initcall6.init)
45 *(.initcall7.init) 45 *(.initcall7.init)
46 __initcall_end = .; 46 __initcall_end = .;
47 __con_initcall_start = .; 47 __con_initcall_start = .;
48 *(.con_initcall.init) 48 *(.con_initcall.init)
49 __con_initcall_end = .; 49 __con_initcall_end = .;
50 #ifdef CONFIG_BLK_DEV_INITRD 50 #ifdef CONFIG_BLK_DEV_INITRD
51 . = ALIGN(32); 51 . = ALIGN(32);
52 __initramfs_start = .; 52 __initramfs_start = .;
53 usr/built-in.o(.init.ramfs) 53 usr/built-in.o(.init.ramfs)
54 __initramfs_end = .; 54 __initramfs_end = .;
55 #endif 55 #endif
56 . = ALIGN(32768); 56 . = ALIGN(32768);
57 __init_end = .; 57 __init_end = .;
58 } 58 }
59 59
60 /DISCARD/ : { /* Exit code and data */ 60 /DISCARD/ : { /* Exit code and data */
61 *(.exit.text) 61 *(.exit.text)
62 *(.exit.data) 62 *(.exit.data)
63 *(.exitcall.exit) 63 *(.exitcall.exit)
64 } 64 }
65 65
66 .text : { /* Real text segment */ 66 .text : { /* Real text segment */
67 _text = .; /* Text and read-only data */ 67 _text = .; /* Text and read-only data */
68 TEXT_TEXT 68 TEXT_TEXT
69 SCHED_TEXT 69 SCHED_TEXT
70 LOCK_TEXT 70 LOCK_TEXT
71 *(.fixup) 71 *(.fixup)
72 *(.gnu.warning) 72 *(.gnu.warning)
73 *(.rodata) 73 *(.rodata)
74 *(.rodata.*) 74 *(.rodata.*)
75 *(.glue_7) 75 *(.glue_7)
76 *(.glue_7t) 76 *(.glue_7t)
77 *(.got) /* Global offset table */ 77 *(.got) /* Global offset table */
78 78
79 _etext = .; /* End of text section */ 79 _etext = .; /* End of text section */
80 } 80 }
81 81
82 . = ALIGN(16); 82 . = ALIGN(16);
83 __ex_table : { /* Exception table */ 83 __ex_table : { /* Exception table */
84 __start___ex_table = .; 84 __start___ex_table = .;
85 *(__ex_table) 85 *(__ex_table)
86 __stop___ex_table = .; 86 __stop___ex_table = .;
87 } 87 }
88 88
89 RODATA 89 RODATA
90 90
91 . = ALIGN(8192); 91 . = ALIGN(8192);
92 92
93 .data : { 93 .data : {
94 /* 94 /*
95 * first, the init task union, aligned 95 * first, the init task union, aligned
96 * to an 8192 byte boundary. (see arm26/kernel/init_task.c) 96 * to an 8192 byte boundary. (see arm26/kernel/init_task.c)
97 */ 97 */
98 *(.init.task) 98 *(.init.task)
99 99
100 /* 100 /*
101 * The cacheline aligned data 101 * The cacheline aligned data
102 */ 102 */
103 . = ALIGN(32); 103 . = ALIGN(32);
104 *(.data.cacheline_aligned) 104 *(.data.cacheline_aligned)
105 105
106 /* 106 /*
107 * and the usual data section 107 * and the usual data section
108 */ 108 */
109 *(.data) 109 DATA_DATA
110 CONSTRUCTORS 110 CONSTRUCTORS
111 111
112 _edata = .; 112 _edata = .;
113 } 113 }
114 114
115 .bss : { 115 .bss : {
116 __bss_start = .; /* BSS */ 116 __bss_start = .; /* BSS */
117 *(.bss) 117 *(.bss)
118 *(COMMON) 118 *(COMMON)
119 _end = . ; 119 _end = . ;
120 } 120 }
121 /* Stabs debugging sections. */ 121 /* Stabs debugging sections. */
122 .stab 0 : { *(.stab) } 122 .stab 0 : { *(.stab) }
123 .stabstr 0 : { *(.stabstr) } 123 .stabstr 0 : { *(.stabstr) }
124 .stab.excl 0 : { *(.stab.excl) } 124 .stab.excl 0 : { *(.stab.excl) }
125 .stab.exclstr 0 : { *(.stab.exclstr) } 125 .stab.exclstr 0 : { *(.stab.exclstr) }
126 .stab.index 0 : { *(.stab.index) } 126 .stab.index 0 : { *(.stab.index) }
127 .stab.indexstr 0 : { *(.stab.indexstr) } 127 .stab.indexstr 0 : { *(.stab.indexstr) }
128 .comment 0 : { *(.comment) } 128 .comment 0 : { *(.comment) }
129 } 129 }
130 130
arch/avr32/kernel/vmlinux.lds.c
1 /* 1 /*
2 * AVR32 linker script for the Linux kernel 2 * AVR32 linker script for the Linux kernel
3 * 3 *
4 * Copyright (C) 2004-2006 Atmel Corporation 4 * Copyright (C) 2004-2006 Atmel Corporation
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 #define LOAD_OFFSET 0x00000000 10 #define LOAD_OFFSET 0x00000000
11 #include <asm-generic/vmlinux.lds.h> 11 #include <asm-generic/vmlinux.lds.h>
12 12
13 OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32") 13 OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
14 OUTPUT_ARCH(avr32) 14 OUTPUT_ARCH(avr32)
15 ENTRY(_start) 15 ENTRY(_start)
16 16
17 /* Big endian */ 17 /* Big endian */
18 jiffies = jiffies_64 + 4; 18 jiffies = jiffies_64 + 4;
19 19
20 SECTIONS 20 SECTIONS
21 { 21 {
22 . = CONFIG_ENTRY_ADDRESS; 22 . = CONFIG_ENTRY_ADDRESS;
23 .init : AT(ADDR(.init) - LOAD_OFFSET) { 23 .init : AT(ADDR(.init) - LOAD_OFFSET) {
24 _stext = .; 24 _stext = .;
25 __init_begin = .; 25 __init_begin = .;
26 _sinittext = .; 26 _sinittext = .;
27 *(.text.reset) 27 *(.text.reset)
28 *(.init.text) 28 *(.init.text)
29 /* 29 /*
30 * .exit.text is discarded at runtime, not 30 * .exit.text is discarded at runtime, not
31 * link time, to deal with references from 31 * link time, to deal with references from
32 * __bug_table 32 * __bug_table
33 */ 33 */
34 *(.exit.text) 34 *(.exit.text)
35 _einittext = .; 35 _einittext = .;
36 . = ALIGN(4); 36 . = ALIGN(4);
37 __tagtable_begin = .; 37 __tagtable_begin = .;
38 *(.taglist.init) 38 *(.taglist.init)
39 __tagtable_end = .; 39 __tagtable_end = .;
40 *(.init.data) 40 *(.init.data)
41 . = ALIGN(16); 41 . = ALIGN(16);
42 __setup_start = .; 42 __setup_start = .;
43 *(.init.setup) 43 *(.init.setup)
44 __setup_end = .; 44 __setup_end = .;
45 . = ALIGN(4); 45 . = ALIGN(4);
46 __initcall_start = .; 46 __initcall_start = .;
47 INITCALLS 47 INITCALLS
48 __initcall_end = .; 48 __initcall_end = .;
49 __con_initcall_start = .; 49 __con_initcall_start = .;
50 *(.con_initcall.init) 50 *(.con_initcall.init)
51 __con_initcall_end = .; 51 __con_initcall_end = .;
52 __security_initcall_start = .; 52 __security_initcall_start = .;
53 *(.security_initcall.init) 53 *(.security_initcall.init)
54 __security_initcall_end = .; 54 __security_initcall_end = .;
55 #ifdef CONFIG_BLK_DEV_INITRD 55 #ifdef CONFIG_BLK_DEV_INITRD
56 . = ALIGN(32); 56 . = ALIGN(32);
57 __initramfs_start = .; 57 __initramfs_start = .;
58 *(.init.ramfs) 58 *(.init.ramfs)
59 __initramfs_end = .; 59 __initramfs_end = .;
60 #endif 60 #endif
61 . = ALIGN(4096); 61 . = ALIGN(4096);
62 __init_end = .; 62 __init_end = .;
63 } 63 }
64 64
65 . = ALIGN(8192); 65 . = ALIGN(8192);
66 .text : AT(ADDR(.text) - LOAD_OFFSET) { 66 .text : AT(ADDR(.text) - LOAD_OFFSET) {
67 _evba = .; 67 _evba = .;
68 _text = .; 68 _text = .;
69 *(.ex.text) 69 *(.ex.text)
70 . = 0x50; 70 . = 0x50;
71 *(.tlbx.ex.text) 71 *(.tlbx.ex.text)
72 . = 0x60; 72 . = 0x60;
73 *(.tlbr.ex.text) 73 *(.tlbr.ex.text)
74 . = 0x70; 74 . = 0x70;
75 *(.tlbw.ex.text) 75 *(.tlbw.ex.text)
76 . = 0x100; 76 . = 0x100;
77 *(.scall.text) 77 *(.scall.text)
78 *(.irq.text) 78 *(.irq.text)
79 TEXT_TEXT 79 TEXT_TEXT
80 SCHED_TEXT 80 SCHED_TEXT
81 LOCK_TEXT 81 LOCK_TEXT
82 KPROBES_TEXT 82 KPROBES_TEXT
83 *(.fixup) 83 *(.fixup)
84 *(.gnu.warning) 84 *(.gnu.warning)
85 _etext = .; 85 _etext = .;
86 } = 0xd703d703 86 } = 0xd703d703
87 87
88 . = ALIGN(4); 88 . = ALIGN(4);
89 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { 89 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
90 __start___ex_table = .; 90 __start___ex_table = .;
91 *(__ex_table) 91 *(__ex_table)
92 __stop___ex_table = .; 92 __stop___ex_table = .;
93 } 93 }
94 94
95 BUG_TABLE 95 BUG_TABLE
96 96
97 RODATA 97 RODATA
98 98
99 . = ALIGN(8192); 99 . = ALIGN(8192);
100 100
101 .data : AT(ADDR(.data) - LOAD_OFFSET) { 101 .data : AT(ADDR(.data) - LOAD_OFFSET) {
102 _data = .; 102 _data = .;
103 _sdata = .; 103 _sdata = .;
104 /* 104 /*
105 * First, the init task union, aligned to an 8K boundary. 105 * First, the init task union, aligned to an 8K boundary.
106 */ 106 */
107 *(.data.init_task) 107 *(.data.init_task)
108 108
109 /* Then, the cacheline aligned data */ 109 /* Then, the cacheline aligned data */
110 . = ALIGN(32); 110 . = ALIGN(32);
111 *(.data.cacheline_aligned) 111 *(.data.cacheline_aligned)
112 112
113 /* And the rest... */ 113 /* And the rest... */
114 *(.data.rel*) 114 *(.data.rel*)
115 *(.data) 115 DATA_DATA
116 CONSTRUCTORS 116 CONSTRUCTORS
117 117
118 _edata = .; 118 _edata = .;
119 } 119 }
120 120
121 121
122 . = ALIGN(8); 122 . = ALIGN(8);
123 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { 123 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
124 __bss_start = .; 124 __bss_start = .;
125 *(.bss) 125 *(.bss)
126 *(COMMON) 126 *(COMMON)
127 . = ALIGN(8); 127 . = ALIGN(8);
128 __bss_stop = .; 128 __bss_stop = .;
129 _end = .; 129 _end = .;
130 } 130 }
131 131
132 /* When something in the kernel is NOT compiled as a module, the module 132 /* When something in the kernel is NOT compiled as a module, the module
133 * cleanup code and data are put into these segments. Both can then be 133 * cleanup code and data are put into these segments. Both can then be
134 * thrown away, as cleanup code is never called unless it's a module. 134 * thrown away, as cleanup code is never called unless it's a module.
135 */ 135 */
136 /DISCARD/ : { 136 /DISCARD/ : {
137 *(.exit.data) 137 *(.exit.data)
138 *(.exitcall.exit) 138 *(.exitcall.exit)
139 } 139 }
140 140
141 DWARF_DEBUG 141 DWARF_DEBUG
142 } 142 }
143 143
arch/blackfin/kernel/vmlinux.lds.S
1 /* 1 /*
2 * File: arch/blackfin/kernel/vmlinux.lds.S 2 * File: arch/blackfin/kernel/vmlinux.lds.S
3 * Based on: none - original work 3 * Based on: none - original work
4 * Author: 4 * Author:
5 * 5 *
6 * Created: Tue Sep 21 2004 6 * Created: Tue Sep 21 2004
7 * Description: Master linker script for blackfin architecture 7 * Description: Master linker script for blackfin architecture
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc. 10 * Copyright 2004-2006 Analog Devices Inc.
11 * 11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 * 13 *
14 * This program is free software; you can redistribute it and/or modify 14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by 15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or 16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version. 17 * (at your option) any later version.
18 * 18 *
19 * This program is distributed in the hope that it will be useful, 19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details. 22 * GNU General Public License for more details.
23 * 23 *
24 * You should have received a copy of the GNU General Public License 24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write 25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc., 26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */ 28 */
29 29
30 #define VMLINUX_SYMBOL(_sym_) _##_sym_ 30 #define VMLINUX_SYMBOL(_sym_) _##_sym_
31 31
32 #include <asm-generic/vmlinux.lds.h> 32 #include <asm-generic/vmlinux.lds.h>
33 #include <asm/mem_map.h> 33 #include <asm/mem_map.h>
34 34
35 35
36 OUTPUT_FORMAT("elf32-bfin") 36 OUTPUT_FORMAT("elf32-bfin")
37 ENTRY(__start) 37 ENTRY(__start)
38 _jiffies = _jiffies_64; 38 _jiffies = _jiffies_64;
39 39
40 MEMORY 40 MEMORY
41 { 41 {
42 ram : ORIGIN = CONFIG_BOOT_LOAD, LENGTH = (CONFIG_MEM_SIZE * 1024 * 1024) - (CONFIG_BOOT_LOAD) 42 ram : ORIGIN = CONFIG_BOOT_LOAD, LENGTH = (CONFIG_MEM_SIZE * 1024 * 1024) - (CONFIG_BOOT_LOAD)
43 l1_data_a : ORIGIN = L1_DATA_A_START, LENGTH = L1_DATA_A_LENGTH 43 l1_data_a : ORIGIN = L1_DATA_A_START, LENGTH = L1_DATA_A_LENGTH
44 l1_data_b : ORIGIN = L1_DATA_B_START, LENGTH = L1_DATA_B_LENGTH 44 l1_data_b : ORIGIN = L1_DATA_B_START, LENGTH = L1_DATA_B_LENGTH
45 l1_code : ORIGIN = L1_CODE_START, LENGTH = L1_CODE_LENGTH 45 l1_code : ORIGIN = L1_CODE_START, LENGTH = L1_CODE_LENGTH
46 l1_scratch : ORIGIN = L1_SCRATCH_START, LENGTH = L1_SCRATCH_LENGTH 46 l1_scratch : ORIGIN = L1_SCRATCH_START, LENGTH = L1_SCRATCH_LENGTH
47 } 47 }
48 48
49 SECTIONS 49 SECTIONS
50 { 50 {
51 . = CONFIG_BOOT_LOAD; 51 . = CONFIG_BOOT_LOAD;
52 52
53 .text : 53 .text :
54 { 54 {
55 _text = .; 55 _text = .;
56 __stext = .; 56 __stext = .;
57 TEXT_TEXT 57 TEXT_TEXT
58 SCHED_TEXT 58 SCHED_TEXT
59 *(.text.lock) 59 *(.text.lock)
60 . = ALIGN(16); 60 . = ALIGN(16);
61 ___start___ex_table = .; 61 ___start___ex_table = .;
62 *(__ex_table) 62 *(__ex_table)
63 ___stop___ex_table = .; 63 ___stop___ex_table = .;
64 64
65 *($code) 65 *($code)
66 *(.rodata) 66 *(.rodata)
67 *(.rodata.*) 67 *(.rodata.*)
68 *(__vermagic) /* Kernel version magic */ 68 *(__vermagic) /* Kernel version magic */
69 *(.rodata1) 69 *(.rodata1)
70 *(.fixup) 70 *(.fixup)
71 *(.spinlock.text) 71 *(.spinlock.text)
72 72
73 /* Kernel symbol table: Normal symbols */ 73 /* Kernel symbol table: Normal symbols */
74 . = ALIGN(4); 74 . = ALIGN(4);
75 ___start___ksymtab = .; 75 ___start___ksymtab = .;
76 *(__ksymtab) 76 *(__ksymtab)
77 ___stop___ksymtab = .; 77 ___stop___ksymtab = .;
78 78
79 /* Kernel symbol table: GPL-only symbols */ 79 /* Kernel symbol table: GPL-only symbols */
80 ___start___ksymtab_gpl = .; 80 ___start___ksymtab_gpl = .;
81 *(__ksymtab_gpl) 81 *(__ksymtab_gpl)
82 ___stop___ksymtab_gpl = .; 82 ___stop___ksymtab_gpl = .;
83 83
84 /* Kernel symbol table: Normal unused symbols */ \ 84 /* Kernel symbol table: Normal unused symbols */ \
85 ___start___ksymtab_unused = .; 85 ___start___ksymtab_unused = .;
86 *(__ksymtab_unused) 86 *(__ksymtab_unused)
87 ___stop___ksymtab_unused = .; 87 ___stop___ksymtab_unused = .;
88 88
89 /* Kernel symbol table: GPL-only unused symbols */ 89 /* Kernel symbol table: GPL-only unused symbols */
90 ___start___ksymtab_unused_gpl = .; 90 ___start___ksymtab_unused_gpl = .;
91 *(__ksymtab_unused_gpl) 91 *(__ksymtab_unused_gpl)
92 ___stop___ksymtab_unused_gpl = .; 92 ___stop___ksymtab_unused_gpl = .;
93 93
94 94
95 /* Kernel symbol table: GPL-future symbols */ 95 /* Kernel symbol table: GPL-future symbols */
96 ___start___ksymtab_gpl_future = .; 96 ___start___ksymtab_gpl_future = .;
97 *(__ksymtab_gpl_future) 97 *(__ksymtab_gpl_future)
98 ___stop___ksymtab_gpl_future = .; 98 ___stop___ksymtab_gpl_future = .;
99 99
100 /* Kernel symbol table: Normal symbols */ 100 /* Kernel symbol table: Normal symbols */
101 ___start___kcrctab = .; 101 ___start___kcrctab = .;
102 *(__kcrctab) 102 *(__kcrctab)
103 ___stop___kcrctab = .; 103 ___stop___kcrctab = .;
104 104
105 /* Kernel symbol table: GPL-only symbols */ 105 /* Kernel symbol table: GPL-only symbols */
106 ___start___kcrctab_gpl = .; 106 ___start___kcrctab_gpl = .;
107 *(__kcrctab_gpl) 107 *(__kcrctab_gpl)
108 ___stop___kcrctab_gpl = .; 108 ___stop___kcrctab_gpl = .;
109 109
110 /* Kernel symbol table: GPL-future symbols */ 110 /* Kernel symbol table: GPL-future symbols */
111 ___start___kcrctab_gpl_future = .; 111 ___start___kcrctab_gpl_future = .;
112 *(__kcrctab_gpl_future) 112 *(__kcrctab_gpl_future)
113 ___stop___kcrctab_gpl_future = .; 113 ___stop___kcrctab_gpl_future = .;
114 114
115 /* Kernel symbol table: strings */ 115 /* Kernel symbol table: strings */
116 *(__ksymtab_strings) 116 *(__ksymtab_strings)
117 117
118 . = ALIGN(4); 118 . = ALIGN(4);
119 __etext = .; 119 __etext = .;
120 } > ram 120 } > ram
121 121
122 .init : 122 .init :
123 { 123 {
124 . = ALIGN(4096); 124 . = ALIGN(4096);
125 ___init_begin = .; 125 ___init_begin = .;
126 __sinittext = .; 126 __sinittext = .;
127 *(.init.text) 127 *(.init.text)
128 __einittext = .; 128 __einittext = .;
129 *(.init.data) 129 *(.init.data)
130 . = ALIGN(16); 130 . = ALIGN(16);
131 ___setup_start = .; 131 ___setup_start = .;
132 *(.init.setup) 132 *(.init.setup)
133 ___setup_end = .; 133 ___setup_end = .;
134 ___start___param = .; 134 ___start___param = .;
135 *(__param) 135 *(__param)
136 ___stop___param = .; 136 ___stop___param = .;
137 ___initcall_start = .; 137 ___initcall_start = .;
138 INITCALLS 138 INITCALLS
139 ___initcall_end = .; 139 ___initcall_end = .;
140 ___con_initcall_start = .; 140 ___con_initcall_start = .;
141 *(.con_initcall.init) 141 *(.con_initcall.init)
142 ___con_initcall_end = .; 142 ___con_initcall_end = .;
143 ___security_initcall_start = .; 143 ___security_initcall_start = .;
144 *(.security_initcall.init) 144 *(.security_initcall.init)
145 ___security_initcall_end = .; 145 ___security_initcall_end = .;
146 . = ALIGN(4); 146 . = ALIGN(4);
147 ___initramfs_start = .; 147 ___initramfs_start = .;
148 *(.init.ramfs) 148 *(.init.ramfs)
149 ___initramfs_end = .; 149 ___initramfs_end = .;
150 . = ALIGN(4); 150 . = ALIGN(4);
151 ___init_end = .; 151 ___init_end = .;
152 } > ram 152 } > ram
153 153
154 __l1_lma_start = .; 154 __l1_lma_start = .;
155 155
156 .text_l1 : 156 .text_l1 :
157 { 157 {
158 . = ALIGN(4); 158 . = ALIGN(4);
159 __stext_l1 = .; 159 __stext_l1 = .;
160 *(.l1.text) 160 *(.l1.text)
161 161
162 . = ALIGN(4); 162 . = ALIGN(4);
163 __etext_l1 = .; 163 __etext_l1 = .;
164 } > l1_code AT > ram 164 } > l1_code AT > ram
165 165
166 .data_l1 : 166 .data_l1 :
167 { 167 {
168 . = ALIGN(4); 168 . = ALIGN(4);
169 __sdata_l1 = .; 169 __sdata_l1 = .;
170 *(.l1.data) 170 *(.l1.data)
171 __edata_l1 = .; 171 __edata_l1 = .;
172 172
173 . = ALIGN(4); 173 . = ALIGN(4);
174 __sbss_l1 = .; 174 __sbss_l1 = .;
175 *(.l1.bss) 175 *(.l1.bss)
176 176
177 . = ALIGN(32); 177 . = ALIGN(32);
178 *(.data_l1.cacheline_aligned) 178 *(.data_l1.cacheline_aligned)
179 179
180 . = ALIGN(4); 180 . = ALIGN(4);
181 __ebss_l1 = .; 181 __ebss_l1 = .;
182 } > l1_data_a AT > ram 182 } > l1_data_a AT > ram
183 .data_b_l1 : 183 .data_b_l1 :
184 { 184 {
185 . = ALIGN(4); 185 . = ALIGN(4);
186 __sdata_b_l1 = .; 186 __sdata_b_l1 = .;
187 *(.l1.data.B) 187 *(.l1.data.B)
188 __edata_b_l1 = .; 188 __edata_b_l1 = .;
189 189
190 . = ALIGN(4); 190 . = ALIGN(4);
191 __sbss_b_l1 = .; 191 __sbss_b_l1 = .;
192 *(.l1.bss.B) 192 *(.l1.bss.B)
193 193
194 . = ALIGN(4); 194 . = ALIGN(4);
195 __ebss_b_l1 = .; 195 __ebss_b_l1 = .;
196 } > l1_data_b AT > ram 196 } > l1_data_b AT > ram
197 197
198 .data : 198 .data :
199 { 199 {
200 __sdata = .; 200 __sdata = .;
201 . = ALIGN(0x2000); 201 . = ALIGN(0x2000);
202 *(.data.init_task) 202 *(.data.init_task)
203 *(.data) 203 DATA_DATA
204 204
205 . = ALIGN(32); 205 . = ALIGN(32);
206 *(.data.cacheline_aligned) 206 *(.data.cacheline_aligned)
207 207
208 . = ALIGN(0x2000); 208 . = ALIGN(0x2000);
209 __edata = .; 209 __edata = .;
210 } > ram 210 } > ram
211 211
212 /DISCARD/ : { /* Exit code and data*/ 212 /DISCARD/ : { /* Exit code and data*/
213 *(.exit.text) 213 *(.exit.text)
214 *(.exit.data) 214 *(.exit.data)
215 *(.exitcall.exit) 215 *(.exitcall.exit)
216 } > ram 216 } > ram
217 217
218 .bss : 218 .bss :
219 { 219 {
220 . = ALIGN(4); 220 . = ALIGN(4);
221 ___bss_start = .; 221 ___bss_start = .;
222 *(.bss) 222 *(.bss)
223 *(COMMON) 223 *(COMMON)
224 . = ALIGN(4); 224 . = ALIGN(4);
225 ___bss_stop = .; 225 ___bss_stop = .;
226 __end = . ; 226 __end = . ;
227 } > ram 227 } > ram
228 } 228 }
229 229
arch/frv/kernel/vmlinux.lds.S
1 /* ld script to make FRV Linux kernel 1 /* ld script to make FRV Linux kernel
2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>; 2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
3 */ 3 */
4 OUTPUT_FORMAT("elf32-frv", "elf32-frv", "elf32-frv") 4 OUTPUT_FORMAT("elf32-frv", "elf32-frv", "elf32-frv")
5 OUTPUT_ARCH(frv) 5 OUTPUT_ARCH(frv)
6 ENTRY(_start) 6 ENTRY(_start)
7 7
8 #include <asm-generic/vmlinux.lds.h> 8 #include <asm-generic/vmlinux.lds.h>
9 #include <asm/processor.h> 9 #include <asm/processor.h>
10 #include <asm/page.h> 10 #include <asm/page.h>
11 #include <asm/cache.h> 11 #include <asm/cache.h>
12 #include <asm/thread_info.h> 12 #include <asm/thread_info.h>
13 13
14 jiffies = jiffies_64 + 4; 14 jiffies = jiffies_64 + 4;
15 15
16 __page_offset = 0xc0000000; /* start of area covered by struct pages */ 16 __page_offset = 0xc0000000; /* start of area covered by struct pages */
17 __kernel_image_start = __page_offset; /* address at which kernel image resides */ 17 __kernel_image_start = __page_offset; /* address at which kernel image resides */
18 18
19 SECTIONS 19 SECTIONS
20 { 20 {
21 . = __kernel_image_start; 21 . = __kernel_image_start;
22 22
23 /* discardable initialisation code and data */ 23 /* discardable initialisation code and data */
24 . = ALIGN(PAGE_SIZE); /* Init code and data */ 24 . = ALIGN(PAGE_SIZE); /* Init code and data */
25 __init_begin = .; 25 __init_begin = .;
26 26
27 _sinittext = .; 27 _sinittext = .;
28 .init.text : { 28 .init.text : {
29 *(.text.head) 29 *(.text.head)
30 #ifndef CONFIG_DEBUG_INFO 30 #ifndef CONFIG_DEBUG_INFO
31 *(.init.text) 31 *(.init.text)
32 *(.exit.text) 32 *(.exit.text)
33 *(.exit.data) 33 *(.exit.data)
34 *(.exitcall.exit) 34 *(.exitcall.exit)
35 #endif 35 #endif
36 } 36 }
37 _einittext = .; 37 _einittext = .;
38 .init.data : { *(.init.data) } 38 .init.data : { *(.init.data) }
39 39
40 . = ALIGN(8); 40 . = ALIGN(8);
41 __setup_start = .; 41 __setup_start = .;
42 .setup.init : { KEEP(*(.init.setup)) } 42 .setup.init : { KEEP(*(.init.setup)) }
43 __setup_end = .; 43 __setup_end = .;
44 44
45 __initcall_start = .; 45 __initcall_start = .;
46 .initcall.init : { 46 .initcall.init : {
47 INITCALLS 47 INITCALLS
48 } 48 }
49 __initcall_end = .; 49 __initcall_end = .;
50 __con_initcall_start = .; 50 __con_initcall_start = .;
51 .con_initcall.init : { *(.con_initcall.init) } 51 .con_initcall.init : { *(.con_initcall.init) }
52 __con_initcall_end = .; 52 __con_initcall_end = .;
53 SECURITY_INIT 53 SECURITY_INIT
54 . = ALIGN(4); 54 . = ALIGN(4);
55 __alt_instructions = .; 55 __alt_instructions = .;
56 .altinstructions : { *(.altinstructions) } 56 .altinstructions : { *(.altinstructions) }
57 __alt_instructions_end = .; 57 __alt_instructions_end = .;
58 .altinstr_replacement : { *(.altinstr_replacement) } 58 .altinstr_replacement : { *(.altinstr_replacement) }
59 59
60 . = ALIGN(4096); 60 . = ALIGN(4096);
61 __per_cpu_start = .; 61 __per_cpu_start = .;
62 .data.percpu : { *(.data.percpu) } 62 .data.percpu : { *(.data.percpu) }
63 __per_cpu_end = .; 63 __per_cpu_end = .;
64 64
65 #ifdef CONFIG_BLK_DEV_INITRD 65 #ifdef CONFIG_BLK_DEV_INITRD
66 . = ALIGN(4096); 66 . = ALIGN(4096);
67 __initramfs_start = .; 67 __initramfs_start = .;
68 .init.ramfs : { *(.init.ramfs) } 68 .init.ramfs : { *(.init.ramfs) }
69 __initramfs_end = .; 69 __initramfs_end = .;
70 #endif 70 #endif
71 71
72 . = ALIGN(THREAD_SIZE); 72 . = ALIGN(THREAD_SIZE);
73 __init_end = .; 73 __init_end = .;
74 74
75 /* put sections together that have massive alignment issues */ 75 /* put sections together that have massive alignment issues */
76 . = ALIGN(THREAD_SIZE); 76 . = ALIGN(THREAD_SIZE);
77 .data.init_task : { 77 .data.init_task : {
78 /* init task record & stack */ 78 /* init task record & stack */
79 *(.data.init_task) 79 *(.data.init_task)
80 } 80 }
81 81
82 .trap : { 82 .trap : {
83 /* trap table management - read entry-table.S before modifying */ 83 /* trap table management - read entry-table.S before modifying */
84 . = ALIGN(8192); 84 . = ALIGN(8192);
85 __trap_tables = .; 85 __trap_tables = .;
86 *(.trap.user) 86 *(.trap.user)
87 *(.trap.kernel) 87 *(.trap.kernel)
88 . = ALIGN(4096); 88 . = ALIGN(4096);
89 *(.trap.break) 89 *(.trap.break)
90 } 90 }
91 91
92 . = ALIGN(4096); 92 . = ALIGN(4096);
93 .data.page_aligned : { *(.data.idt) } 93 .data.page_aligned : { *(.data.idt) }
94 94
95 . = ALIGN(L1_CACHE_BYTES); 95 . = ALIGN(L1_CACHE_BYTES);
96 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 96 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
97 97
98 /* Text and read-only data */ 98 /* Text and read-only data */
99 . = ALIGN(4); 99 . = ALIGN(4);
100 _text = .; 100 _text = .;
101 _stext = .; 101 _stext = .;
102 .text : { 102 .text : {
103 *( 103 *(
104 .text.start .text.* 104 .text.start .text.*
105 #ifdef CONFIG_DEBUG_INFO 105 #ifdef CONFIG_DEBUG_INFO
106 .init.text 106 .init.text
107 .exit.text 107 .exit.text
108 .exitcall.exit 108 .exitcall.exit
109 #endif 109 #endif
110 ) 110 )
111 TEXT_TEXT 111 TEXT_TEXT
112 SCHED_TEXT 112 SCHED_TEXT
113 LOCK_TEXT 113 LOCK_TEXT
114 *(.fixup) 114 *(.fixup)
115 *(.gnu.warning) 115 *(.gnu.warning)
116 *(.exitcall.exit) 116 *(.exitcall.exit)
117 } = 0x9090 117 } = 0x9090
118 118
119 _etext = .; /* End of text section */ 119 _etext = .; /* End of text section */
120 120
121 RODATA 121 RODATA
122 122
123 .rodata : { 123 .rodata : {
124 *(.trap.vector) 124 *(.trap.vector)
125 125
126 /* this clause must not be modified - the ordering and adjacency are imperative */ 126 /* this clause must not be modified - the ordering and adjacency are imperative */
127 __trap_fixup_tables = .; 127 __trap_fixup_tables = .;
128 *(.trap.fixup.user .trap.fixup.kernel) 128 *(.trap.fixup.user .trap.fixup.kernel)
129 129
130 } 130 }
131 131
132 . = ALIGN(8); /* Exception table */ 132 . = ALIGN(8); /* Exception table */
133 __start___ex_table = .; 133 __start___ex_table = .;
134 __ex_table : { KEEP(*(__ex_table)) } 134 __ex_table : { KEEP(*(__ex_table)) }
135 __stop___ex_table = .; 135 __stop___ex_table = .;
136 136
137 _sdata = .; 137 _sdata = .;
138 .data : { /* Data */ 138 .data : { /* Data */
139 *(.data .data.*) 139 DATA_DATA
140 *(.data.*)
140 *(.exit.data) 141 *(.exit.data)
141 CONSTRUCTORS 142 CONSTRUCTORS
142 } 143 }
143 144
144 _edata = .; /* End of data section */ 145 _edata = .; /* End of data section */
145 146
146 /* GP section */ 147 /* GP section */
147 . = ALIGN(L1_CACHE_BYTES); 148 . = ALIGN(L1_CACHE_BYTES);
148 _gp = . + 2048; 149 _gp = . + 2048;
149 PROVIDE (gp = _gp); 150 PROVIDE (gp = _gp);
150 151
151 .sdata : { *(.sdata .sdata.*) } 152 .sdata : { *(.sdata .sdata.*) }
152 153
153 /* BSS */ 154 /* BSS */
154 . = ALIGN(L1_CACHE_BYTES); 155 . = ALIGN(L1_CACHE_BYTES);
155 __bss_start = .; 156 __bss_start = .;
156 157
157 .sbss : { *(.sbss .sbss.*) } 158 .sbss : { *(.sbss .sbss.*) }
158 .bss : { *(.bss .bss.*) } 159 .bss : { *(.bss .bss.*) }
159 .bss.stack : { *(.bss) } 160 .bss.stack : { *(.bss) }
160 161
161 __bss_stop = .; 162 __bss_stop = .;
162 _end = . ; 163 _end = . ;
163 . = ALIGN(PAGE_SIZE); 164 . = ALIGN(PAGE_SIZE);
164 __kernel_image_end = .; 165 __kernel_image_end = .;
165 166
166 /* Stabs debugging sections. */ 167 /* Stabs debugging sections. */
167 .stab 0 : { *(.stab) } 168 .stab 0 : { *(.stab) }
168 .stabstr 0 : { *(.stabstr) } 169 .stabstr 0 : { *(.stabstr) }
169 .stab.excl 0 : { *(.stab.excl) } 170 .stab.excl 0 : { *(.stab.excl) }
170 .stab.exclstr 0 : { *(.stab.exclstr) } 171 .stab.exclstr 0 : { *(.stab.exclstr) }
171 .stab.index 0 : { *(.stab.index) } 172 .stab.index 0 : { *(.stab.index) }
172 .stab.indexstr 0 : { *(.stab.indexstr) } 173 .stab.indexstr 0 : { *(.stab.indexstr) }
173 174
174 .debug_line 0 : { *(.debug_line) } 175 .debug_line 0 : { *(.debug_line) }
175 .debug_info 0 : { *(.debug_info) } 176 .debug_info 0 : { *(.debug_info) }
176 .debug_abbrev 0 : { *(.debug_abbrev) } 177 .debug_abbrev 0 : { *(.debug_abbrev) }
177 .debug_aranges 0 : { *(.debug_aranges) } 178 .debug_aranges 0 : { *(.debug_aranges) }
178 .debug_frame 0 : { *(.debug_frame) } 179 .debug_frame 0 : { *(.debug_frame) }
179 .debug_pubnames 0 : { *(.debug_pubnames) } 180 .debug_pubnames 0 : { *(.debug_pubnames) }
180 .debug_str 0 : { *(.debug_str) } 181 .debug_str 0 : { *(.debug_str) }
181 .debug_ranges 0 : { *(.debug_ranges) } 182 .debug_ranges 0 : { *(.debug_ranges) }
182 183
183 .comment 0 : { *(.comment) } 184 .comment 0 : { *(.comment) }
184 } 185 }
185 186
186 __kernel_image_size_no_bss = __bss_start - __kernel_image_start; 187 __kernel_image_size_no_bss = __bss_start - __kernel_image_start;
187 188
arch/h8300/kernel/vmlinux.lds.S
1 #define VMLINUX_SYMBOL(_sym_) _##_sym_ 1 #define VMLINUX_SYMBOL(_sym_) _##_sym_
2 #include <asm-generic/vmlinux.lds.h> 2 #include <asm-generic/vmlinux.lds.h>
3 3
4 /* target memory map */ 4 /* target memory map */
5 #ifdef CONFIG_H8300H_GENERIC 5 #ifdef CONFIG_H8300H_GENERIC
6 #define ROMTOP 0x000000 6 #define ROMTOP 0x000000
7 #define ROMSIZE 0x400000 7 #define ROMSIZE 0x400000
8 #define RAMTOP 0x400000 8 #define RAMTOP 0x400000
9 #define RAMSIZE 0x400000 9 #define RAMSIZE 0x400000
10 #endif 10 #endif
11 11
12 #ifdef CONFIG_H8300H_AKI3068NET 12 #ifdef CONFIG_H8300H_AKI3068NET
13 #define ROMTOP 0x000000 13 #define ROMTOP 0x000000
14 #define ROMSIZE 0x080000 14 #define ROMSIZE 0x080000
15 #define RAMTOP 0x400000 15 #define RAMTOP 0x400000
16 #define RAMSIZE 0x200000 16 #define RAMSIZE 0x200000
17 #endif 17 #endif
18 18
19 #ifdef CONFIG_H8300H_H8MAX 19 #ifdef CONFIG_H8300H_H8MAX
20 #define ROMTOP 0x000000 20 #define ROMTOP 0x000000
21 #define ROMSIZE 0x080000 21 #define ROMSIZE 0x080000
22 #define RAMTOP 0x400000 22 #define RAMTOP 0x400000
23 #define RAMSIZE 0x200000 23 #define RAMSIZE 0x200000
24 #endif 24 #endif
25 25
26 #ifdef CONFIG_H8300H_SIM 26 #ifdef CONFIG_H8300H_SIM
27 #define ROMTOP 0x000000 27 #define ROMTOP 0x000000
28 #define ROMSIZE 0x400000 28 #define ROMSIZE 0x400000
29 #define RAMTOP 0x400000 29 #define RAMTOP 0x400000
30 #define RAMSIZE 0x400000 30 #define RAMSIZE 0x400000
31 #endif 31 #endif
32 32
33 #ifdef CONFIG_H8S_SIM 33 #ifdef CONFIG_H8S_SIM
34 #define ROMTOP 0x000000 34 #define ROMTOP 0x000000
35 #define ROMSIZE 0x400000 35 #define ROMSIZE 0x400000
36 #define RAMTOP 0x400000 36 #define RAMTOP 0x400000
37 #define RAMSIZE 0x800000 37 #define RAMSIZE 0x800000
38 #endif 38 #endif
39 39
40 #ifdef CONFIG_H8S_EDOSK2674 40 #ifdef CONFIG_H8S_EDOSK2674
41 #define ROMTOP 0x000000 41 #define ROMTOP 0x000000
42 #define ROMSIZE 0x400000 42 #define ROMSIZE 0x400000
43 #define RAMTOP 0x400000 43 #define RAMTOP 0x400000
44 #define RAMSIZE 0x800000 44 #define RAMSIZE 0x800000
45 #endif 45 #endif
46 46
47 #if defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM) 47 #if defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)
48 INPUT(romfs.o) 48 INPUT(romfs.o)
49 #endif 49 #endif
50 50
51 _jiffies = _jiffies_64 + 4; 51 _jiffies = _jiffies_64 + 4;
52 52
53 ENTRY(__start) 53 ENTRY(__start)
54 54
55 SECTIONS 55 SECTIONS
56 { 56 {
57 #if defined(CONFIG_ROMKERNEL) 57 #if defined(CONFIG_ROMKERNEL)
58 . = ROMTOP; 58 . = ROMTOP;
59 .vectors : 59 .vectors :
60 { 60 {
61 __vector = . ; 61 __vector = . ;
62 *(.vectors*) 62 *(.vectors*)
63 } 63 }
64 #else 64 #else
65 . = RAMTOP; 65 . = RAMTOP;
66 .bootvec : 66 .bootvec :
67 { 67 {
68 *(.bootvec) 68 *(.bootvec)
69 } 69 }
70 #endif 70 #endif
71 .text : 71 .text :
72 { 72 {
73 _text = .; 73 _text = .;
74 #if defined(CONFIG_ROMKERNEL) 74 #if defined(CONFIG_ROMKERNEL)
75 *(.int_redirect) 75 *(.int_redirect)
76 #endif 76 #endif
77 __stext = . ; 77 __stext = . ;
78 TEXT_TEXT 78 TEXT_TEXT
79 SCHED_TEXT 79 SCHED_TEXT
80 LOCK_TEXT 80 LOCK_TEXT
81 __etext = . ; 81 __etext = . ;
82 . = ALIGN(16); /* Exception table */ 82 . = ALIGN(16); /* Exception table */
83 ___start___ex_table = .; 83 ___start___ex_table = .;
84 *(__ex_table) 84 *(__ex_table)
85 ___stop___ex_table = .; 85 ___stop___ex_table = .;
86 } 86 }
87 87
88 RODATA 88 RODATA
89 #if defined(CONFIG_ROMKERNEL) 89 #if defined(CONFIG_ROMKERNEL)
90 SECURITY_INIT 90 SECURITY_INIT
91 #endif 91 #endif
92 ROEND = .; 92 ROEND = .;
93 #if defined(CONFIG_ROMKERNEL) 93 #if defined(CONFIG_ROMKERNEL)
94 . = RAMTOP; 94 . = RAMTOP;
95 .data : AT(ROEND) 95 .data : AT(ROEND)
96 #else 96 #else
97 .data : 97 .data :
98 #endif 98 #endif
99 { 99 {
100 __sdata = . ; 100 __sdata = . ;
101 ___data_start = . ; 101 ___data_start = . ;
102 102
103 . = ALIGN(0x2000) ; 103 . = ALIGN(0x2000) ;
104 *(.data.init_task) 104 *(.data.init_task)
105 . = ALIGN(0x4) ; 105 . = ALIGN(0x4) ;
106 *(.data) 106 DATA_DATA
107 . = ALIGN(0x4) ; 107 . = ALIGN(0x4) ;
108 *(.data.*) 108 *(.data.*)
109 109
110 . = ALIGN(0x4) ; 110 . = ALIGN(0x4) ;
111 ___init_begin = .; 111 ___init_begin = .;
112 __sinittext = .; 112 __sinittext = .;
113 *(.init.text) 113 *(.init.text)
114 __einittext = .; 114 __einittext = .;
115 *(.init.data) 115 *(.init.data)
116 . = ALIGN(0x4) ; 116 . = ALIGN(0x4) ;
117 ___setup_start = .; 117 ___setup_start = .;
118 *(.init.setup) 118 *(.init.setup)
119 . = ALIGN(0x4) ; 119 . = ALIGN(0x4) ;
120 ___setup_end = .; 120 ___setup_end = .;
121 ___initcall_start = .; 121 ___initcall_start = .;
122 INITCALLS 122 INITCALLS
123 ___initcall_end = .; 123 ___initcall_end = .;
124 ___con_initcall_start = .; 124 ___con_initcall_start = .;
125 *(.con_initcall.init) 125 *(.con_initcall.init)
126 ___con_initcall_end = .; 126 ___con_initcall_end = .;
127 *(.exit.text) 127 *(.exit.text)
128 *(.exit.data) 128 *(.exit.data)
129 #if defined(CONFIG_BLK_DEV_INITRD) 129 #if defined(CONFIG_BLK_DEV_INITRD)
130 . = ALIGN(4); 130 . = ALIGN(4);
131 ___initramfs_start = .; 131 ___initramfs_start = .;
132 *(.init.ramfs) 132 *(.init.ramfs)
133 ___initramfs_end = .; 133 ___initramfs_end = .;
134 #endif 134 #endif
135 . = ALIGN(0x4) ; 135 . = ALIGN(0x4) ;
136 ___init_end = .; 136 ___init_end = .;
137 __edata = . ; 137 __edata = . ;
138 } 138 }
139 #if defined(CONFIG_RAMKERNEL) 139 #if defined(CONFIG_RAMKERNEL)
140 SECURITY_INIT 140 SECURITY_INIT
141 #endif 141 #endif
142 __begin_data = LOADADDR(.data); 142 __begin_data = LOADADDR(.data);
143 .bss : 143 .bss :
144 { 144 {
145 . = ALIGN(0x4) ; 145 . = ALIGN(0x4) ;
146 __sbss = . ; 146 __sbss = . ;
147 *(.bss*) 147 *(.bss*)
148 . = ALIGN(0x4) ; 148 . = ALIGN(0x4) ;
149 *(COMMON) 149 *(COMMON)
150 . = ALIGN(0x4) ; 150 . = ALIGN(0x4) ;
151 __ebss = . ; 151 __ebss = . ;
152 __end = . ; 152 __end = . ;
153 __ramstart = .; 153 __ramstart = .;
154 } 154 }
155 /DISCARD/ : { 155 /DISCARD/ : {
156 *(.exitcall.exit) 156 *(.exitcall.exit)
157 } 157 }
158 .romfs : 158 .romfs :
159 { 159 {
160 *(.romfs*) 160 *(.romfs*)
161 } 161 }
162 . = RAMTOP+RAMSIZE; 162 . = RAMTOP+RAMSIZE;
163 .dummy : 163 .dummy :
164 { 164 {
165 COMMAND_START = . - 0x200 ; 165 COMMAND_START = . - 0x200 ;
166 __ramend = . ; 166 __ramend = . ;
167 } 167 }
168 } 168 }
169 169
arch/i386/kernel/vmlinux.lds.S
1 /* ld script to make i386 Linux kernel 1 /* ld script to make i386 Linux kernel
2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>; 2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
3 * 3 *
4 * Don't define absolute symbols until and unless you know that symbol 4 * Don't define absolute symbols until and unless you know that symbol
5 * value is should remain constant even if kernel image is relocated 5 * value is should remain constant even if kernel image is relocated
6 * at run time. Absolute symbols are not relocated. If symbol value should 6 * at run time. Absolute symbols are not relocated. If symbol value should
7 * change if kernel is relocated, make the symbol section relative and 7 * change if kernel is relocated, make the symbol section relative and
8 * put it inside the section definition. 8 * put it inside the section definition.
9 */ 9 */
10 10
11 /* Don't define absolute symbols until and unless you know that symbol 11 /* Don't define absolute symbols until and unless you know that symbol
12 * value is should remain constant even if kernel image is relocated 12 * value is should remain constant even if kernel image is relocated
13 * at run time. Absolute symbols are not relocated. If symbol value should 13 * at run time. Absolute symbols are not relocated. If symbol value should
14 * change if kernel is relocated, make the symbol section relative and 14 * change if kernel is relocated, make the symbol section relative and
15 * put it inside the section definition. 15 * put it inside the section definition.
16 */ 16 */
17 #define LOAD_OFFSET __PAGE_OFFSET 17 #define LOAD_OFFSET __PAGE_OFFSET
18 18
19 #include <asm-generic/vmlinux.lds.h> 19 #include <asm-generic/vmlinux.lds.h>
20 #include <asm/thread_info.h> 20 #include <asm/thread_info.h>
21 #include <asm/page.h> 21 #include <asm/page.h>
22 #include <asm/cache.h> 22 #include <asm/cache.h>
23 #include <asm/boot.h> 23 #include <asm/boot.h>
24 24
25 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") 25 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
26 OUTPUT_ARCH(i386) 26 OUTPUT_ARCH(i386)
27 ENTRY(phys_startup_32) 27 ENTRY(phys_startup_32)
28 jiffies = jiffies_64; 28 jiffies = jiffies_64;
29 29
30 PHDRS { 30 PHDRS {
31 text PT_LOAD FLAGS(5); /* R_E */ 31 text PT_LOAD FLAGS(5); /* R_E */
32 data PT_LOAD FLAGS(7); /* RWE */ 32 data PT_LOAD FLAGS(7); /* RWE */
33 note PT_NOTE FLAGS(0); /* ___ */ 33 note PT_NOTE FLAGS(0); /* ___ */
34 } 34 }
35 SECTIONS 35 SECTIONS
36 { 36 {
37 . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR; 37 . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
38 phys_startup_32 = startup_32 - LOAD_OFFSET; 38 phys_startup_32 = startup_32 - LOAD_OFFSET;
39 39
40 .text.head : AT(ADDR(.text.head) - LOAD_OFFSET) { 40 .text.head : AT(ADDR(.text.head) - LOAD_OFFSET) {
41 _text = .; /* Text and read-only data */ 41 _text = .; /* Text and read-only data */
42 *(.text.head) 42 *(.text.head)
43 } :text = 0x9090 43 } :text = 0x9090
44 44
45 /* read-only */ 45 /* read-only */
46 .text : AT(ADDR(.text) - LOAD_OFFSET) { 46 .text : AT(ADDR(.text) - LOAD_OFFSET) {
47 TEXT_TEXT 47 TEXT_TEXT
48 SCHED_TEXT 48 SCHED_TEXT
49 LOCK_TEXT 49 LOCK_TEXT
50 KPROBES_TEXT 50 KPROBES_TEXT
51 *(.fixup) 51 *(.fixup)
52 *(.gnu.warning) 52 *(.gnu.warning)
53 _etext = .; /* End of text section */ 53 _etext = .; /* End of text section */
54 } :text = 0x9090 54 } :text = 0x9090
55 55
56 . = ALIGN(16); /* Exception table */ 56 . = ALIGN(16); /* Exception table */
57 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { 57 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
58 __start___ex_table = .; 58 __start___ex_table = .;
59 *(__ex_table) 59 *(__ex_table)
60 __stop___ex_table = .; 60 __stop___ex_table = .;
61 } 61 }
62 62
63 BUG_TABLE 63 BUG_TABLE
64 64
65 . = ALIGN(4); 65 . = ALIGN(4);
66 .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { 66 .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) {
67 __tracedata_start = .; 67 __tracedata_start = .;
68 *(.tracedata) 68 *(.tracedata)
69 __tracedata_end = .; 69 __tracedata_end = .;
70 } 70 }
71 71
72 RODATA 72 RODATA
73 73
74 /* writeable */ 74 /* writeable */
75 . = ALIGN(4096); 75 . = ALIGN(4096);
76 .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */ 76 .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
77 *(.data) 77 DATA_DATA
78 CONSTRUCTORS 78 CONSTRUCTORS
79 } :data 79 } :data
80 80
81 . = ALIGN(4096); 81 . = ALIGN(4096);
82 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { 82 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
83 __nosave_begin = .; 83 __nosave_begin = .;
84 *(.data.nosave) 84 *(.data.nosave)
85 . = ALIGN(4096); 85 . = ALIGN(4096);
86 __nosave_end = .; 86 __nosave_end = .;
87 } 87 }
88 88
89 . = ALIGN(4096); 89 . = ALIGN(4096);
90 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { 90 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
91 *(.data.idt) 91 *(.data.idt)
92 } 92 }
93 93
94 . = ALIGN(32); 94 . = ALIGN(32);
95 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { 95 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
96 *(.data.cacheline_aligned) 96 *(.data.cacheline_aligned)
97 } 97 }
98 98
99 /* rarely changed data like cpu maps */ 99 /* rarely changed data like cpu maps */
100 . = ALIGN(32); 100 . = ALIGN(32);
101 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { 101 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
102 *(.data.read_mostly) 102 *(.data.read_mostly)
103 _edata = .; /* End of data section */ 103 _edata = .; /* End of data section */
104 } 104 }
105 105
106 . = ALIGN(THREAD_SIZE); /* init_task */ 106 . = ALIGN(THREAD_SIZE); /* init_task */
107 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { 107 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
108 *(.data.init_task) 108 *(.data.init_task)
109 } 109 }
110 110
111 /* might get freed after init */ 111 /* might get freed after init */
112 . = ALIGN(4096); 112 . = ALIGN(4096);
113 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { 113 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
114 __smp_locks = .; 114 __smp_locks = .;
115 *(.smp_locks) 115 *(.smp_locks)
116 __smp_locks_end = .; 116 __smp_locks_end = .;
117 } 117 }
118 /* will be freed after init 118 /* will be freed after init
119 * Following ALIGN() is required to make sure no other data falls on the 119 * Following ALIGN() is required to make sure no other data falls on the
120 * same page where __smp_alt_end is pointing as that page might be freed 120 * same page where __smp_alt_end is pointing as that page might be freed
121 * after boot. Always make sure that ALIGN() directive is present after 121 * after boot. Always make sure that ALIGN() directive is present after
122 * the section which contains __smp_alt_end. 122 * the section which contains __smp_alt_end.
123 */ 123 */
124 . = ALIGN(4096); 124 . = ALIGN(4096);
125 125
126 /* will be freed after init */ 126 /* will be freed after init */
127 . = ALIGN(4096); /* Init code and data */ 127 . = ALIGN(4096); /* Init code and data */
128 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { 128 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
129 __init_begin = .; 129 __init_begin = .;
130 _sinittext = .; 130 _sinittext = .;
131 *(.init.text) 131 *(.init.text)
132 _einittext = .; 132 _einittext = .;
133 } 133 }
134 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { *(.init.data) } 134 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { *(.init.data) }
135 . = ALIGN(16); 135 . = ALIGN(16);
136 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { 136 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
137 __setup_start = .; 137 __setup_start = .;
138 *(.init.setup) 138 *(.init.setup)
139 __setup_end = .; 139 __setup_end = .;
140 } 140 }
141 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { 141 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
142 __initcall_start = .; 142 __initcall_start = .;
143 INITCALLS 143 INITCALLS
144 __initcall_end = .; 144 __initcall_end = .;
145 } 145 }
146 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) { 146 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
147 __con_initcall_start = .; 147 __con_initcall_start = .;
148 *(.con_initcall.init) 148 *(.con_initcall.init)
149 __con_initcall_end = .; 149 __con_initcall_end = .;
150 } 150 }
151 SECURITY_INIT 151 SECURITY_INIT
152 . = ALIGN(4); 152 . = ALIGN(4);
153 .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) { 153 .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) {
154 __alt_instructions = .; 154 __alt_instructions = .;
155 *(.altinstructions) 155 *(.altinstructions)
156 __alt_instructions_end = .; 156 __alt_instructions_end = .;
157 } 157 }
158 .altinstr_replacement : AT(ADDR(.altinstr_replacement) - LOAD_OFFSET) { 158 .altinstr_replacement : AT(ADDR(.altinstr_replacement) - LOAD_OFFSET) {
159 *(.altinstr_replacement) 159 *(.altinstr_replacement)
160 } 160 }
161 . = ALIGN(4); 161 . = ALIGN(4);
162 .parainstructions : AT(ADDR(.parainstructions) - LOAD_OFFSET) { 162 .parainstructions : AT(ADDR(.parainstructions) - LOAD_OFFSET) {
163 __parainstructions = .; 163 __parainstructions = .;
164 *(.parainstructions) 164 *(.parainstructions)
165 __parainstructions_end = .; 165 __parainstructions_end = .;
166 } 166 }
167 /* .exit.text is discard at runtime, not link time, to deal with references 167 /* .exit.text is discard at runtime, not link time, to deal with references
168 from .altinstructions and .eh_frame */ 168 from .altinstructions and .eh_frame */
169 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } 169 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) }
170 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) } 170 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) }
171 #if defined(CONFIG_BLK_DEV_INITRD) 171 #if defined(CONFIG_BLK_DEV_INITRD)
172 . = ALIGN(4096); 172 . = ALIGN(4096);
173 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { 173 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
174 __initramfs_start = .; 174 __initramfs_start = .;
175 *(.init.ramfs) 175 *(.init.ramfs)
176 __initramfs_end = .; 176 __initramfs_end = .;
177 } 177 }
178 #endif 178 #endif
179 . = ALIGN(4096); 179 . = ALIGN(4096);
180 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { 180 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) {
181 __per_cpu_start = .; 181 __per_cpu_start = .;
182 *(.data.percpu) 182 *(.data.percpu)
183 __per_cpu_end = .; 183 __per_cpu_end = .;
184 } 184 }
185 . = ALIGN(4096); 185 . = ALIGN(4096);
186 /* freed after init ends here */ 186 /* freed after init ends here */
187 187
188 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { 188 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
189 __init_end = .; 189 __init_end = .;
190 __bss_start = .; /* BSS */ 190 __bss_start = .; /* BSS */
191 *(.bss.page_aligned) 191 *(.bss.page_aligned)
192 *(.bss) 192 *(.bss)
193 . = ALIGN(4); 193 . = ALIGN(4);
194 __bss_stop = .; 194 __bss_stop = .;
195 _end = . ; 195 _end = . ;
196 /* This is where the kernel creates the early boot page tables */ 196 /* This is where the kernel creates the early boot page tables */
197 . = ALIGN(4096); 197 . = ALIGN(4096);
198 pg0 = . ; 198 pg0 = . ;
199 } 199 }
200 200
201 /* Sections to be discarded */ 201 /* Sections to be discarded */
202 /DISCARD/ : { 202 /DISCARD/ : {
203 *(.exitcall.exit) 203 *(.exitcall.exit)
204 } 204 }
205 205
206 STABS_DEBUG 206 STABS_DEBUG
207 207
208 DWARF_DEBUG 208 DWARF_DEBUG
209 209
210 NOTES 210 NOTES
211 } 211 }
212 212
arch/ia64/kernel/vmlinux.lds.S
1 1
2 #include <asm/cache.h> 2 #include <asm/cache.h>
3 #include <asm/ptrace.h> 3 #include <asm/ptrace.h>
4 #include <asm/system.h> 4 #include <asm/system.h>
5 #include <asm/pgtable.h> 5 #include <asm/pgtable.h>
6 6
7 #define LOAD_OFFSET (KERNEL_START - KERNEL_TR_PAGE_SIZE) 7 #define LOAD_OFFSET (KERNEL_START - KERNEL_TR_PAGE_SIZE)
8 #include <asm-generic/vmlinux.lds.h> 8 #include <asm-generic/vmlinux.lds.h>
9 9
10 #define IVT_TEXT \ 10 #define IVT_TEXT \
11 VMLINUX_SYMBOL(__start_ivt_text) = .; \ 11 VMLINUX_SYMBOL(__start_ivt_text) = .; \
12 *(.text.ivt) \ 12 *(.text.ivt) \
13 VMLINUX_SYMBOL(__end_ivt_text) = .; 13 VMLINUX_SYMBOL(__end_ivt_text) = .;
14 14
15 OUTPUT_FORMAT("elf64-ia64-little") 15 OUTPUT_FORMAT("elf64-ia64-little")
16 OUTPUT_ARCH(ia64) 16 OUTPUT_ARCH(ia64)
17 ENTRY(phys_start) 17 ENTRY(phys_start)
18 jiffies = jiffies_64; 18 jiffies = jiffies_64;
19 PHDRS { 19 PHDRS {
20 code PT_LOAD; 20 code PT_LOAD;
21 percpu PT_LOAD; 21 percpu PT_LOAD;
22 data PT_LOAD; 22 data PT_LOAD;
23 } 23 }
24 SECTIONS 24 SECTIONS
25 { 25 {
26 /* Sections to be discarded */ 26 /* Sections to be discarded */
27 /DISCARD/ : { 27 /DISCARD/ : {
28 *(.exit.text) 28 *(.exit.text)
29 *(.exit.data) 29 *(.exit.data)
30 *(.exitcall.exit) 30 *(.exitcall.exit)
31 *(.IA_64.unwind.exit.text) 31 *(.IA_64.unwind.exit.text)
32 *(.IA_64.unwind_info.exit.text) 32 *(.IA_64.unwind_info.exit.text)
33 } 33 }
34 34
35 v = PAGE_OFFSET; /* this symbol is here to make debugging easier... */ 35 v = PAGE_OFFSET; /* this symbol is here to make debugging easier... */
36 phys_start = _start - LOAD_OFFSET; 36 phys_start = _start - LOAD_OFFSET;
37 37
38 code : { } :code 38 code : { } :code
39 . = KERNEL_START; 39 . = KERNEL_START;
40 40
41 _text = .; 41 _text = .;
42 _stext = .; 42 _stext = .;
43 43
44 .text : AT(ADDR(.text) - LOAD_OFFSET) 44 .text : AT(ADDR(.text) - LOAD_OFFSET)
45 { 45 {
46 IVT_TEXT 46 IVT_TEXT
47 TEXT_TEXT 47 TEXT_TEXT
48 SCHED_TEXT 48 SCHED_TEXT
49 LOCK_TEXT 49 LOCK_TEXT
50 KPROBES_TEXT 50 KPROBES_TEXT
51 *(.gnu.linkonce.t*) 51 *(.gnu.linkonce.t*)
52 } 52 }
53 .text2 : AT(ADDR(.text2) - LOAD_OFFSET) 53 .text2 : AT(ADDR(.text2) - LOAD_OFFSET)
54 { *(.text2) } 54 { *(.text2) }
55 #ifdef CONFIG_SMP 55 #ifdef CONFIG_SMP
56 .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET) 56 .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET)
57 { *(.text.lock) } 57 { *(.text.lock) }
58 #endif 58 #endif
59 _etext = .; 59 _etext = .;
60 60
61 /* Read-only data */ 61 /* Read-only data */
62 62
63 /* Exception table */ 63 /* Exception table */
64 . = ALIGN(16); 64 . = ALIGN(16);
65 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) 65 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET)
66 { 66 {
67 __start___ex_table = .; 67 __start___ex_table = .;
68 *(__ex_table) 68 *(__ex_table)
69 __stop___ex_table = .; 69 __stop___ex_table = .;
70 } 70 }
71 71
72 /* MCA table */ 72 /* MCA table */
73 . = ALIGN(16); 73 . = ALIGN(16);
74 __mca_table : AT(ADDR(__mca_table) - LOAD_OFFSET) 74 __mca_table : AT(ADDR(__mca_table) - LOAD_OFFSET)
75 { 75 {
76 __start___mca_table = .; 76 __start___mca_table = .;
77 *(__mca_table) 77 *(__mca_table)
78 __stop___mca_table = .; 78 __stop___mca_table = .;
79 } 79 }
80 80
81 .data.patch.phys_stack_reg : AT(ADDR(.data.patch.phys_stack_reg) - LOAD_OFFSET) 81 .data.patch.phys_stack_reg : AT(ADDR(.data.patch.phys_stack_reg) - LOAD_OFFSET)
82 { 82 {
83 __start___phys_stack_reg_patchlist = .; 83 __start___phys_stack_reg_patchlist = .;
84 *(.data.patch.phys_stack_reg) 84 *(.data.patch.phys_stack_reg)
85 __end___phys_stack_reg_patchlist = .; 85 __end___phys_stack_reg_patchlist = .;
86 } 86 }
87 87
88 /* Global data */ 88 /* Global data */
89 _data = .; 89 _data = .;
90 90
91 /* Unwind info & table: */ 91 /* Unwind info & table: */
92 . = ALIGN(8); 92 . = ALIGN(8);
93 .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - LOAD_OFFSET) 93 .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - LOAD_OFFSET)
94 { *(.IA_64.unwind_info*) } 94 { *(.IA_64.unwind_info*) }
95 .IA_64.unwind : AT(ADDR(.IA_64.unwind) - LOAD_OFFSET) 95 .IA_64.unwind : AT(ADDR(.IA_64.unwind) - LOAD_OFFSET)
96 { 96 {
97 __start_unwind = .; 97 __start_unwind = .;
98 *(.IA_64.unwind*) 98 *(.IA_64.unwind*)
99 __end_unwind = .; 99 __end_unwind = .;
100 } 100 }
101 101
102 RODATA 102 RODATA
103 103
104 .opd : AT(ADDR(.opd) - LOAD_OFFSET) 104 .opd : AT(ADDR(.opd) - LOAD_OFFSET)
105 { *(.opd) } 105 { *(.opd) }
106 106
107 /* Initialization code and data: */ 107 /* Initialization code and data: */
108 108
109 . = ALIGN(PAGE_SIZE); 109 . = ALIGN(PAGE_SIZE);
110 __init_begin = .; 110 __init_begin = .;
111 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) 111 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET)
112 { 112 {
113 _sinittext = .; 113 _sinittext = .;
114 *(.init.text) 114 *(.init.text)
115 _einittext = .; 115 _einittext = .;
116 } 116 }
117 117
118 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) 118 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET)
119 { *(.init.data) } 119 { *(.init.data) }
120 120
121 #ifdef CONFIG_BLK_DEV_INITRD 121 #ifdef CONFIG_BLK_DEV_INITRD
122 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) 122 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET)
123 { 123 {
124 __initramfs_start = .; 124 __initramfs_start = .;
125 *(.init.ramfs) 125 *(.init.ramfs)
126 __initramfs_end = .; 126 __initramfs_end = .;
127 } 127 }
128 #endif 128 #endif
129 129
130 . = ALIGN(16); 130 . = ALIGN(16);
131 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) 131 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET)
132 { 132 {
133 __setup_start = .; 133 __setup_start = .;
134 *(.init.setup) 134 *(.init.setup)
135 __setup_end = .; 135 __setup_end = .;
136 } 136 }
137 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) 137 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET)
138 { 138 {
139 __initcall_start = .; 139 __initcall_start = .;
140 INITCALLS 140 INITCALLS
141 __initcall_end = .; 141 __initcall_end = .;
142 } 142 }
143 143
144 .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET) 144 .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET)
145 { 145 {
146 __start___vtop_patchlist = .; 146 __start___vtop_patchlist = .;
147 *(.data.patch.vtop) 147 *(.data.patch.vtop)
148 __end___vtop_patchlist = .; 148 __end___vtop_patchlist = .;
149 } 149 }
150 150
151 .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET) 151 .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET)
152 { 152 {
153 __start___mckinley_e9_bundles = .; 153 __start___mckinley_e9_bundles = .;
154 *(.data.patch.mckinley_e9) 154 *(.data.patch.mckinley_e9)
155 __end___mckinley_e9_bundles = .; 155 __end___mckinley_e9_bundles = .;
156 } 156 }
157 157
158 #if defined(CONFIG_IA64_GENERIC) 158 #if defined(CONFIG_IA64_GENERIC)
159 /* Machine Vector */ 159 /* Machine Vector */
160 . = ALIGN(16); 160 . = ALIGN(16);
161 .machvec : AT(ADDR(.machvec) - LOAD_OFFSET) 161 .machvec : AT(ADDR(.machvec) - LOAD_OFFSET)
162 { 162 {
163 machvec_start = .; 163 machvec_start = .;
164 *(.machvec) 164 *(.machvec)
165 machvec_end = .; 165 machvec_end = .;
166 } 166 }
167 #endif 167 #endif
168 168
169 . = ALIGN(8); 169 . = ALIGN(8);
170 __con_initcall_start = .; 170 __con_initcall_start = .;
171 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) 171 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET)
172 { *(.con_initcall.init) } 172 { *(.con_initcall.init) }
173 __con_initcall_end = .; 173 __con_initcall_end = .;
174 __security_initcall_start = .; 174 __security_initcall_start = .;
175 .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) 175 .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET)
176 { *(.security_initcall.init) } 176 { *(.security_initcall.init) }
177 __security_initcall_end = .; 177 __security_initcall_end = .;
178 . = ALIGN(PAGE_SIZE); 178 . = ALIGN(PAGE_SIZE);
179 __init_end = .; 179 __init_end = .;
180 180
181 /* The initial task and kernel stack */ 181 /* The initial task and kernel stack */
182 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) 182 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET)
183 { *(.data.init_task) } 183 { *(.data.init_task) }
184 184
185 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) 185 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET)
186 { *(__special_page_section) 186 { *(__special_page_section)
187 __start_gate_section = .; 187 __start_gate_section = .;
188 *(.data.gate) 188 *(.data.gate)
189 __stop_gate_section = .; 189 __stop_gate_section = .;
190 } 190 }
191 . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose 191 . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose
192 * kernel data 192 * kernel data
193 */ 193 */
194 194
195 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) 195 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET)
196 { *(.data.read_mostly) } 196 { *(.data.read_mostly) }
197 197
198 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) 198 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
199 { *(.data.cacheline_aligned) } 199 { *(.data.cacheline_aligned) }
200 200
201 /* Per-cpu data: */ 201 /* Per-cpu data: */
202 percpu : { } :percpu 202 percpu : { } :percpu
203 . = ALIGN(PERCPU_PAGE_SIZE); 203 . = ALIGN(PERCPU_PAGE_SIZE);
204 __phys_per_cpu_start = .; 204 __phys_per_cpu_start = .;
205 .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET) 205 .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET)
206 { 206 {
207 __per_cpu_start = .; 207 __per_cpu_start = .;
208 *(.data.percpu) 208 *(.data.percpu)
209 __per_cpu_end = .; 209 __per_cpu_end = .;
210 } 210 }
211 . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits 211 . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits
212 * into percpu page size 212 * into percpu page size
213 */ 213 */
214 214
215 data : { } :data 215 data : { } :data
216 .data : AT(ADDR(.data) - LOAD_OFFSET) 216 .data : AT(ADDR(.data) - LOAD_OFFSET)
217 { *(.data) *(.data1) *(.gnu.linkonce.d*) CONSTRUCTORS } 217 {
218 DATA_DATA
219 *(.data1)
220 *(.gnu.linkonce.d*)
221 CONSTRUCTORS
222 }
218 223
219 . = ALIGN(16); /* gp must be 16-byte aligned for exc. table */ 224 . = ALIGN(16); /* gp must be 16-byte aligned for exc. table */
220 .got : AT(ADDR(.got) - LOAD_OFFSET) 225 .got : AT(ADDR(.got) - LOAD_OFFSET)
221 { *(.got.plt) *(.got) } 226 { *(.got.plt) *(.got) }
222 __gp = ADDR(.got) + 0x200000; 227 __gp = ADDR(.got) + 0x200000;
223 /* We want the small data sections together, so single-instruction offsets 228 /* We want the small data sections together, so single-instruction offsets
224 can access them all, and initialized data all before uninitialized, so 229 can access them all, and initialized data all before uninitialized, so
225 we can shorten the on-disk segment size. */ 230 we can shorten the on-disk segment size. */
226 .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) 231 .sdata : AT(ADDR(.sdata) - LOAD_OFFSET)
227 { *(.sdata) *(.sdata1) *(.srdata) } 232 { *(.sdata) *(.sdata1) *(.srdata) }
228 _edata = .; 233 _edata = .;
229 _bss = .; 234 _bss = .;
230 .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) 235 .sbss : AT(ADDR(.sbss) - LOAD_OFFSET)
231 { *(.sbss) *(.scommon) } 236 { *(.sbss) *(.scommon) }
232 .bss : AT(ADDR(.bss) - LOAD_OFFSET) 237 .bss : AT(ADDR(.bss) - LOAD_OFFSET)
233 { *(.bss) *(COMMON) } 238 { *(.bss) *(COMMON) }
234 239
235 _end = .; 240 _end = .;
236 241
237 code : { } :code 242 code : { } :code
238 /* Stabs debugging sections. */ 243 /* Stabs debugging sections. */
239 .stab 0 : { *(.stab) } 244 .stab 0 : { *(.stab) }
240 .stabstr 0 : { *(.stabstr) } 245 .stabstr 0 : { *(.stabstr) }
241 .stab.excl 0 : { *(.stab.excl) } 246 .stab.excl 0 : { *(.stab.excl) }
242 .stab.exclstr 0 : { *(.stab.exclstr) } 247 .stab.exclstr 0 : { *(.stab.exclstr) }
243 .stab.index 0 : { *(.stab.index) } 248 .stab.index 0 : { *(.stab.index) }
244 .stab.indexstr 0 : { *(.stab.indexstr) } 249 .stab.indexstr 0 : { *(.stab.indexstr) }
245 /* DWARF debug sections. 250 /* DWARF debug sections.
246 Symbols in the DWARF debugging sections are relative to the beginning 251 Symbols in the DWARF debugging sections are relative to the beginning
247 of the section so we begin them at 0. */ 252 of the section so we begin them at 0. */
248 /* DWARF 1 */ 253 /* DWARF 1 */
249 .debug 0 : { *(.debug) } 254 .debug 0 : { *(.debug) }
250 .line 0 : { *(.line) } 255 .line 0 : { *(.line) }
251 /* GNU DWARF 1 extensions */ 256 /* GNU DWARF 1 extensions */
252 .debug_srcinfo 0 : { *(.debug_srcinfo) } 257 .debug_srcinfo 0 : { *(.debug_srcinfo) }
253 .debug_sfnames 0 : { *(.debug_sfnames) } 258 .debug_sfnames 0 : { *(.debug_sfnames) }
254 /* DWARF 1.1 and DWARF 2 */ 259 /* DWARF 1.1 and DWARF 2 */
255 .debug_aranges 0 : { *(.debug_aranges) } 260 .debug_aranges 0 : { *(.debug_aranges) }
256 .debug_pubnames 0 : { *(.debug_pubnames) } 261 .debug_pubnames 0 : { *(.debug_pubnames) }
257 /* DWARF 2 */ 262 /* DWARF 2 */
258 .debug_info 0 : { *(.debug_info) } 263 .debug_info 0 : { *(.debug_info) }
259 .debug_abbrev 0 : { *(.debug_abbrev) } 264 .debug_abbrev 0 : { *(.debug_abbrev) }
260 .debug_line 0 : { *(.debug_line) } 265 .debug_line 0 : { *(.debug_line) }
261 .debug_frame 0 : { *(.debug_frame) } 266 .debug_frame 0 : { *(.debug_frame) }
262 .debug_str 0 : { *(.debug_str) } 267 .debug_str 0 : { *(.debug_str) }
263 .debug_loc 0 : { *(.debug_loc) } 268 .debug_loc 0 : { *(.debug_loc) }
264 .debug_macinfo 0 : { *(.debug_macinfo) } 269 .debug_macinfo 0 : { *(.debug_macinfo) }
265 /* SGI/MIPS DWARF 2 extensions */ 270 /* SGI/MIPS DWARF 2 extensions */
266 .debug_weaknames 0 : { *(.debug_weaknames) } 271 .debug_weaknames 0 : { *(.debug_weaknames) }
267 .debug_funcnames 0 : { *(.debug_funcnames) } 272 .debug_funcnames 0 : { *(.debug_funcnames) }
268 .debug_typenames 0 : { *(.debug_typenames) } 273 .debug_typenames 0 : { *(.debug_typenames) }
269 .debug_varnames 0 : { *(.debug_varnames) } 274 .debug_varnames 0 : { *(.debug_varnames) }
270 /* These must appear regardless of . */ 275 /* These must appear regardless of . */
271 /* Discard them for now since Intel SoftSDV cannot handle them. 276 /* Discard them for now since Intel SoftSDV cannot handle them.
272 .comment 0 : { *(.comment) } 277 .comment 0 : { *(.comment) }
273 .note 0 : { *(.note) } 278 .note 0 : { *(.note) }
274 */ 279 */
275 /DISCARD/ : { *(.comment) } 280 /DISCARD/ : { *(.comment) }
276 /DISCARD/ : { *(.note) } 281 /DISCARD/ : { *(.note) }
277 } 282 }
278 283
arch/m32r/kernel/vmlinux.lds.S
1 /* ld script to make M32R Linux kernel 1 /* ld script to make M32R Linux kernel
2 */ 2 */
3 3
4 #include <asm-generic/vmlinux.lds.h> 4 #include <asm-generic/vmlinux.lds.h>
5 #include <asm/addrspace.h> 5 #include <asm/addrspace.h>
6 #include <asm/page.h> 6 #include <asm/page.h>
7 7
8 OUTPUT_ARCH(m32r) 8 OUTPUT_ARCH(m32r)
9 #if defined(__LITTLE_ENDIAN__) 9 #if defined(__LITTLE_ENDIAN__)
10 jiffies = jiffies_64; 10 jiffies = jiffies_64;
11 #else 11 #else
12 jiffies = jiffies_64 + 4; 12 jiffies = jiffies_64 + 4;
13 #endif 13 #endif
14 14
15 kernel_entry = boot - 0x80000000; 15 kernel_entry = boot - 0x80000000;
16 ENTRY(kernel_entry) 16 ENTRY(kernel_entry)
17 17
18 SECTIONS 18 SECTIONS
19 { 19 {
20 . = CONFIG_MEMORY_START + __PAGE_OFFSET; 20 . = CONFIG_MEMORY_START + __PAGE_OFFSET;
21 eit_vector = .; 21 eit_vector = .;
22 22
23 . = . + 0x1000; 23 . = . + 0x1000;
24 .empty_zero_page : { *(.empty_zero_page) } = 0 24 .empty_zero_page : { *(.empty_zero_page) } = 0
25 25
26 /* read-only */ 26 /* read-only */
27 _text = .; /* Text and read-only data */ 27 _text = .; /* Text and read-only data */
28 .boot : { *(.boot) } = 0 28 .boot : { *(.boot) } = 0
29 .text : { 29 .text : {
30 TEXT_TEXT 30 TEXT_TEXT
31 SCHED_TEXT 31 SCHED_TEXT
32 LOCK_TEXT 32 LOCK_TEXT
33 *(.fixup) 33 *(.fixup)
34 *(.gnu.warning) 34 *(.gnu.warning)
35 } = 0x9090 35 } = 0x9090
36 #ifdef CONFIG_SMP 36 #ifdef CONFIG_SMP
37 . = ALIGN(65536); 37 . = ALIGN(65536);
38 .eit_vector4 : { *(.eit_vector4) } 38 .eit_vector4 : { *(.eit_vector4) }
39 #endif 39 #endif
40 _etext = .; /* End of text section */ 40 _etext = .; /* End of text section */
41 41
42 . = ALIGN(16); /* Exception table */ 42 . = ALIGN(16); /* Exception table */
43 __start___ex_table = .; 43 __start___ex_table = .;
44 __ex_table : { *(__ex_table) } 44 __ex_table : { *(__ex_table) }
45 __stop___ex_table = .; 45 __stop___ex_table = .;
46 46
47 RODATA 47 RODATA
48 48
49 /* writeable */ 49 /* writeable */
50 .data : { /* Data */ 50 .data : { /* Data */
51 *(.spu) 51 *(.spu)
52 *(.spi) 52 *(.spi)
53 *(.data) 53 DATA_DATA
54 CONSTRUCTORS 54 CONSTRUCTORS
55 } 55 }
56 56
57 . = ALIGN(4096); 57 . = ALIGN(4096);
58 __nosave_begin = .; 58 __nosave_begin = .;
59 .data_nosave : { *(.data.nosave) } 59 .data_nosave : { *(.data.nosave) }
60 . = ALIGN(4096); 60 . = ALIGN(4096);
61 __nosave_end = .; 61 __nosave_end = .;
62 62
63 . = ALIGN(4096); 63 . = ALIGN(4096);
64 .data.page_aligned : { *(.data.idt) } 64 .data.page_aligned : { *(.data.idt) }
65 65
66 . = ALIGN(32); 66 . = ALIGN(32);
67 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 67 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
68 68
69 _edata = .; /* End of data section */ 69 _edata = .; /* End of data section */
70 70
71 . = ALIGN(8192); /* init_task */ 71 . = ALIGN(8192); /* init_task */
72 .data.init_task : { *(.data.init_task) } 72 .data.init_task : { *(.data.init_task) }
73 73
74 /* will be freed after init */ 74 /* will be freed after init */
75 . = ALIGN(4096); /* Init code and data */ 75 . = ALIGN(4096); /* Init code and data */
76 __init_begin = .; 76 __init_begin = .;
77 .init.text : { 77 .init.text : {
78 _sinittext = .; 78 _sinittext = .;
79 *(.init.text) 79 *(.init.text)
80 _einittext = .; 80 _einittext = .;
81 } 81 }
82 .init.data : { *(.init.data) } 82 .init.data : { *(.init.data) }
83 . = ALIGN(16); 83 . = ALIGN(16);
84 __setup_start = .; 84 __setup_start = .;
85 .init.setup : { *(.init.setup) } 85 .init.setup : { *(.init.setup) }
86 __setup_end = .; 86 __setup_end = .;
87 __initcall_start = .; 87 __initcall_start = .;
88 .initcall.init : { 88 .initcall.init : {
89 INITCALLS 89 INITCALLS
90 } 90 }
91 __initcall_end = .; 91 __initcall_end = .;
92 __con_initcall_start = .; 92 __con_initcall_start = .;
93 .con_initcall.init : { *(.con_initcall.init) } 93 .con_initcall.init : { *(.con_initcall.init) }
94 __con_initcall_end = .; 94 __con_initcall_end = .;
95 SECURITY_INIT 95 SECURITY_INIT
96 . = ALIGN(4); 96 . = ALIGN(4);
97 __alt_instructions = .; 97 __alt_instructions = .;
98 .altinstructions : { *(.altinstructions) } 98 .altinstructions : { *(.altinstructions) }
99 __alt_instructions_end = .; 99 __alt_instructions_end = .;
100 .altinstr_replacement : { *(.altinstr_replacement) } 100 .altinstr_replacement : { *(.altinstr_replacement) }
101 /* .exit.text is discard at runtime, not link time, to deal with references 101 /* .exit.text is discard at runtime, not link time, to deal with references
102 from .altinstructions and .eh_frame */ 102 from .altinstructions and .eh_frame */
103 .exit.text : { *(.exit.text) } 103 .exit.text : { *(.exit.text) }
104 .exit.data : { *(.exit.data) } 104 .exit.data : { *(.exit.data) }
105 105
106 #ifdef CONFIG_BLK_DEV_INITRD 106 #ifdef CONFIG_BLK_DEV_INITRD
107 . = ALIGN(4096); 107 . = ALIGN(4096);
108 __initramfs_start = .; 108 __initramfs_start = .;
109 .init.ramfs : { *(.init.ramfs) } 109 .init.ramfs : { *(.init.ramfs) }
110 __initramfs_end = .; 110 __initramfs_end = .;
111 #endif 111 #endif
112 112
113 . = ALIGN(4096); 113 . = ALIGN(4096);
114 __per_cpu_start = .; 114 __per_cpu_start = .;
115 .data.percpu : { *(.data.percpu) } 115 .data.percpu : { *(.data.percpu) }
116 __per_cpu_end = .; 116 __per_cpu_end = .;
117 . = ALIGN(4096); 117 . = ALIGN(4096);
118 __init_end = .; 118 __init_end = .;
119 /* freed after init ends here */ 119 /* freed after init ends here */
120 120
121 __bss_start = .; /* BSS */ 121 __bss_start = .; /* BSS */
122 .bss : { *(.bss) } 122 .bss : { *(.bss) }
123 . = ALIGN(4); 123 . = ALIGN(4);
124 __bss_stop = .; 124 __bss_stop = .;
125 125
126 _end = . ; 126 _end = . ;
127 127
128 /* Sections to be discarded */ 128 /* Sections to be discarded */
129 /DISCARD/ : { 129 /DISCARD/ : {
130 *(.exit.text) 130 *(.exit.text)
131 *(.exit.data) 131 *(.exit.data)
132 *(.exitcall.exit) 132 *(.exitcall.exit)
133 } 133 }
134 134
135 /* Stabs debugging sections. */ 135 /* Stabs debugging sections. */
136 .stab 0 : { *(.stab) } 136 .stab 0 : { *(.stab) }
137 .stabstr 0 : { *(.stabstr) } 137 .stabstr 0 : { *(.stabstr) }
138 .stab.excl 0 : { *(.stab.excl) } 138 .stab.excl 0 : { *(.stab.excl) }
139 .stab.exclstr 0 : { *(.stab.exclstr) } 139 .stab.exclstr 0 : { *(.stab.exclstr) }
140 .stab.index 0 : { *(.stab.index) } 140 .stab.index 0 : { *(.stab.index) }
141 .stab.indexstr 0 : { *(.stab.indexstr) } 141 .stab.indexstr 0 : { *(.stab.indexstr) }
142 .comment 0 : { *(.comment) } 142 .comment 0 : { *(.comment) }
143 } 143 }
144 144
arch/m68k/kernel/vmlinux-std.lds
1 /* ld script to make m68k Linux kernel */ 1 /* ld script to make m68k Linux kernel */
2 2
3 #include <asm-generic/vmlinux.lds.h> 3 #include <asm-generic/vmlinux.lds.h>
4 4
5 OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k") 5 OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
6 OUTPUT_ARCH(m68k) 6 OUTPUT_ARCH(m68k)
7 ENTRY(_start) 7 ENTRY(_start)
8 jiffies = jiffies_64 + 4; 8 jiffies = jiffies_64 + 4;
9 SECTIONS 9 SECTIONS
10 { 10 {
11 . = 0x1000; 11 . = 0x1000;
12 _text = .; /* Text and read-only data */ 12 _text = .; /* Text and read-only data */
13 .text : { 13 .text : {
14 TEXT_TEXT 14 TEXT_TEXT
15 SCHED_TEXT 15 SCHED_TEXT
16 LOCK_TEXT 16 LOCK_TEXT
17 *(.fixup) 17 *(.fixup)
18 *(.gnu.warning) 18 *(.gnu.warning)
19 } :text = 0x4e75 19 } :text = 0x4e75
20 20
21 . = ALIGN(16); /* Exception table */ 21 . = ALIGN(16); /* Exception table */
22 __start___ex_table = .; 22 __start___ex_table = .;
23 __ex_table : { *(__ex_table) } 23 __ex_table : { *(__ex_table) }
24 __stop___ex_table = .; 24 __stop___ex_table = .;
25 25
26 RODATA 26 RODATA
27 27
28 _etext = .; /* End of text section */ 28 _etext = .; /* End of text section */
29 29
30 .data : { /* Data */ 30 .data : { /* Data */
31 *(.data) 31 DATA_DATA
32 CONSTRUCTORS 32 CONSTRUCTORS
33 } 33 }
34 34
35 .bss : { *(.bss) } /* BSS */ 35 .bss : { *(.bss) } /* BSS */
36 36
37 . = ALIGN(16); 37 . = ALIGN(16);
38 .data.cacheline_aligned : { *(.data.cacheline_aligned) } :data 38 .data.cacheline_aligned : { *(.data.cacheline_aligned) } :data
39 39
40 _edata = .; /* End of data section */ 40 _edata = .; /* End of data section */
41 41
42 /* will be freed after init */ 42 /* will be freed after init */
43 . = ALIGN(4096); /* Init code and data */ 43 . = ALIGN(4096); /* Init code and data */
44 __init_begin = .; 44 __init_begin = .;
45 .init.text : { 45 .init.text : {
46 _sinittext = .; 46 _sinittext = .;
47 *(.init.text) 47 *(.init.text)
48 _einittext = .; 48 _einittext = .;
49 } 49 }
50 .init.data : { *(.init.data) } 50 .init.data : { *(.init.data) }
51 . = ALIGN(16); 51 . = ALIGN(16);
52 __setup_start = .; 52 __setup_start = .;
53 .init.setup : { *(.init.setup) } 53 .init.setup : { *(.init.setup) }
54 __setup_end = .; 54 __setup_end = .;
55 __initcall_start = .; 55 __initcall_start = .;
56 .initcall.init : { 56 .initcall.init : {
57 INITCALLS 57 INITCALLS
58 } 58 }
59 __initcall_end = .; 59 __initcall_end = .;
60 __con_initcall_start = .; 60 __con_initcall_start = .;
61 .con_initcall.init : { *(.con_initcall.init) } 61 .con_initcall.init : { *(.con_initcall.init) }
62 __con_initcall_end = .; 62 __con_initcall_end = .;
63 SECURITY_INIT 63 SECURITY_INIT
64 #ifdef CONFIG_BLK_DEV_INITRD 64 #ifdef CONFIG_BLK_DEV_INITRD
65 . = ALIGN(8192); 65 . = ALIGN(8192);
66 __initramfs_start = .; 66 __initramfs_start = .;
67 .init.ramfs : { *(.init.ramfs) } 67 .init.ramfs : { *(.init.ramfs) }
68 __initramfs_end = .; 68 __initramfs_end = .;
69 #endif 69 #endif
70 . = ALIGN(8192); 70 . = ALIGN(8192);
71 __init_end = .; 71 __init_end = .;
72 72
73 .data.init_task : { *(.data.init_task) } /* The initial task and kernel stack */ 73 .data.init_task : { *(.data.init_task) } /* The initial task and kernel stack */
74 74
75 _end = . ; 75 _end = . ;
76 76
77 /* Sections to be discarded */ 77 /* Sections to be discarded */
78 /DISCARD/ : { 78 /DISCARD/ : {
79 *(.exit.text) 79 *(.exit.text)
80 *(.exit.data) 80 *(.exit.data)
81 *(.exitcall.exit) 81 *(.exitcall.exit)
82 } 82 }
83 83
84 /* Stabs debugging sections. */ 84 /* Stabs debugging sections. */
85 .stab 0 : { *(.stab) } 85 .stab 0 : { *(.stab) }
86 .stabstr 0 : { *(.stabstr) } 86 .stabstr 0 : { *(.stabstr) }
87 .stab.excl 0 : { *(.stab.excl) } 87 .stab.excl 0 : { *(.stab.excl) }
88 .stab.exclstr 0 : { *(.stab.exclstr) } 88 .stab.exclstr 0 : { *(.stab.exclstr) }
89 .stab.index 0 : { *(.stab.index) } 89 .stab.index 0 : { *(.stab.index) }
90 .stab.indexstr 0 : { *(.stab.indexstr) } 90 .stab.indexstr 0 : { *(.stab.indexstr) }
91 .comment 0 : { *(.comment) } 91 .comment 0 : { *(.comment) }
92 } 92 }
93 93
arch/m68k/kernel/vmlinux-sun3.lds
1 /* ld script to make m68k Linux kernel */ 1 /* ld script to make m68k Linux kernel */
2 2
3 #include <asm-generic/vmlinux.lds.h> 3 #include <asm-generic/vmlinux.lds.h>
4 4
5 OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k") 5 OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
6 OUTPUT_ARCH(m68k) 6 OUTPUT_ARCH(m68k)
7 ENTRY(_start) 7 ENTRY(_start)
8 jiffies = jiffies_64 + 4; 8 jiffies = jiffies_64 + 4;
9 SECTIONS 9 SECTIONS
10 { 10 {
11 . = 0xE002000; 11 . = 0xE002000;
12 _text = .; /* Text and read-only data */ 12 _text = .; /* Text and read-only data */
13 .text : { 13 .text : {
14 *(.head) 14 *(.head)
15 TEXT_TEXT 15 TEXT_TEXT
16 SCHED_TEXT 16 SCHED_TEXT
17 LOCK_TEXT 17 LOCK_TEXT
18 *(.fixup) 18 *(.fixup)
19 *(.gnu.warning) 19 *(.gnu.warning)
20 } :text = 0x4e75 20 } :text = 0x4e75
21 RODATA 21 RODATA
22 22
23 _etext = .; /* End of text section */ 23 _etext = .; /* End of text section */
24 24
25 .data : { /* Data */ 25 .data : { /* Data */
26 *(.data) 26 DATA_DATA
27 CONSTRUCTORS 27 CONSTRUCTORS
28 . = ALIGN(16); /* Exception table */ 28 . = ALIGN(16); /* Exception table */
29 __start___ex_table = .; 29 __start___ex_table = .;
30 *(__ex_table) 30 *(__ex_table)
31 __stop___ex_table = .; 31 __stop___ex_table = .;
32 } :data 32 } :data
33 /* End of data goes *here* so that freeing init code works properly. */ 33 /* End of data goes *here* so that freeing init code works properly. */
34 _edata = .; 34 _edata = .;
35 35
36 /* will be freed after init */ 36 /* will be freed after init */
37 . = ALIGN(8192); /* Init code and data */ 37 . = ALIGN(8192); /* Init code and data */
38 __init_begin = .; 38 __init_begin = .;
39 .init.text : { 39 .init.text : {
40 _sinittext = .; 40 _sinittext = .;
41 *(.init.text) 41 *(.init.text)
42 _einittext = .; 42 _einittext = .;
43 } 43 }
44 .init.data : { *(.init.data) } 44 .init.data : { *(.init.data) }
45 . = ALIGN(16); 45 . = ALIGN(16);
46 __setup_start = .; 46 __setup_start = .;
47 .init.setup : { *(.init.setup) } 47 .init.setup : { *(.init.setup) }
48 __setup_end = .; 48 __setup_end = .;
49 __initcall_start = .; 49 __initcall_start = .;
50 .initcall.init : { 50 .initcall.init : {
51 INITCALLS 51 INITCALLS
52 } 52 }
53 __initcall_end = .; 53 __initcall_end = .;
54 __con_initcall_start = .; 54 __con_initcall_start = .;
55 .con_initcall.init : { *(.con_initcall.init) } 55 .con_initcall.init : { *(.con_initcall.init) }
56 __con_initcall_end = .; 56 __con_initcall_end = .;
57 SECURITY_INIT 57 SECURITY_INIT
58 #ifdef CONFIG_BLK_DEV_INITRD 58 #ifdef CONFIG_BLK_DEV_INITRD
59 . = ALIGN(8192); 59 . = ALIGN(8192);
60 __initramfs_start = .; 60 __initramfs_start = .;
61 .init.ramfs : { *(.init.ramfs) } 61 .init.ramfs : { *(.init.ramfs) }
62 __initramfs_end = .; 62 __initramfs_end = .;
63 #endif 63 #endif
64 . = ALIGN(8192); 64 . = ALIGN(8192);
65 __init_end = .; 65 __init_end = .;
66 .data.init.task : { *(.data.init_task) } 66 .data.init.task : { *(.data.init_task) }
67 67
68 68
69 .bss : { *(.bss) } /* BSS */ 69 .bss : { *(.bss) } /* BSS */
70 70
71 _end = . ; 71 _end = . ;
72 72
73 /* Sections to be discarded */ 73 /* Sections to be discarded */
74 /DISCARD/ : { 74 /DISCARD/ : {
75 *(.exit.text) 75 *(.exit.text)
76 *(.exit.data) 76 *(.exit.data)
77 *(.exitcall.exit) 77 *(.exitcall.exit)
78 } 78 }
79 79
80 .crap : { 80 .crap : {
81 /* Stabs debugging sections. */ 81 /* Stabs debugging sections. */
82 *(.stab) 82 *(.stab)
83 *(.stabstr) 83 *(.stabstr)
84 *(.stab.excl) 84 *(.stab.excl)
85 *(.stab.exclstr) 85 *(.stab.exclstr)
86 *(.stab.index) 86 *(.stab.index)
87 *(.stab.indexstr) 87 *(.stab.indexstr)
88 *(.comment) 88 *(.comment)
89 *(.note) 89 *(.note)
90 } 90 }
91 91
92 } 92 }
93 93
arch/m68knommu/kernel/vmlinux.lds.S
1 /* 1 /*
2 * vmlinux.lds.S -- master linker script for m68knommu arch 2 * vmlinux.lds.S -- master linker script for m68knommu arch
3 * 3 *
4 * (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com> 4 * (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com>
5 * 5 *
6 * This linker script is equiped to build either ROM loaded or RAM 6 * This linker script is equiped to build either ROM loaded or RAM
7 * run kernels. 7 * run kernels.
8 */ 8 */
9 9
10 #include <asm-generic/vmlinux.lds.h> 10 #include <asm-generic/vmlinux.lds.h>
11 11
12 #if defined(CONFIG_RAMKERNEL) 12 #if defined(CONFIG_RAMKERNEL)
13 #define RAM_START CONFIG_KERNELBASE 13 #define RAM_START CONFIG_KERNELBASE
14 #define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE) 14 #define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE)
15 #define TEXT ram 15 #define TEXT ram
16 #define DATA ram 16 #define DATA ram
17 #define INIT ram 17 #define INIT ram
18 #define BSS ram 18 #define BSS ram
19 #endif 19 #endif
20 #if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL) 20 #if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL)
21 #define RAM_START CONFIG_RAMBASE 21 #define RAM_START CONFIG_RAMBASE
22 #define RAM_LENGTH CONFIG_RAMSIZE 22 #define RAM_LENGTH CONFIG_RAMSIZE
23 #define ROMVEC_START CONFIG_ROMVEC 23 #define ROMVEC_START CONFIG_ROMVEC
24 #define ROMVEC_LENGTH CONFIG_ROMVECSIZE 24 #define ROMVEC_LENGTH CONFIG_ROMVECSIZE
25 #define ROM_START CONFIG_ROMSTART 25 #define ROM_START CONFIG_ROMSTART
26 #define ROM_LENGTH CONFIG_ROMSIZE 26 #define ROM_LENGTH CONFIG_ROMSIZE
27 #define TEXT rom 27 #define TEXT rom
28 #define DATA ram 28 #define DATA ram
29 #define INIT ram 29 #define INIT ram
30 #define BSS ram 30 #define BSS ram
31 #endif 31 #endif
32 32
33 #ifndef DATA_ADDR 33 #ifndef DATA_ADDR
34 #define DATA_ADDR 34 #define DATA_ADDR
35 #endif 35 #endif
36 36
37 37
38 OUTPUT_ARCH(m68k) 38 OUTPUT_ARCH(m68k)
39 ENTRY(_start) 39 ENTRY(_start)
40 40
41 MEMORY { 41 MEMORY {
42 ram : ORIGIN = RAM_START, LENGTH = RAM_LENGTH 42 ram : ORIGIN = RAM_START, LENGTH = RAM_LENGTH
43 #ifdef ROM_START 43 #ifdef ROM_START
44 romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH 44 romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH
45 rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH 45 rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH
46 #endif 46 #endif
47 } 47 }
48 48
49 jiffies = jiffies_64 + 4; 49 jiffies = jiffies_64 + 4;
50 50
51 SECTIONS { 51 SECTIONS {
52 52
53 #ifdef ROMVEC_START 53 #ifdef ROMVEC_START
54 . = ROMVEC_START ; 54 . = ROMVEC_START ;
55 .romvec : { 55 .romvec : {
56 __rom_start = . ; 56 __rom_start = . ;
57 _romvec = .; 57 _romvec = .;
58 *(.data.initvect) 58 *(.data.initvect)
59 } > romvec 59 } > romvec
60 #endif 60 #endif
61 61
62 .text : { 62 .text : {
63 _text = .; 63 _text = .;
64 _stext = . ; 64 _stext = . ;
65 TEXT_TEXT 65 TEXT_TEXT
66 SCHED_TEXT 66 SCHED_TEXT
67 *(.text.lock) 67 *(.text.lock)
68 68
69 . = ALIGN(16); /* Exception table */ 69 . = ALIGN(16); /* Exception table */
70 __start___ex_table = .; 70 __start___ex_table = .;
71 *(__ex_table) 71 *(__ex_table)
72 __stop___ex_table = .; 72 __stop___ex_table = .;
73 73
74 *(.rodata) *(.rodata.*) 74 *(.rodata) *(.rodata.*)
75 *(__vermagic) /* Kernel version magic */ 75 *(__vermagic) /* Kernel version magic */
76 *(.rodata1) 76 *(.rodata1)
77 *(.rodata.str1.1) 77 *(.rodata.str1.1)
78 78
79 /* Kernel symbol table: Normal symbols */ 79 /* Kernel symbol table: Normal symbols */
80 . = ALIGN(4); 80 . = ALIGN(4);
81 __start___ksymtab = .; 81 __start___ksymtab = .;
82 *(__ksymtab) 82 *(__ksymtab)
83 __stop___ksymtab = .; 83 __stop___ksymtab = .;
84 84
85 /* Kernel symbol table: GPL-only symbols */ 85 /* Kernel symbol table: GPL-only symbols */
86 __start___ksymtab_gpl = .; 86 __start___ksymtab_gpl = .;
87 *(__ksymtab_gpl) 87 *(__ksymtab_gpl)
88 __stop___ksymtab_gpl = .; 88 __stop___ksymtab_gpl = .;
89 89
90 /* Kernel symbol table: Normal unused symbols */ 90 /* Kernel symbol table: Normal unused symbols */
91 __start___ksymtab_unused = .; 91 __start___ksymtab_unused = .;
92 *(__ksymtab_unused) 92 *(__ksymtab_unused)
93 __stop___ksymtab_unused = .; 93 __stop___ksymtab_unused = .;
94 94
95 /* Kernel symbol table: GPL-only unused symbols */ 95 /* Kernel symbol table: GPL-only unused symbols */
96 __start___ksymtab_unused_gpl = .; 96 __start___ksymtab_unused_gpl = .;
97 *(__ksymtab_unused_gpl) 97 *(__ksymtab_unused_gpl)
98 __stop___ksymtab_unused_gpl = .; 98 __stop___ksymtab_unused_gpl = .;
99 99
100 /* Kernel symbol table: GPL-future symbols */ 100 /* Kernel symbol table: GPL-future symbols */
101 __start___ksymtab_gpl_future = .; 101 __start___ksymtab_gpl_future = .;
102 *(__ksymtab_gpl_future) 102 *(__ksymtab_gpl_future)
103 __stop___ksymtab_gpl_future = .; 103 __stop___ksymtab_gpl_future = .;
104 104
105 /* Kernel symbol table: Normal symbols */ 105 /* Kernel symbol table: Normal symbols */
106 __start___kcrctab = .; 106 __start___kcrctab = .;
107 *(__kcrctab) 107 *(__kcrctab)
108 __stop___kcrctab = .; 108 __stop___kcrctab = .;
109 109
110 /* Kernel symbol table: GPL-only symbols */ 110 /* Kernel symbol table: GPL-only symbols */
111 __start___kcrctab_gpl = .; 111 __start___kcrctab_gpl = .;
112 *(__kcrctab_gpl) 112 *(__kcrctab_gpl)
113 __stop___kcrctab_gpl = .; 113 __stop___kcrctab_gpl = .;
114 114
115 /* Kernel symbol table: GPL-future symbols */ 115 /* Kernel symbol table: GPL-future symbols */
116 __start___kcrctab_gpl_future = .; 116 __start___kcrctab_gpl_future = .;
117 *(__kcrctab_gpl_future) 117 *(__kcrctab_gpl_future)
118 __stop___kcrctab_gpl_future = .; 118 __stop___kcrctab_gpl_future = .;
119 119
120 /* Kernel symbol table: strings */ 120 /* Kernel symbol table: strings */
121 *(__ksymtab_strings) 121 *(__ksymtab_strings)
122 122
123 /* Built-in module parameters */ 123 /* Built-in module parameters */
124 . = ALIGN(4) ; 124 . = ALIGN(4) ;
125 __start___param = .; 125 __start___param = .;
126 *(__param) 126 *(__param)
127 __stop___param = .; 127 __stop___param = .;
128 128
129 . = ALIGN(4) ; 129 . = ALIGN(4) ;
130 _etext = . ; 130 _etext = . ;
131 } > TEXT 131 } > TEXT
132 132
133 .data DATA_ADDR : { 133 .data DATA_ADDR : {
134 . = ALIGN(4); 134 . = ALIGN(4);
135 _sdata = . ; 135 _sdata = . ;
136 *(.data) 136 DATA_DATA
137 . = ALIGN(8192) ; 137 . = ALIGN(8192) ;
138 *(.data.init_task) 138 *(.data.init_task)
139 _edata = . ; 139 _edata = . ;
140 } > DATA 140 } > DATA
141 141
142 .init : { 142 .init : {
143 . = ALIGN(4096); 143 . = ALIGN(4096);
144 __init_begin = .; 144 __init_begin = .;
145 _sinittext = .; 145 _sinittext = .;
146 *(.init.text) 146 *(.init.text)
147 _einittext = .; 147 _einittext = .;
148 *(.init.data) 148 *(.init.data)
149 . = ALIGN(16); 149 . = ALIGN(16);
150 __setup_start = .; 150 __setup_start = .;
151 *(.init.setup) 151 *(.init.setup)
152 __setup_end = .; 152 __setup_end = .;
153 __initcall_start = .; 153 __initcall_start = .;
154 INITCALLS 154 INITCALLS
155 __initcall_end = .; 155 __initcall_end = .;
156 __con_initcall_start = .; 156 __con_initcall_start = .;
157 *(.con_initcall.init) 157 *(.con_initcall.init)
158 __con_initcall_end = .; 158 __con_initcall_end = .;
159 __security_initcall_start = .; 159 __security_initcall_start = .;
160 *(.security_initcall.init) 160 *(.security_initcall.init)
161 __security_initcall_end = .; 161 __security_initcall_end = .;
162 #ifdef CONFIG_BLK_DEV_INITRD 162 #ifdef CONFIG_BLK_DEV_INITRD
163 . = ALIGN(4); 163 . = ALIGN(4);
164 __initramfs_start = .; 164 __initramfs_start = .;
165 *(.init.ramfs) 165 *(.init.ramfs)
166 __initramfs_end = .; 166 __initramfs_end = .;
167 #endif 167 #endif
168 . = ALIGN(4096); 168 . = ALIGN(4096);
169 __init_end = .; 169 __init_end = .;
170 } > INIT 170 } > INIT
171 171
172 /DISCARD/ : { 172 /DISCARD/ : {
173 *(.exit.text) 173 *(.exit.text)
174 *(.exit.data) 174 *(.exit.data)
175 *(.exitcall.exit) 175 *(.exitcall.exit)
176 } 176 }
177 177
178 .bss : { 178 .bss : {
179 . = ALIGN(4); 179 . = ALIGN(4);
180 _sbss = . ; 180 _sbss = . ;
181 *(.bss) 181 *(.bss)
182 *(COMMON) 182 *(COMMON)
183 . = ALIGN(4) ; 183 . = ALIGN(4) ;
184 _ebss = . ; 184 _ebss = . ;
185 } > BSS 185 } > BSS
186 186
187 } 187 }
188 188
189 189
arch/mips/kernel/vmlinux.lds.S
1 #include <asm/asm-offsets.h> 1 #include <asm/asm-offsets.h>
2 #include <asm-generic/vmlinux.lds.h> 2 #include <asm-generic/vmlinux.lds.h>
3 3
4 #undef mips 4 #undef mips
5 #define mips mips 5 #define mips mips
6 OUTPUT_ARCH(mips) 6 OUTPUT_ARCH(mips)
7 ENTRY(kernel_entry) 7 ENTRY(kernel_entry)
8 jiffies = JIFFIES; 8 jiffies = JIFFIES;
9 SECTIONS 9 SECTIONS
10 { 10 {
11 #ifdef CONFIG_BOOT_ELF64 11 #ifdef CONFIG_BOOT_ELF64
12 /* Read-only sections, merged into text segment: */ 12 /* Read-only sections, merged into text segment: */
13 /* . = 0xc000000000000000; */ 13 /* . = 0xc000000000000000; */
14 14
15 /* This is the value for an Origin kernel, taken from an IRIX kernel. */ 15 /* This is the value for an Origin kernel, taken from an IRIX kernel. */
16 /* . = 0xc00000000001c000; */ 16 /* . = 0xc00000000001c000; */
17 17
18 /* Set the vaddr for the text segment to a value 18 /* Set the vaddr for the text segment to a value
19 >= 0xa800 0000 0001 9000 if no symmon is going to configured 19 >= 0xa800 0000 0001 9000 if no symmon is going to configured
20 >= 0xa800 0000 0030 0000 otherwise */ 20 >= 0xa800 0000 0030 0000 otherwise */
21 21
22 /* . = 0xa800000000300000; */ 22 /* . = 0xa800000000300000; */
23 /* . = 0xa800000000300000; */ 23 /* . = 0xa800000000300000; */
24 . = 0xffffffff80300000; 24 . = 0xffffffff80300000;
25 #endif 25 #endif
26 . = LOADADDR; 26 . = LOADADDR;
27 /* read-only */ 27 /* read-only */
28 _text = .; /* Text and read-only data */ 28 _text = .; /* Text and read-only data */
29 .text : { 29 .text : {
30 TEXT_TEXT 30 TEXT_TEXT
31 SCHED_TEXT 31 SCHED_TEXT
32 LOCK_TEXT 32 LOCK_TEXT
33 *(.fixup) 33 *(.fixup)
34 *(.gnu.warning) 34 *(.gnu.warning)
35 } =0 35 } =0
36 36
37 _etext = .; /* End of text section */ 37 _etext = .; /* End of text section */
38 38
39 . = ALIGN(16); /* Exception table */ 39 . = ALIGN(16); /* Exception table */
40 __start___ex_table = .; 40 __start___ex_table = .;
41 __ex_table : { *(__ex_table) } 41 __ex_table : { *(__ex_table) }
42 __stop___ex_table = .; 42 __stop___ex_table = .;
43 43
44 __start___dbe_table = .; /* Exception table for data bus errors */ 44 __start___dbe_table = .; /* Exception table for data bus errors */
45 __dbe_table : { *(__dbe_table) } 45 __dbe_table : { *(__dbe_table) }
46 __stop___dbe_table = .; 46 __stop___dbe_table = .;
47 47
48 RODATA 48 RODATA
49 49
50 /* writeable */ 50 /* writeable */
51 .data : { /* Data */ 51 .data : { /* Data */
52 . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ 52 . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */
53 /* 53 /*
54 * This ALIGN is needed as a workaround for a bug a gcc bug upto 4.1 which 54 * This ALIGN is needed as a workaround for a bug a gcc bug upto 4.1 which
55 * limits the maximum alignment to at most 32kB and results in the following 55 * limits the maximum alignment to at most 32kB and results in the following
56 * warning: 56 * warning:
57 * 57 *
58 * CC arch/mips/kernel/init_task.o 58 * CC arch/mips/kernel/init_task.o
59 * arch/mips/kernel/init_task.c:30: warning: alignment of โ€˜init_thread_unionโ€™ 59 * arch/mips/kernel/init_task.c:30: warning: alignment of โ€˜init_thread_unionโ€™
60 * is greater than maximum object file alignment. Using 32768 60 * is greater than maximum object file alignment. Using 32768
61 */ 61 */
62 . = ALIGN(_PAGE_SIZE); 62 . = ALIGN(_PAGE_SIZE);
63 *(.data.init_task) 63 *(.data.init_task)
64 64
65 *(.data) 65 DATA_DATA
66 66
67 CONSTRUCTORS 67 CONSTRUCTORS
68 } 68 }
69 _gp = . + 0x8000; 69 _gp = . + 0x8000;
70 .lit8 : { *(.lit8) } 70 .lit8 : { *(.lit8) }
71 .lit4 : { *(.lit4) } 71 .lit4 : { *(.lit4) }
72 /* We want the small data sections together, so single-instruction offsets 72 /* We want the small data sections together, so single-instruction offsets
73 can access them all, and initialized data all before uninitialized, so 73 can access them all, and initialized data all before uninitialized, so
74 we can shorten the on-disk segment size. */ 74 we can shorten the on-disk segment size. */
75 .sdata : { *(.sdata) } 75 .sdata : { *(.sdata) }
76 76
77 . = ALIGN(_PAGE_SIZE); 77 . = ALIGN(_PAGE_SIZE);
78 __nosave_begin = .; 78 __nosave_begin = .;
79 .data_nosave : { *(.data.nosave) } 79 .data_nosave : { *(.data.nosave) }
80 . = ALIGN(_PAGE_SIZE); 80 . = ALIGN(_PAGE_SIZE);
81 __nosave_end = .; 81 __nosave_end = .;
82 82
83 . = ALIGN(32); 83 . = ALIGN(32);
84 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 84 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
85 85
86 _edata = .; /* End of data section */ 86 _edata = .; /* End of data section */
87 87
88 /* will be freed after init */ 88 /* will be freed after init */
89 . = ALIGN(_PAGE_SIZE); /* Init code and data */ 89 . = ALIGN(_PAGE_SIZE); /* Init code and data */
90 __init_begin = .; 90 __init_begin = .;
91 .init.text : { 91 .init.text : {
92 _sinittext = .; 92 _sinittext = .;
93 *(.init.text) 93 *(.init.text)
94 _einittext = .; 94 _einittext = .;
95 } 95 }
96 .init.data : { *(.init.data) } 96 .init.data : { *(.init.data) }
97 . = ALIGN(16); 97 . = ALIGN(16);
98 __setup_start = .; 98 __setup_start = .;
99 .init.setup : { *(.init.setup) } 99 .init.setup : { *(.init.setup) }
100 __setup_end = .; 100 __setup_end = .;
101 101
102 __initcall_start = .; 102 __initcall_start = .;
103 .initcall.init : { 103 .initcall.init : {
104 INITCALLS 104 INITCALLS
105 } 105 }
106 __initcall_end = .; 106 __initcall_end = .;
107 107
108 __con_initcall_start = .; 108 __con_initcall_start = .;
109 .con_initcall.init : { *(.con_initcall.init) } 109 .con_initcall.init : { *(.con_initcall.init) }
110 __con_initcall_end = .; 110 __con_initcall_end = .;
111 SECURITY_INIT 111 SECURITY_INIT
112 /* .exit.text is discarded at runtime, not link time, to deal with 112 /* .exit.text is discarded at runtime, not link time, to deal with
113 references from .rodata */ 113 references from .rodata */
114 .exit.text : { *(.exit.text) } 114 .exit.text : { *(.exit.text) }
115 .exit.data : { *(.exit.data) } 115 .exit.data : { *(.exit.data) }
116 #if defined(CONFIG_BLK_DEV_INITRD) 116 #if defined(CONFIG_BLK_DEV_INITRD)
117 . = ALIGN(_PAGE_SIZE); 117 . = ALIGN(_PAGE_SIZE);
118 __initramfs_start = .; 118 __initramfs_start = .;
119 .init.ramfs : { *(.init.ramfs) } 119 .init.ramfs : { *(.init.ramfs) }
120 __initramfs_end = .; 120 __initramfs_end = .;
121 #endif 121 #endif
122 . = ALIGN(_PAGE_SIZE); 122 . = ALIGN(_PAGE_SIZE);
123 __per_cpu_start = .; 123 __per_cpu_start = .;
124 .data.percpu : { *(.data.percpu) } 124 .data.percpu : { *(.data.percpu) }
125 __per_cpu_end = .; 125 __per_cpu_end = .;
126 . = ALIGN(_PAGE_SIZE); 126 . = ALIGN(_PAGE_SIZE);
127 __init_end = .; 127 __init_end = .;
128 /* freed after init ends here */ 128 /* freed after init ends here */
129 129
130 __bss_start = .; /* BSS */ 130 __bss_start = .; /* BSS */
131 .sbss : { 131 .sbss : {
132 *(.sbss) 132 *(.sbss)
133 *(.scommon) 133 *(.scommon)
134 } 134 }
135 .bss : { 135 .bss : {
136 *(.bss) 136 *(.bss)
137 *(COMMON) 137 *(COMMON)
138 } 138 }
139 __bss_stop = .; 139 __bss_stop = .;
140 140
141 _end = . ; 141 _end = . ;
142 142
143 /* Sections to be discarded */ 143 /* Sections to be discarded */
144 /DISCARD/ : { 144 /DISCARD/ : {
145 *(.exitcall.exit) 145 *(.exitcall.exit)
146 146
147 /* ABI crap starts here */ 147 /* ABI crap starts here */
148 *(.comment) 148 *(.comment)
149 *(.MIPS.options) 149 *(.MIPS.options)
150 *(.note) 150 *(.note)
151 *(.options) 151 *(.options)
152 *(.pdr) 152 *(.pdr)
153 *(.reginfo) 153 *(.reginfo)
154 *(.mdebug*) 154 *(.mdebug*)
155 } 155 }
156 156
157 /* This is the MIPS specific mdebug section. */ 157 /* This is the MIPS specific mdebug section. */
158 .mdebug : { *(.mdebug) } 158 .mdebug : { *(.mdebug) }
159 159
160 STABS_DEBUG 160 STABS_DEBUG
161 161
162 DWARF_DEBUG 162 DWARF_DEBUG
163 163
164 /* These must appear regardless of . */ 164 /* These must appear regardless of . */
165 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } 165 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
166 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } 166 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
167 .note : { *(.note) } 167 .note : { *(.note) }
168 } 168 }
169 169
arch/parisc/kernel/vmlinux.lds.S
1 /* Kernel link layout for various "sections" 1 /* Kernel link layout for various "sections"
2 * 2 *
3 * Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org> 3 * Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org>
4 * Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org> 4 * Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
5 * Copyright (C) 2000 John Marvin <jsm at parisc-linux.org> 5 * Copyright (C) 2000 John Marvin <jsm at parisc-linux.org>
6 * Copyright (C) 2000 Michael Ang <mang with subcarrier.org> 6 * Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
7 * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org> 7 * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
8 * Copyright (C) 2003 James Bottomley <jejb with parisc-linux.org> 8 * Copyright (C) 2003 James Bottomley <jejb with parisc-linux.org>
9 * Copyright (C) 2006 Helge Deller <deller@gmx.de> 9 * Copyright (C) 2006 Helge Deller <deller@gmx.de>
10 * 10 *
11 * 11 *
12 * This program is free software; you can redistribute it and/or modify 12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by 13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or 14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version. 15 * (at your option) any later version.
16 * 16 *
17 * This program is distributed in the hope that it will be useful, 17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details. 20 * GNU General Public License for more details.
21 * 21 *
22 * You should have received a copy of the GNU General Public License 22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software 23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 */ 25 */
26 #include <asm-generic/vmlinux.lds.h> 26 #include <asm-generic/vmlinux.lds.h>
27 /* needed for the processor specific cache alignment size */ 27 /* needed for the processor specific cache alignment size */
28 #include <asm/cache.h> 28 #include <asm/cache.h>
29 #include <asm/page.h> 29 #include <asm/page.h>
30 #include <asm/asm-offsets.h> 30 #include <asm/asm-offsets.h>
31 31
32 /* ld script to make hppa Linux kernel */ 32 /* ld script to make hppa Linux kernel */
33 #ifndef CONFIG_64BIT 33 #ifndef CONFIG_64BIT
34 OUTPUT_FORMAT("elf32-hppa-linux") 34 OUTPUT_FORMAT("elf32-hppa-linux")
35 OUTPUT_ARCH(hppa) 35 OUTPUT_ARCH(hppa)
36 #else 36 #else
37 OUTPUT_FORMAT("elf64-hppa-linux") 37 OUTPUT_FORMAT("elf64-hppa-linux")
38 OUTPUT_ARCH(hppa:hppa2.0w) 38 OUTPUT_ARCH(hppa:hppa2.0w)
39 #endif 39 #endif
40 40
41 ENTRY(_stext) 41 ENTRY(_stext)
42 #ifndef CONFIG_64BIT 42 #ifndef CONFIG_64BIT
43 jiffies = jiffies_64 + 4; 43 jiffies = jiffies_64 + 4;
44 #else 44 #else
45 jiffies = jiffies_64; 45 jiffies = jiffies_64;
46 #endif 46 #endif
47 SECTIONS 47 SECTIONS
48 { 48 {
49 49
50 . = KERNEL_BINARY_TEXT_START; 50 . = KERNEL_BINARY_TEXT_START;
51 51
52 _text = .; /* Text and read-only data */ 52 _text = .; /* Text and read-only data */
53 .text ALIGN(16) : { 53 .text ALIGN(16) : {
54 TEXT_TEXT 54 TEXT_TEXT
55 SCHED_TEXT 55 SCHED_TEXT
56 LOCK_TEXT 56 LOCK_TEXT
57 *(.text.do_softirq) 57 *(.text.do_softirq)
58 *(.text.sys_exit) 58 *(.text.sys_exit)
59 *(.text.do_sigaltstack) 59 *(.text.do_sigaltstack)
60 *(.text.do_fork) 60 *(.text.do_fork)
61 *(.text.*) 61 *(.text.*)
62 *(.fixup) 62 *(.fixup)
63 *(.lock.text) /* out-of-line lock text */ 63 *(.lock.text) /* out-of-line lock text */
64 *(.gnu.warning) 64 *(.gnu.warning)
65 } = 0 65 } = 0
66 66
67 _etext = .; /* End of text section */ 67 _etext = .; /* End of text section */
68 68
69 RODATA 69 RODATA
70 70
71 BUG_TABLE 71 BUG_TABLE
72 72
73 /* writeable */ 73 /* writeable */
74 . = ALIGN(ASM_PAGE_SIZE); /* Make sure this is page aligned so 74 . = ALIGN(ASM_PAGE_SIZE); /* Make sure this is page aligned so
75 that we can properly leave these 75 that we can properly leave these
76 as writable */ 76 as writable */
77 data_start = .; 77 data_start = .;
78 78
79 . = ALIGN(16); /* Exception table */ 79 . = ALIGN(16); /* Exception table */
80 __start___ex_table = .; 80 __start___ex_table = .;
81 __ex_table : { *(__ex_table) } 81 __ex_table : { *(__ex_table) }
82 __stop___ex_table = .; 82 __stop___ex_table = .;
83 83
84 __start___unwind = .; /* unwind info */ 84 __start___unwind = .; /* unwind info */
85 .PARISC.unwind : { *(.PARISC.unwind) } 85 .PARISC.unwind : { *(.PARISC.unwind) }
86 __stop___unwind = .; 86 __stop___unwind = .;
87 87
88 /* rarely changed data like cpu maps */ 88 /* rarely changed data like cpu maps */
89 . = ALIGN(16); 89 . = ALIGN(16);
90 .data.read_mostly : { *(.data.read_mostly) } 90 .data.read_mostly : { *(.data.read_mostly) }
91 91
92 . = ALIGN(L1_CACHE_BYTES); 92 . = ALIGN(L1_CACHE_BYTES);
93 .data : { /* Data */ 93 .data : { /* Data */
94 *(.data) 94 DATA_DATA
95 CONSTRUCTORS 95 CONSTRUCTORS
96 } 96 }
97 97
98 . = ALIGN(L1_CACHE_BYTES); 98 . = ALIGN(L1_CACHE_BYTES);
99 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 99 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
100 100
101 /* PA-RISC locks requires 16-byte alignment */ 101 /* PA-RISC locks requires 16-byte alignment */
102 . = ALIGN(16); 102 . = ALIGN(16);
103 .data.lock_aligned : { *(.data.lock_aligned) } 103 .data.lock_aligned : { *(.data.lock_aligned) }
104 104
105 . = ALIGN(ASM_PAGE_SIZE); 105 . = ALIGN(ASM_PAGE_SIZE);
106 /* nosave data is really only used for software suspend...it's here 106 /* nosave data is really only used for software suspend...it's here
107 * just in case we ever implement it */ 107 * just in case we ever implement it */
108 __nosave_begin = .; 108 __nosave_begin = .;
109 .data_nosave : { *(.data.nosave) } 109 .data_nosave : { *(.data.nosave) }
110 . = ALIGN(ASM_PAGE_SIZE); 110 . = ALIGN(ASM_PAGE_SIZE);
111 __nosave_end = .; 111 __nosave_end = .;
112 112
113 _edata = .; /* End of data section */ 113 _edata = .; /* End of data section */
114 114
115 __bss_start = .; /* BSS */ 115 __bss_start = .; /* BSS */
116 /* page table entries need to be PAGE_SIZE aligned */ 116 /* page table entries need to be PAGE_SIZE aligned */
117 . = ALIGN(ASM_PAGE_SIZE); 117 . = ALIGN(ASM_PAGE_SIZE);
118 .data.vmpages : { 118 .data.vmpages : {
119 *(.data.vm0.pmd) 119 *(.data.vm0.pmd)
120 *(.data.vm0.pgd) 120 *(.data.vm0.pgd)
121 *(.data.vm0.pte) 121 *(.data.vm0.pte)
122 } 122 }
123 .bss : { *(.bss) *(COMMON) } 123 .bss : { *(.bss) *(COMMON) }
124 __bss_stop = .; 124 __bss_stop = .;
125 125
126 126
127 /* assembler code expects init_task to be 16k aligned */ 127 /* assembler code expects init_task to be 16k aligned */
128 . = ALIGN(16384); /* init_task */ 128 . = ALIGN(16384); /* init_task */
129 .data.init_task : { *(.data.init_task) } 129 .data.init_task : { *(.data.init_task) }
130 130
131 /* The interrupt stack is currently partially coded, but not yet 131 /* The interrupt stack is currently partially coded, but not yet
132 * implemented */ 132 * implemented */
133 . = ALIGN(16384); 133 . = ALIGN(16384);
134 init_istack : { *(init_istack) } 134 init_istack : { *(init_istack) }
135 135
136 #ifdef CONFIG_64BIT 136 #ifdef CONFIG_64BIT
137 . = ALIGN(16); /* Linkage tables */ 137 . = ALIGN(16); /* Linkage tables */
138 .opd : { *(.opd) } PROVIDE (__gp = .); 138 .opd : { *(.opd) } PROVIDE (__gp = .);
139 .plt : { *(.plt) } 139 .plt : { *(.plt) }
140 .dlt : { *(.dlt) } 140 .dlt : { *(.dlt) }
141 #endif 141 #endif
142 142
143 /* reserve space for interrupt stack by aligning __init* to 16k */ 143 /* reserve space for interrupt stack by aligning __init* to 16k */
144 . = ALIGN(16384); 144 . = ALIGN(16384);
145 __init_begin = .; 145 __init_begin = .;
146 .init.text : { 146 .init.text : {
147 _sinittext = .; 147 _sinittext = .;
148 *(.init.text) 148 *(.init.text)
149 _einittext = .; 149 _einittext = .;
150 } 150 }
151 .init.data : { *(.init.data) } 151 .init.data : { *(.init.data) }
152 . = ALIGN(16); 152 . = ALIGN(16);
153 __setup_start = .; 153 __setup_start = .;
154 .init.setup : { *(.init.setup) } 154 .init.setup : { *(.init.setup) }
155 __setup_end = .; 155 __setup_end = .;
156 __initcall_start = .; 156 __initcall_start = .;
157 .initcall.init : { 157 .initcall.init : {
158 INITCALLS 158 INITCALLS
159 } 159 }
160 __initcall_end = .; 160 __initcall_end = .;
161 __con_initcall_start = .; 161 __con_initcall_start = .;
162 .con_initcall.init : { *(.con_initcall.init) } 162 .con_initcall.init : { *(.con_initcall.init) }
163 __con_initcall_end = .; 163 __con_initcall_end = .;
164 SECURITY_INIT 164 SECURITY_INIT
165 /* alternate instruction replacement. This is a mechanism x86 uses 165 /* alternate instruction replacement. This is a mechanism x86 uses
166 * to detect the CPU type and replace generic instruction sequences 166 * to detect the CPU type and replace generic instruction sequences
167 * with CPU specific ones. We don't currently do this in PA, but 167 * with CPU specific ones. We don't currently do this in PA, but
168 * it seems like a good idea... */ 168 * it seems like a good idea... */
169 . = ALIGN(4); 169 . = ALIGN(4);
170 __alt_instructions = .; 170 __alt_instructions = .;
171 .altinstructions : { *(.altinstructions) } 171 .altinstructions : { *(.altinstructions) }
172 __alt_instructions_end = .; 172 __alt_instructions_end = .;
173 .altinstr_replacement : { *(.altinstr_replacement) } 173 .altinstr_replacement : { *(.altinstr_replacement) }
174 /* .exit.text is discard at runtime, not link time, to deal with references 174 /* .exit.text is discard at runtime, not link time, to deal with references
175 from .altinstructions and .eh_frame */ 175 from .altinstructions and .eh_frame */
176 .exit.text : { *(.exit.text) } 176 .exit.text : { *(.exit.text) }
177 .exit.data : { *(.exit.data) } 177 .exit.data : { *(.exit.data) }
178 #ifdef CONFIG_BLK_DEV_INITRD 178 #ifdef CONFIG_BLK_DEV_INITRD
179 . = ALIGN(ASM_PAGE_SIZE); 179 . = ALIGN(ASM_PAGE_SIZE);
180 __initramfs_start = .; 180 __initramfs_start = .;
181 .init.ramfs : { *(.init.ramfs) } 181 .init.ramfs : { *(.init.ramfs) }
182 __initramfs_end = .; 182 __initramfs_end = .;
183 #endif 183 #endif
184 . = ALIGN(ASM_PAGE_SIZE); 184 . = ALIGN(ASM_PAGE_SIZE);
185 __per_cpu_start = .; 185 __per_cpu_start = .;
186 .data.percpu : { *(.data.percpu) } 186 .data.percpu : { *(.data.percpu) }
187 __per_cpu_end = .; 187 __per_cpu_end = .;
188 . = ALIGN(ASM_PAGE_SIZE); 188 . = ALIGN(ASM_PAGE_SIZE);
189 __init_end = .; 189 __init_end = .;
190 /* freed after init ends here */ 190 /* freed after init ends here */
191 191
192 _end = . ; 192 _end = . ;
193 193
194 /* Sections to be discarded */ 194 /* Sections to be discarded */
195 /DISCARD/ : { 195 /DISCARD/ : {
196 *(.exitcall.exit) 196 *(.exitcall.exit)
197 #ifdef CONFIG_64BIT 197 #ifdef CONFIG_64BIT
198 /* temporary hack until binutils is fixed to not emit these 198 /* temporary hack until binutils is fixed to not emit these
199 for static binaries */ 199 for static binaries */
200 *(.interp) 200 *(.interp)
201 *(.dynsym) 201 *(.dynsym)
202 *(.dynstr) 202 *(.dynstr)
203 *(.dynamic) 203 *(.dynamic)
204 *(.hash) 204 *(.hash)
205 *(.gnu.hash) 205 *(.gnu.hash)
206 #endif 206 #endif
207 } 207 }
208 208
209 STABS_DEBUG 209 STABS_DEBUG
210 .note 0 : { *(.note) } 210 .note 0 : { *(.note) }
211 211
212 } 212 }
213 213
arch/powerpc/kernel/vmlinux.lds.S
1 #ifdef CONFIG_PPC64 1 #ifdef CONFIG_PPC64
2 #include <asm/page.h> 2 #include <asm/page.h>
3 #define PROVIDE32(x) PROVIDE(__unused__##x) 3 #define PROVIDE32(x) PROVIDE(__unused__##x)
4 #else 4 #else
5 #define PAGE_SIZE 4096 5 #define PAGE_SIZE 4096
6 #define KERNELBASE CONFIG_KERNEL_START 6 #define KERNELBASE CONFIG_KERNEL_START
7 #define PROVIDE32(x) PROVIDE(x) 7 #define PROVIDE32(x) PROVIDE(x)
8 #endif 8 #endif
9 #include <asm-generic/vmlinux.lds.h> 9 #include <asm-generic/vmlinux.lds.h>
10 10
11 ENTRY(_stext) 11 ENTRY(_stext)
12 12
13 #ifdef CONFIG_PPC64 13 #ifdef CONFIG_PPC64
14 OUTPUT_ARCH(powerpc:common64) 14 OUTPUT_ARCH(powerpc:common64)
15 jiffies = jiffies_64; 15 jiffies = jiffies_64;
16 #else 16 #else
17 OUTPUT_ARCH(powerpc:common) 17 OUTPUT_ARCH(powerpc:common)
18 jiffies = jiffies_64 + 4; 18 jiffies = jiffies_64 + 4;
19 #endif 19 #endif
20 SECTIONS 20 SECTIONS
21 { 21 {
22 /* Sections to be discarded. */ 22 /* Sections to be discarded. */
23 /DISCARD/ : { 23 /DISCARD/ : {
24 *(.exitcall.exit) 24 *(.exitcall.exit)
25 *(.exit.data) 25 *(.exit.data)
26 } 26 }
27 27
28 . = KERNELBASE; 28 . = KERNELBASE;
29 29
30 /* 30 /*
31 * Text, read only data and other permanent read-only sections 31 * Text, read only data and other permanent read-only sections
32 */ 32 */
33 33
34 /* Text and gots */ 34 /* Text and gots */
35 .text : { 35 .text : {
36 _text = .; 36 _text = .;
37 *(.text.*) 37 *(.text.*)
38 TEXT_TEXT 38 TEXT_TEXT
39 SCHED_TEXT 39 SCHED_TEXT
40 LOCK_TEXT 40 LOCK_TEXT
41 KPROBES_TEXT 41 KPROBES_TEXT
42 *(.fixup) 42 *(.fixup)
43 43
44 #ifdef CONFIG_PPC32 44 #ifdef CONFIG_PPC32
45 *(.got1) 45 *(.got1)
46 __got2_start = .; 46 __got2_start = .;
47 *(.got2) 47 *(.got2)
48 __got2_end = .; 48 __got2_end = .;
49 #endif /* CONFIG_PPC32 */ 49 #endif /* CONFIG_PPC32 */
50 50
51 . = ALIGN(PAGE_SIZE); 51 . = ALIGN(PAGE_SIZE);
52 _etext = .; 52 _etext = .;
53 PROVIDE32 (etext = .); 53 PROVIDE32 (etext = .);
54 } 54 }
55 55
56 /* Read-only data */ 56 /* Read-only data */
57 RODATA 57 RODATA
58 58
59 /* Exception & bug tables */ 59 /* Exception & bug tables */
60 __ex_table : { 60 __ex_table : {
61 __start___ex_table = .; 61 __start___ex_table = .;
62 *(__ex_table) 62 *(__ex_table)
63 __stop___ex_table = .; 63 __stop___ex_table = .;
64 } 64 }
65 65
66 BUG_TABLE 66 BUG_TABLE
67 67
68 /* 68 /*
69 * Init sections discarded at runtime 69 * Init sections discarded at runtime
70 */ 70 */
71 . = ALIGN(PAGE_SIZE); 71 . = ALIGN(PAGE_SIZE);
72 __init_begin = .; 72 __init_begin = .;
73 73
74 .init.text : { 74 .init.text : {
75 _sinittext = .; 75 _sinittext = .;
76 *(.init.text) 76 *(.init.text)
77 _einittext = .; 77 _einittext = .;
78 } 78 }
79 79
80 /* .exit.text is discarded at runtime, not link time, 80 /* .exit.text is discarded at runtime, not link time,
81 * to deal with references from __bug_table 81 * to deal with references from __bug_table
82 */ 82 */
83 .exit.text : { *(.exit.text) } 83 .exit.text : { *(.exit.text) }
84 84
85 .init.data : { 85 .init.data : {
86 *(.init.data); 86 *(.init.data);
87 __vtop_table_begin = .; 87 __vtop_table_begin = .;
88 *(.vtop_fixup); 88 *(.vtop_fixup);
89 __vtop_table_end = .; 89 __vtop_table_end = .;
90 __ptov_table_begin = .; 90 __ptov_table_begin = .;
91 *(.ptov_fixup); 91 *(.ptov_fixup);
92 __ptov_table_end = .; 92 __ptov_table_end = .;
93 #ifdef CONFIG_PPC_ISERIES 93 #ifdef CONFIG_PPC_ISERIES
94 __dt_strings_start = .; 94 __dt_strings_start = .;
95 *(.dt_strings); 95 *(.dt_strings);
96 __dt_strings_end = .; 96 __dt_strings_end = .;
97 #endif 97 #endif
98 } 98 }
99 99
100 . = ALIGN(16); 100 . = ALIGN(16);
101 .init.setup : { 101 .init.setup : {
102 __setup_start = .; 102 __setup_start = .;
103 *(.init.setup) 103 *(.init.setup)
104 __setup_end = .; 104 __setup_end = .;
105 } 105 }
106 106
107 .initcall.init : { 107 .initcall.init : {
108 __initcall_start = .; 108 __initcall_start = .;
109 INITCALLS 109 INITCALLS
110 __initcall_end = .; 110 __initcall_end = .;
111 } 111 }
112 112
113 .con_initcall.init : { 113 .con_initcall.init : {
114 __con_initcall_start = .; 114 __con_initcall_start = .;
115 *(.con_initcall.init) 115 *(.con_initcall.init)
116 __con_initcall_end = .; 116 __con_initcall_end = .;
117 } 117 }
118 118
119 SECURITY_INIT 119 SECURITY_INIT
120 120
121 . = ALIGN(8); 121 . = ALIGN(8);
122 __ftr_fixup : { 122 __ftr_fixup : {
123 __start___ftr_fixup = .; 123 __start___ftr_fixup = .;
124 *(__ftr_fixup) 124 *(__ftr_fixup)
125 __stop___ftr_fixup = .; 125 __stop___ftr_fixup = .;
126 } 126 }
127 #ifdef CONFIG_PPC64 127 #ifdef CONFIG_PPC64
128 . = ALIGN(8); 128 . = ALIGN(8);
129 __fw_ftr_fixup : { 129 __fw_ftr_fixup : {
130 __start___fw_ftr_fixup = .; 130 __start___fw_ftr_fixup = .;
131 *(__fw_ftr_fixup) 131 *(__fw_ftr_fixup)
132 __stop___fw_ftr_fixup = .; 132 __stop___fw_ftr_fixup = .;
133 } 133 }
134 #endif 134 #endif
135 #ifdef CONFIG_BLK_DEV_INITRD 135 #ifdef CONFIG_BLK_DEV_INITRD
136 . = ALIGN(PAGE_SIZE); 136 . = ALIGN(PAGE_SIZE);
137 .init.ramfs : { 137 .init.ramfs : {
138 __initramfs_start = .; 138 __initramfs_start = .;
139 *(.init.ramfs) 139 *(.init.ramfs)
140 __initramfs_end = .; 140 __initramfs_end = .;
141 } 141 }
142 #endif 142 #endif
143 . = ALIGN(PAGE_SIZE); 143 . = ALIGN(PAGE_SIZE);
144 .data.percpu : { 144 .data.percpu : {
145 __per_cpu_start = .; 145 __per_cpu_start = .;
146 *(.data.percpu) 146 *(.data.percpu)
147 __per_cpu_end = .; 147 __per_cpu_end = .;
148 } 148 }
149 149
150 . = ALIGN(8); 150 . = ALIGN(8);
151 .machine.desc : { 151 .machine.desc : {
152 __machine_desc_start = . ; 152 __machine_desc_start = . ;
153 *(.machine.desc) 153 *(.machine.desc)
154 __machine_desc_end = . ; 154 __machine_desc_end = . ;
155 } 155 }
156 156
157 /* freed after init ends here */ 157 /* freed after init ends here */
158 . = ALIGN(PAGE_SIZE); 158 . = ALIGN(PAGE_SIZE);
159 __init_end = .; 159 __init_end = .;
160 160
161 /* 161 /*
162 * And now the various read/write data 162 * And now the various read/write data
163 */ 163 */
164 164
165 . = ALIGN(PAGE_SIZE); 165 . = ALIGN(PAGE_SIZE);
166 _sdata = .; 166 _sdata = .;
167 167
168 #ifdef CONFIG_PPC32 168 #ifdef CONFIG_PPC32
169 .data : 169 .data :
170 { 170 {
171 *(.data) 171 DATA_DATA
172 *(.sdata) 172 *(.sdata)
173 *(.got.plt) *(.got) 173 *(.got.plt) *(.got)
174 } 174 }
175 #else 175 #else
176 .data : { 176 .data : {
177 *(.data .data.rel* .toc1) 177 *(.data .data.rel* .toc1)
178 *(.branch_lt) 178 *(.branch_lt)
179 } 179 }
180 180
181 .opd : { 181 .opd : {
182 *(.opd) 182 *(.opd)
183 } 183 }
184 184
185 .got : { 185 .got : {
186 __toc_start = .; 186 __toc_start = .;
187 *(.got) 187 *(.got)
188 *(.toc) 188 *(.toc)
189 } 189 }
190 #endif 190 #endif
191 191
192 . = ALIGN(PAGE_SIZE); 192 . = ALIGN(PAGE_SIZE);
193 _edata = .; 193 _edata = .;
194 PROVIDE32 (edata = .); 194 PROVIDE32 (edata = .);
195 195
196 /* The initial task and kernel stack */ 196 /* The initial task and kernel stack */
197 #ifdef CONFIG_PPC32 197 #ifdef CONFIG_PPC32
198 . = ALIGN(8192); 198 . = ALIGN(8192);
199 #else 199 #else
200 . = ALIGN(16384); 200 . = ALIGN(16384);
201 #endif 201 #endif
202 .data.init_task : { 202 .data.init_task : {
203 *(.data.init_task) 203 *(.data.init_task)
204 } 204 }
205 205
206 . = ALIGN(PAGE_SIZE); 206 . = ALIGN(PAGE_SIZE);
207 .data.page_aligned : { 207 .data.page_aligned : {
208 *(.data.page_aligned) 208 *(.data.page_aligned)
209 } 209 }
210 210
211 .data.cacheline_aligned : { 211 .data.cacheline_aligned : {
212 *(.data.cacheline_aligned) 212 *(.data.cacheline_aligned)
213 } 213 }
214 214
215 . = ALIGN(PAGE_SIZE); 215 . = ALIGN(PAGE_SIZE);
216 __data_nosave : { 216 __data_nosave : {
217 __nosave_begin = .; 217 __nosave_begin = .;
218 *(.data.nosave) 218 *(.data.nosave)
219 . = ALIGN(PAGE_SIZE); 219 . = ALIGN(PAGE_SIZE);
220 __nosave_end = .; 220 __nosave_end = .;
221 } 221 }
222 222
223 /* 223 /*
224 * And finally the bss 224 * And finally the bss
225 */ 225 */
226 226
227 .bss : { 227 .bss : {
228 __bss_start = .; 228 __bss_start = .;
229 *(.sbss) *(.scommon) 229 *(.sbss) *(.scommon)
230 *(.dynbss) 230 *(.dynbss)
231 *(.bss) 231 *(.bss)
232 *(COMMON) 232 *(COMMON)
233 __bss_stop = .; 233 __bss_stop = .;
234 } 234 }
235 235
236 . = ALIGN(PAGE_SIZE); 236 . = ALIGN(PAGE_SIZE);
237 _end = . ; 237 _end = . ;
238 PROVIDE32 (end = .); 238 PROVIDE32 (end = .);
239 } 239 }
240 240
arch/ppc/kernel/vmlinux.lds.S
1 #include <asm-generic/vmlinux.lds.h> 1 #include <asm-generic/vmlinux.lds.h>
2 2
3 OUTPUT_ARCH(powerpc:common) 3 OUTPUT_ARCH(powerpc:common)
4 jiffies = jiffies_64 + 4; 4 jiffies = jiffies_64 + 4;
5 SECTIONS 5 SECTIONS
6 { 6 {
7 /* Read-only sections, merged into text segment: */ 7 /* Read-only sections, merged into text segment: */
8 . = + SIZEOF_HEADERS; 8 . = + SIZEOF_HEADERS;
9 .interp : { *(.interp) } 9 .interp : { *(.interp) }
10 .hash : { *(.hash) } 10 .hash : { *(.hash) }
11 .gnu.hash : { *(.gnu.hash) } 11 .gnu.hash : { *(.gnu.hash) }
12 .dynsym : { *(.dynsym) } 12 .dynsym : { *(.dynsym) }
13 .dynstr : { *(.dynstr) } 13 .dynstr : { *(.dynstr) }
14 .rel.text : { *(.rel.text) } 14 .rel.text : { *(.rel.text) }
15 .rela.text : { *(.rela.text) } 15 .rela.text : { *(.rela.text) }
16 .rel.data : { *(.rel.data) } 16 .rel.data : { *(.rel.data) }
17 .rela.data : { *(.rela.data) } 17 .rela.data : { *(.rela.data) }
18 .rel.rodata : { *(.rel.rodata) } 18 .rel.rodata : { *(.rel.rodata) }
19 .rela.rodata : { *(.rela.rodata) } 19 .rela.rodata : { *(.rela.rodata) }
20 .rel.got : { *(.rel.got) } 20 .rel.got : { *(.rel.got) }
21 .rela.got : { *(.rela.got) } 21 .rela.got : { *(.rela.got) }
22 .rel.ctors : { *(.rel.ctors) } 22 .rel.ctors : { *(.rel.ctors) }
23 .rela.ctors : { *(.rela.ctors) } 23 .rela.ctors : { *(.rela.ctors) }
24 .rel.dtors : { *(.rel.dtors) } 24 .rel.dtors : { *(.rel.dtors) }
25 .rela.dtors : { *(.rela.dtors) } 25 .rela.dtors : { *(.rela.dtors) }
26 .rel.bss : { *(.rel.bss) } 26 .rel.bss : { *(.rel.bss) }
27 .rela.bss : { *(.rela.bss) } 27 .rela.bss : { *(.rela.bss) }
28 .rel.plt : { *(.rel.plt) } 28 .rel.plt : { *(.rel.plt) }
29 .rela.plt : { *(.rela.plt) } 29 .rela.plt : { *(.rela.plt) }
30 /* .init : { *(.init) } =0*/ 30 /* .init : { *(.init) } =0*/
31 .plt : { *(.plt) } 31 .plt : { *(.plt) }
32 .text : 32 .text :
33 { 33 {
34 _text = .; 34 _text = .;
35 TEXT_TEXT 35 TEXT_TEXT
36 SCHED_TEXT 36 SCHED_TEXT
37 LOCK_TEXT 37 LOCK_TEXT
38 *(.fixup) 38 *(.fixup)
39 *(.got1) 39 *(.got1)
40 __got2_start = .; 40 __got2_start = .;
41 *(.got2) 41 *(.got2)
42 __got2_end = .; 42 __got2_end = .;
43 } 43 }
44 _etext = .; 44 _etext = .;
45 PROVIDE (etext = .); 45 PROVIDE (etext = .);
46 46
47 RODATA 47 RODATA
48 .fini : { *(.fini) } =0 48 .fini : { *(.fini) } =0
49 .ctors : { *(.ctors) } 49 .ctors : { *(.ctors) }
50 .dtors : { *(.dtors) } 50 .dtors : { *(.dtors) }
51 51
52 .fixup : { *(.fixup) } 52 .fixup : { *(.fixup) }
53 53
54 __ex_table : { 54 __ex_table : {
55 __start___ex_table = .; 55 __start___ex_table = .;
56 *(__ex_table) 56 *(__ex_table)
57 __stop___ex_table = .; 57 __stop___ex_table = .;
58 } 58 }
59 59
60 __bug_table : { 60 __bug_table : {
61 __start___bug_table = .; 61 __start___bug_table = .;
62 *(__bug_table) 62 *(__bug_table)
63 __stop___bug_table = .; 63 __stop___bug_table = .;
64 } 64 }
65 65
66 /* Read-write section, merged into data segment: */ 66 /* Read-write section, merged into data segment: */
67 . = ALIGN(4096); 67 . = ALIGN(4096);
68 .data : 68 .data :
69 { 69 {
70 *(.data) 70 DATA_DATA
71 *(.data1) 71 *(.data1)
72 *(.sdata) 72 *(.sdata)
73 *(.sdata2) 73 *(.sdata2)
74 *(.got.plt) *(.got) 74 *(.got.plt) *(.got)
75 *(.dynamic) 75 *(.dynamic)
76 CONSTRUCTORS 76 CONSTRUCTORS
77 } 77 }
78 78
79 . = ALIGN(4096); 79 . = ALIGN(4096);
80 __nosave_begin = .; 80 __nosave_begin = .;
81 .data_nosave : { *(.data.nosave) } 81 .data_nosave : { *(.data.nosave) }
82 . = ALIGN(4096); 82 . = ALIGN(4096);
83 __nosave_end = .; 83 __nosave_end = .;
84 84
85 . = ALIGN(32); 85 . = ALIGN(32);
86 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 86 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
87 87
88 _edata = .; 88 _edata = .;
89 PROVIDE (edata = .); 89 PROVIDE (edata = .);
90 90
91 . = ALIGN(8192); 91 . = ALIGN(8192);
92 .data.init_task : { *(.data.init_task) } 92 .data.init_task : { *(.data.init_task) }
93 93
94 . = ALIGN(4096); 94 . = ALIGN(4096);
95 __init_begin = .; 95 __init_begin = .;
96 .init.text : { 96 .init.text : {
97 _sinittext = .; 97 _sinittext = .;
98 *(.init.text) 98 *(.init.text)
99 _einittext = .; 99 _einittext = .;
100 } 100 }
101 /* .exit.text is discarded at runtime, not link time, 101 /* .exit.text is discarded at runtime, not link time,
102 to deal with references from __bug_table */ 102 to deal with references from __bug_table */
103 .exit.text : { *(.exit.text) } 103 .exit.text : { *(.exit.text) }
104 .init.data : { 104 .init.data : {
105 *(.init.data); 105 *(.init.data);
106 __vtop_table_begin = .; 106 __vtop_table_begin = .;
107 *(.vtop_fixup); 107 *(.vtop_fixup);
108 __vtop_table_end = .; 108 __vtop_table_end = .;
109 __ptov_table_begin = .; 109 __ptov_table_begin = .;
110 *(.ptov_fixup); 110 *(.ptov_fixup);
111 __ptov_table_end = .; 111 __ptov_table_end = .;
112 } 112 }
113 . = ALIGN(16); 113 . = ALIGN(16);
114 __setup_start = .; 114 __setup_start = .;
115 .init.setup : { *(.init.setup) } 115 .init.setup : { *(.init.setup) }
116 __setup_end = .; 116 __setup_end = .;
117 __initcall_start = .; 117 __initcall_start = .;
118 .initcall.init : { 118 .initcall.init : {
119 INITCALLS 119 INITCALLS
120 } 120 }
121 __initcall_end = .; 121 __initcall_end = .;
122 122
123 __con_initcall_start = .; 123 __con_initcall_start = .;
124 .con_initcall.init : { *(.con_initcall.init) } 124 .con_initcall.init : { *(.con_initcall.init) }
125 __con_initcall_end = .; 125 __con_initcall_end = .;
126 126
127 SECURITY_INIT 127 SECURITY_INIT
128 128
129 __start___ftr_fixup = .; 129 __start___ftr_fixup = .;
130 __ftr_fixup : { *(__ftr_fixup) } 130 __ftr_fixup : { *(__ftr_fixup) }
131 __stop___ftr_fixup = .; 131 __stop___ftr_fixup = .;
132 132
133 . = ALIGN(4096); 133 . = ALIGN(4096);
134 __per_cpu_start = .; 134 __per_cpu_start = .;
135 .data.percpu : { *(.data.percpu) } 135 .data.percpu : { *(.data.percpu) }
136 __per_cpu_end = .; 136 __per_cpu_end = .;
137 137
138 #ifdef CONFIG_BLK_DEV_INITRD 138 #ifdef CONFIG_BLK_DEV_INITRD
139 . = ALIGN(4096); 139 . = ALIGN(4096);
140 __initramfs_start = .; 140 __initramfs_start = .;
141 .init.ramfs : { *(.init.ramfs) } 141 .init.ramfs : { *(.init.ramfs) }
142 __initramfs_end = .; 142 __initramfs_end = .;
143 #endif 143 #endif
144 144
145 . = ALIGN(4096); 145 . = ALIGN(4096);
146 __init_end = .; 146 __init_end = .;
147 147
148 . = ALIGN(4096); 148 . = ALIGN(4096);
149 _sextratext = .; 149 _sextratext = .;
150 _eextratext = .; 150 _eextratext = .;
151 151
152 __bss_start = .; 152 __bss_start = .;
153 .bss : 153 .bss :
154 { 154 {
155 *(.sbss) *(.scommon) 155 *(.sbss) *(.scommon)
156 *(.dynbss) 156 *(.dynbss)
157 *(.bss) 157 *(.bss)
158 *(COMMON) 158 *(COMMON)
159 } 159 }
160 __bss_stop = .; 160 __bss_stop = .;
161 161
162 _end = . ; 162 _end = . ;
163 PROVIDE (end = .); 163 PROVIDE (end = .);
164 164
165 /* Sections to be discarded. */ 165 /* Sections to be discarded. */
166 /DISCARD/ : { 166 /DISCARD/ : {
167 *(.exitcall.exit) 167 *(.exitcall.exit)
168 *(.exit.data) 168 *(.exit.data)
169 } 169 }
170 } 170 }
171 171
arch/s390/kernel/vmlinux.lds.S
1 /* ld script to make s390 Linux kernel 1 /* ld script to make s390 Linux kernel
2 * Written by Martin Schwidefsky (schwidefsky@de.ibm.com) 2 * Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
3 */ 3 */
4 4
5 #include <asm-generic/vmlinux.lds.h> 5 #include <asm-generic/vmlinux.lds.h>
6 6
7 #ifndef CONFIG_64BIT 7 #ifndef CONFIG_64BIT
8 OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390") 8 OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
9 OUTPUT_ARCH(s390) 9 OUTPUT_ARCH(s390)
10 ENTRY(_start) 10 ENTRY(_start)
11 jiffies = jiffies_64 + 4; 11 jiffies = jiffies_64 + 4;
12 #else 12 #else
13 OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390") 13 OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
14 OUTPUT_ARCH(s390:64-bit) 14 OUTPUT_ARCH(s390:64-bit)
15 ENTRY(_start) 15 ENTRY(_start)
16 jiffies = jiffies_64; 16 jiffies = jiffies_64;
17 #endif 17 #endif
18 18
19 SECTIONS 19 SECTIONS
20 { 20 {
21 . = 0x00000000; 21 . = 0x00000000;
22 _text = .; /* Text and read-only data */ 22 _text = .; /* Text and read-only data */
23 .text : { 23 .text : {
24 TEXT_TEXT 24 TEXT_TEXT
25 SCHED_TEXT 25 SCHED_TEXT
26 LOCK_TEXT 26 LOCK_TEXT
27 KPROBES_TEXT 27 KPROBES_TEXT
28 *(.fixup) 28 *(.fixup)
29 *(.gnu.warning) 29 *(.gnu.warning)
30 } = 0x0700 30 } = 0x0700
31 31
32 _etext = .; /* End of text section */ 32 _etext = .; /* End of text section */
33 33
34 RODATA 34 RODATA
35 35
36 #ifdef CONFIG_SHARED_KERNEL 36 #ifdef CONFIG_SHARED_KERNEL
37 . = ALIGN(1048576); /* VM shared segments are 1MB aligned */ 37 . = ALIGN(1048576); /* VM shared segments are 1MB aligned */
38 #endif 38 #endif
39 39
40 . = ALIGN(4096); 40 . = ALIGN(4096);
41 _eshared = .; /* End of shareable data */ 41 _eshared = .; /* End of shareable data */
42 42
43 . = ALIGN(16); /* Exception table */ 43 . = ALIGN(16); /* Exception table */
44 __start___ex_table = .; 44 __start___ex_table = .;
45 __ex_table : { *(__ex_table) } 45 __ex_table : { *(__ex_table) }
46 __stop___ex_table = .; 46 __stop___ex_table = .;
47 47
48 BUG_TABLE 48 BUG_TABLE
49 49
50 .data : { /* Data */ 50 .data : { /* Data */
51 *(.data) 51 DATA_DATA
52 CONSTRUCTORS 52 CONSTRUCTORS
53 } 53 }
54 54
55 . = ALIGN(4096); 55 . = ALIGN(4096);
56 __nosave_begin = .; 56 __nosave_begin = .;
57 .data_nosave : { *(.data.nosave) } 57 .data_nosave : { *(.data.nosave) }
58 . = ALIGN(4096); 58 . = ALIGN(4096);
59 __nosave_end = .; 59 __nosave_end = .;
60 60
61 . = ALIGN(4096); 61 . = ALIGN(4096);
62 .data.page_aligned : { *(.data.idt) } 62 .data.page_aligned : { *(.data.idt) }
63 63
64 . = ALIGN(256); 64 . = ALIGN(256);
65 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 65 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
66 66
67 . = ALIGN(256); 67 . = ALIGN(256);
68 .data.read_mostly : { *(.data.read_mostly) } 68 .data.read_mostly : { *(.data.read_mostly) }
69 _edata = .; /* End of data section */ 69 _edata = .; /* End of data section */
70 70
71 . = ALIGN(8192); /* init_task */ 71 . = ALIGN(8192); /* init_task */
72 .data.init_task : { *(.data.init_task) } 72 .data.init_task : { *(.data.init_task) }
73 73
74 /* will be freed after init */ 74 /* will be freed after init */
75 . = ALIGN(4096); /* Init code and data */ 75 . = ALIGN(4096); /* Init code and data */
76 __init_begin = .; 76 __init_begin = .;
77 .init.text : { 77 .init.text : {
78 _sinittext = .; 78 _sinittext = .;
79 *(.init.text) 79 *(.init.text)
80 _einittext = .; 80 _einittext = .;
81 } 81 }
82 /* 82 /*
83 * .exit.text is discarded at runtime, not link time, 83 * .exit.text is discarded at runtime, not link time,
84 * to deal with references from __bug_table 84 * to deal with references from __bug_table
85 */ 85 */
86 .exit.text : { *(.exit.text) } 86 .exit.text : { *(.exit.text) }
87 87
88 .init.data : { *(.init.data) } 88 .init.data : { *(.init.data) }
89 . = ALIGN(256); 89 . = ALIGN(256);
90 __setup_start = .; 90 __setup_start = .;
91 .init.setup : { *(.init.setup) } 91 .init.setup : { *(.init.setup) }
92 __setup_end = .; 92 __setup_end = .;
93 __initcall_start = .; 93 __initcall_start = .;
94 .initcall.init : { 94 .initcall.init : {
95 INITCALLS 95 INITCALLS
96 } 96 }
97 __initcall_end = .; 97 __initcall_end = .;
98 __con_initcall_start = .; 98 __con_initcall_start = .;
99 .con_initcall.init : { *(.con_initcall.init) } 99 .con_initcall.init : { *(.con_initcall.init) }
100 __con_initcall_end = .; 100 __con_initcall_end = .;
101 SECURITY_INIT 101 SECURITY_INIT
102 102
103 #ifdef CONFIG_BLK_DEV_INITRD 103 #ifdef CONFIG_BLK_DEV_INITRD
104 . = ALIGN(256); 104 . = ALIGN(256);
105 __initramfs_start = .; 105 __initramfs_start = .;
106 .init.ramfs : { *(.init.initramfs) } 106 .init.ramfs : { *(.init.initramfs) }
107 . = ALIGN(2); 107 . = ALIGN(2);
108 __initramfs_end = .; 108 __initramfs_end = .;
109 #endif 109 #endif
110 . = ALIGN(4096); 110 . = ALIGN(4096);
111 __per_cpu_start = .; 111 __per_cpu_start = .;
112 .data.percpu : { *(.data.percpu) } 112 .data.percpu : { *(.data.percpu) }
113 __per_cpu_end = .; 113 __per_cpu_end = .;
114 . = ALIGN(4096); 114 . = ALIGN(4096);
115 __init_end = .; 115 __init_end = .;
116 /* freed after init ends here */ 116 /* freed after init ends here */
117 117
118 __bss_start = .; /* BSS */ 118 __bss_start = .; /* BSS */
119 .bss : { *(.bss) } 119 .bss : { *(.bss) }
120 . = ALIGN(2); 120 . = ALIGN(2);
121 __bss_stop = .; 121 __bss_stop = .;
122 122
123 _end = . ; 123 _end = . ;
124 124
125 /* Sections to be discarded */ 125 /* Sections to be discarded */
126 /DISCARD/ : { 126 /DISCARD/ : {
127 *(.exit.data) *(.exitcall.exit) 127 *(.exit.data) *(.exitcall.exit)
128 } 128 }
129 129
130 /* Stabs debugging sections. */ 130 /* Stabs debugging sections. */
131 .stab 0 : { *(.stab) } 131 .stab 0 : { *(.stab) }
132 .stabstr 0 : { *(.stabstr) } 132 .stabstr 0 : { *(.stabstr) }
133 .stab.excl 0 : { *(.stab.excl) } 133 .stab.excl 0 : { *(.stab.excl) }
134 .stab.exclstr 0 : { *(.stab.exclstr) } 134 .stab.exclstr 0 : { *(.stab.exclstr) }
135 .stab.index 0 : { *(.stab.index) } 135 .stab.index 0 : { *(.stab.index) }
136 .stab.indexstr 0 : { *(.stab.indexstr) } 136 .stab.indexstr 0 : { *(.stab.indexstr) }
137 .comment 0 : { *(.comment) } 137 .comment 0 : { *(.comment) }
138 } 138 }
139 139
arch/sh/kernel/vmlinux.lds.S
1 /* $Id: vmlinux.lds.S,v 1.8 2003/05/16 17:18:14 lethal Exp $ 1 /* $Id: vmlinux.lds.S,v 1.8 2003/05/16 17:18:14 lethal Exp $
2 * ld script to make SuperH Linux kernel 2 * ld script to make SuperH Linux kernel
3 * Written by Niibe Yutaka 3 * Written by Niibe Yutaka
4 */ 4 */
5 #include <asm/thread_info.h> 5 #include <asm/thread_info.h>
6 #include <asm/cache.h> 6 #include <asm/cache.h>
7 #include <asm-generic/vmlinux.lds.h> 7 #include <asm-generic/vmlinux.lds.h>
8 8
9 #ifdef CONFIG_CPU_LITTLE_ENDIAN 9 #ifdef CONFIG_CPU_LITTLE_ENDIAN
10 OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux") 10 OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
11 #else 11 #else
12 OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-shbig-linux") 12 OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-shbig-linux")
13 #endif 13 #endif
14 OUTPUT_ARCH(sh) 14 OUTPUT_ARCH(sh)
15 ENTRY(_start) 15 ENTRY(_start)
16 SECTIONS 16 SECTIONS
17 { 17 {
18 . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET; 18 . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
19 _text = .; /* Text and read-only data */ 19 _text = .; /* Text and read-only data */
20 text = .; /* Text and read-only data */ 20 text = .; /* Text and read-only data */
21 .empty_zero_page : { 21 .empty_zero_page : {
22 *(.empty_zero_page) 22 *(.empty_zero_page)
23 } = 0 23 } = 0
24 .text : { 24 .text : {
25 TEXT_TEXT 25 TEXT_TEXT
26 SCHED_TEXT 26 SCHED_TEXT
27 LOCK_TEXT 27 LOCK_TEXT
28 *(.fixup) 28 *(.fixup)
29 *(.gnu.warning) 29 *(.gnu.warning)
30 } = 0x0009 30 } = 0x0009
31 31
32 . = ALIGN(16); /* Exception table */ 32 . = ALIGN(16); /* Exception table */
33 __start___ex_table = .; 33 __start___ex_table = .;
34 __ex_table : { *(__ex_table) } 34 __ex_table : { *(__ex_table) }
35 __stop___ex_table = .; 35 __stop___ex_table = .;
36 36
37 _etext = .; /* End of text section */ 37 _etext = .; /* End of text section */
38 38
39 RODATA 39 RODATA
40 40
41 BUG_TABLE 41 BUG_TABLE
42 42
43 .data : { /* Data */ 43 .data : { /* Data */
44 *(.data) 44 DATA_DATA
45 45
46 /* Align the initial ramdisk image (INITRD) on page boundaries. */ 46 /* Align the initial ramdisk image (INITRD) on page boundaries. */
47 . = ALIGN(PAGE_SIZE); 47 . = ALIGN(PAGE_SIZE);
48 __rd_start = .; 48 __rd_start = .;
49 *(.initrd) 49 *(.initrd)
50 . = ALIGN(PAGE_SIZE); 50 . = ALIGN(PAGE_SIZE);
51 __rd_end = .; 51 __rd_end = .;
52 52
53 CONSTRUCTORS 53 CONSTRUCTORS
54 } 54 }
55 55
56 . = ALIGN(PAGE_SIZE); 56 . = ALIGN(PAGE_SIZE);
57 .data.page_aligned : { *(.data.page_aligned) } 57 .data.page_aligned : { *(.data.page_aligned) }
58 __nosave_begin = .; 58 __nosave_begin = .;
59 .data_nosave : { *(.data.nosave) } 59 .data_nosave : { *(.data.nosave) }
60 . = ALIGN(PAGE_SIZE); 60 . = ALIGN(PAGE_SIZE);
61 __nosave_end = .; 61 __nosave_end = .;
62 62
63 . = ALIGN(PAGE_SIZE); 63 . = ALIGN(PAGE_SIZE);
64 __per_cpu_start = .; 64 __per_cpu_start = .;
65 .data.percpu : { *(.data.percpu) } 65 .data.percpu : { *(.data.percpu) }
66 __per_cpu_end = .; 66 __per_cpu_end = .;
67 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 67 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
68 68
69 _edata = .; /* End of data section */ 69 _edata = .; /* End of data section */
70 70
71 . = ALIGN(THREAD_SIZE); /* init_task */ 71 . = ALIGN(THREAD_SIZE); /* init_task */
72 .data.init_task : { *(.data.init_task) } 72 .data.init_task : { *(.data.init_task) }
73 73
74 . = ALIGN(PAGE_SIZE); /* Init code and data */ 74 . = ALIGN(PAGE_SIZE); /* Init code and data */
75 __init_begin = .; 75 __init_begin = .;
76 _sinittext = .; 76 _sinittext = .;
77 .init.text : { *(.init.text) } 77 .init.text : { *(.init.text) }
78 _einittext = .; 78 _einittext = .;
79 .init.data : { *(.init.data) } 79 .init.data : { *(.init.data) }
80 . = ALIGN(16); 80 . = ALIGN(16);
81 __setup_start = .; 81 __setup_start = .;
82 .init.setup : { *(.init.setup) } 82 .init.setup : { *(.init.setup) }
83 __setup_end = .; 83 __setup_end = .;
84 __initcall_start = .; 84 __initcall_start = .;
85 .initcall.init : { 85 .initcall.init : {
86 INITCALLS 86 INITCALLS
87 } 87 }
88 __initcall_end = .; 88 __initcall_end = .;
89 __con_initcall_start = .; 89 __con_initcall_start = .;
90 .con_initcall.init : { *(.con_initcall.init) } 90 .con_initcall.init : { *(.con_initcall.init) }
91 __con_initcall_end = .; 91 __con_initcall_end = .;
92 SECURITY_INIT 92 SECURITY_INIT
93 93
94 #ifdef CONFIG_BLK_DEV_INITRD 94 #ifdef CONFIG_BLK_DEV_INITRD
95 __initramfs_start = .; 95 __initramfs_start = .;
96 .init.ramfs : { *(.init.ramfs) } 96 .init.ramfs : { *(.init.ramfs) }
97 __initramfs_end = .; 97 __initramfs_end = .;
98 #endif 98 #endif
99 99
100 __machvec_start = .; 100 __machvec_start = .;
101 .init.machvec : { *(.init.machvec) } 101 .init.machvec : { *(.init.machvec) }
102 __machvec_end = .; 102 __machvec_end = .;
103 . = ALIGN(PAGE_SIZE); 103 . = ALIGN(PAGE_SIZE);
104 __init_end = .; 104 __init_end = .;
105 105
106 . = ALIGN(4); 106 . = ALIGN(4);
107 __bss_start = .; /* BSS */ 107 __bss_start = .; /* BSS */
108 .bss : { *(.bss) } 108 .bss : { *(.bss) }
109 109
110 . = ALIGN(4); 110 . = ALIGN(4);
111 _end = . ; 111 _end = . ;
112 112
113 /* When something in the kernel is NOT compiled as a module, the 113 /* When something in the kernel is NOT compiled as a module, the
114 * module cleanup code and data are put into these segments. Both 114 * module cleanup code and data are put into these segments. Both
115 * can then be thrown away, as cleanup code is never called unless 115 * can then be thrown away, as cleanup code is never called unless
116 * it's a module. 116 * it's a module.
117 */ 117 */
118 /DISCARD/ : { 118 /DISCARD/ : {
119 *(.exitcall.exit) 119 *(.exitcall.exit)
120 } 120 }
121 121
122 STABS_DEBUG 122 STABS_DEBUG
123 123
124 DWARF_DEBUG 124 DWARF_DEBUG
125 } 125 }
126 126
arch/sh64/kernel/vmlinux.lds.S
1 /* 1 /*
2 * This file is subject to the terms and conditions of the GNU General Public 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 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * arch/sh5/vmlinux.lds.S 6 * arch/sh5/vmlinux.lds.S
7 * 7 *
8 * ld script to make ST50 Linux kernel 8 * ld script to make ST50 Linux kernel
9 * 9 *
10 * Copyright (C) 2000, 2001 Paolo Alberelli 10 * Copyright (C) 2000, 2001 Paolo Alberelli
11 * 11 *
12 * benedict.gaster@superh.com: 2nd May 2002 12 * benedict.gaster@superh.com: 2nd May 2002
13 * Add definition of empty_zero_page to be the first page of kernel image. 13 * Add definition of empty_zero_page to be the first page of kernel image.
14 * 14 *
15 * benedict.gaster@superh.com: 3rd May 2002 15 * benedict.gaster@superh.com: 3rd May 2002
16 * Added support for ramdisk, removing statically linked romfs at the same time. 16 * Added support for ramdisk, removing statically linked romfs at the same time.
17 * 17 *
18 * lethal@linux-sh.org: 9th May 2003 18 * lethal@linux-sh.org: 9th May 2003
19 * Kill off GLOBAL_NAME() usage and other CDC-isms. 19 * Kill off GLOBAL_NAME() usage and other CDC-isms.
20 * 20 *
21 * lethal@linux-sh.org: 19th May 2003 21 * lethal@linux-sh.org: 19th May 2003
22 * Remove support for ancient toolchains. 22 * Remove support for ancient toolchains.
23 */ 23 */
24 24
25 #include <asm/page.h> 25 #include <asm/page.h>
26 #include <asm/cache.h> 26 #include <asm/cache.h>
27 #include <asm/processor.h> 27 #include <asm/processor.h>
28 #include <asm/thread_info.h> 28 #include <asm/thread_info.h>
29 29
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 33 #ifdef NOTDEF
34 #ifdef CONFIG_LITTLE_ENDIAN 34 #ifdef CONFIG_LITTLE_ENDIAN
35 OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux") 35 OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux")
36 #else 36 #else
37 OUTPUT_FORMAT("elf32-sh64", "elf32-sh64", "elf32-sh64") 37 OUTPUT_FORMAT("elf32-sh64", "elf32-sh64", "elf32-sh64")
38 #endif 38 #endif
39 #endif 39 #endif
40 40
41 OUTPUT_ARCH(sh:sh5) 41 OUTPUT_ARCH(sh:sh5)
42 42
43 #define C_PHYS(x) AT (ADDR(x) - LOAD_OFFSET) 43 #define C_PHYS(x) AT (ADDR(x) - LOAD_OFFSET)
44 44
45 ENTRY(__start) 45 ENTRY(__start)
46 SECTIONS 46 SECTIONS
47 { 47 {
48 . = CONFIG_CACHED_MEMORY_OFFSET + CONFIG_MEMORY_START + PAGE_SIZE; 48 . = CONFIG_CACHED_MEMORY_OFFSET + CONFIG_MEMORY_START + PAGE_SIZE;
49 _text = .; /* Text and read-only data */ 49 _text = .; /* Text and read-only data */
50 text = .; /* Text and read-only data */ 50 text = .; /* Text and read-only data */
51 51
52 .empty_zero_page : C_PHYS(.empty_zero_page) { 52 .empty_zero_page : C_PHYS(.empty_zero_page) {
53 *(.empty_zero_page) 53 *(.empty_zero_page)
54 } = 0 54 } = 0
55 55
56 .text : C_PHYS(.text) { 56 .text : C_PHYS(.text) {
57 TEXT_TEXT 57 TEXT_TEXT
58 *(.text64) 58 *(.text64)
59 *(.text..SHmedia32) 59 *(.text..SHmedia32)
60 SCHED_TEXT 60 SCHED_TEXT
61 LOCK_TEXT 61 LOCK_TEXT
62 *(.fixup) 62 *(.fixup)
63 *(.gnu.warning) 63 *(.gnu.warning)
64 #ifdef CONFIG_LITTLE_ENDIAN 64 #ifdef CONFIG_LITTLE_ENDIAN
65 } = 0x6ff0fff0 65 } = 0x6ff0fff0
66 #else 66 #else
67 } = 0xf0fff06f 67 } = 0xf0fff06f
68 #endif 68 #endif
69 69
70 /* We likely want __ex_table to be Cache Line aligned */ 70 /* We likely want __ex_table to be Cache Line aligned */
71 . = ALIGN(L1_CACHE_BYTES); /* Exception table */ 71 . = ALIGN(L1_CACHE_BYTES); /* Exception table */
72 __start___ex_table = .; 72 __start___ex_table = .;
73 __ex_table : C_PHYS(__ex_table) { *(__ex_table) } 73 __ex_table : C_PHYS(__ex_table) { *(__ex_table) }
74 __stop___ex_table = .; 74 __stop___ex_table = .;
75 75
76 RODATA 76 RODATA
77 77
78 _etext = .; /* End of text section */ 78 _etext = .; /* End of text section */
79 79
80 .data : C_PHYS(.data) { /* Data */ 80 .data : C_PHYS(.data) { /* Data */
81 *(.data) 81 DATA_DATA
82 CONSTRUCTORS 82 CONSTRUCTORS
83 } 83 }
84 84
85 . = ALIGN(PAGE_SIZE); 85 . = ALIGN(PAGE_SIZE);
86 .data.page_aligned : C_PHYS(.data.page_aligned) { *(.data.page_aligned) } 86 .data.page_aligned : C_PHYS(.data.page_aligned) { *(.data.page_aligned) }
87 87
88 . = ALIGN(PAGE_SIZE); 88 . = ALIGN(PAGE_SIZE);
89 __per_cpu_start = .; 89 __per_cpu_start = .;
90 .data.percpu : C_PHYS(.data.percpu) { *(.data.percpu) } 90 .data.percpu : C_PHYS(.data.percpu) { *(.data.percpu) }
91 __per_cpu_end = . ; 91 __per_cpu_end = . ;
92 .data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) } 92 .data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) }
93 93
94 _edata = .; /* End of data section */ 94 _edata = .; /* End of data section */
95 95
96 . = ALIGN(THREAD_SIZE); /* init_task: structure size aligned */ 96 . = ALIGN(THREAD_SIZE); /* init_task: structure size aligned */
97 .data.init_task : C_PHYS(.data.init_task) { *(.data.init_task) } 97 .data.init_task : C_PHYS(.data.init_task) { *(.data.init_task) }
98 98
99 . = ALIGN(PAGE_SIZE); /* Init code and data */ 99 . = ALIGN(PAGE_SIZE); /* Init code and data */
100 __init_begin = .; 100 __init_begin = .;
101 _sinittext = .; 101 _sinittext = .;
102 .init.text : C_PHYS(.init.text) { *(.init.text) } 102 .init.text : C_PHYS(.init.text) { *(.init.text) }
103 _einittext = .; 103 _einittext = .;
104 .init.data : C_PHYS(.init.data) { *(.init.data) } 104 .init.data : C_PHYS(.init.data) { *(.init.data) }
105 . = ALIGN(L1_CACHE_BYTES); /* Better if Cache Line aligned */ 105 . = ALIGN(L1_CACHE_BYTES); /* Better if Cache Line aligned */
106 __setup_start = .; 106 __setup_start = .;
107 .init.setup : C_PHYS(.init.setup) { *(.init.setup) } 107 .init.setup : C_PHYS(.init.setup) { *(.init.setup) }
108 __setup_end = .; 108 __setup_end = .;
109 __initcall_start = .; 109 __initcall_start = .;
110 .initcall.init : C_PHYS(.initcall.init) { 110 .initcall.init : C_PHYS(.initcall.init) {
111 INITCALLS 111 INITCALLS
112 } 112 }
113 __initcall_end = .; 113 __initcall_end = .;
114 __con_initcall_start = .; 114 __con_initcall_start = .;
115 .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) } 115 .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) }
116 __con_initcall_end = .; 116 __con_initcall_end = .;
117 SECURITY_INIT 117 SECURITY_INIT
118 118
119 #ifdef CONFIG_BLK_DEV_INITRD 119 #ifdef CONFIG_BLK_DEV_INITRD
120 __initramfs_start = .; 120 __initramfs_start = .;
121 .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) } 121 .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) }
122 __initramfs_end = .; 122 __initramfs_end = .;
123 #endif 123 #endif
124 124
125 . = ALIGN(PAGE_SIZE); 125 . = ALIGN(PAGE_SIZE);
126 __init_end = .; 126 __init_end = .;
127 127
128 /* Align to the biggest single data representation, head and tail */ 128 /* Align to the biggest single data representation, head and tail */
129 . = ALIGN(8); 129 . = ALIGN(8);
130 __bss_start = .; /* BSS */ 130 __bss_start = .; /* BSS */
131 .bss : C_PHYS(.bss) { 131 .bss : C_PHYS(.bss) {
132 *(.bss) 132 *(.bss)
133 } 133 }
134 . = ALIGN(8); 134 . = ALIGN(8);
135 _end = . ; 135 _end = . ;
136 136
137 /* Sections to be discarded */ 137 /* Sections to be discarded */
138 /DISCARD/ : { 138 /DISCARD/ : {
139 *(.exit.text) 139 *(.exit.text)
140 *(.exit.data) 140 *(.exit.data)
141 *(.exitcall.exit) 141 *(.exitcall.exit)
142 } 142 }
143 143
144 /* Stabs debugging sections. */ 144 /* Stabs debugging sections. */
145 .stab 0 : C_PHYS(.stab) { *(.stab) } 145 .stab 0 : C_PHYS(.stab) { *(.stab) }
146 .stabstr 0 : C_PHYS(.stabstr) { *(.stabstr) } 146 .stabstr 0 : C_PHYS(.stabstr) { *(.stabstr) }
147 .stab.excl 0 : C_PHYS(.stab.excl) { *(.stab.excl) } 147 .stab.excl 0 : C_PHYS(.stab.excl) { *(.stab.excl) }
148 .stab.exclstr 0 : C_PHYS(.stab.exclstr) { *(.stab.exclstr) } 148 .stab.exclstr 0 : C_PHYS(.stab.exclstr) { *(.stab.exclstr) }
149 .stab.index 0 : C_PHYS(.stab.index) { *(.stab.index) } 149 .stab.index 0 : C_PHYS(.stab.index) { *(.stab.index) }
150 .stab.indexstr 0 : C_PHYS(.stab.indexstr) { *(.stab.indexstr) } 150 .stab.indexstr 0 : C_PHYS(.stab.indexstr) { *(.stab.indexstr) }
151 .comment 0 : C_PHYS(.comment) { *(.comment) } 151 .comment 0 : C_PHYS(.comment) { *(.comment) }
152 /* DWARF debug sections. 152 /* DWARF debug sections.
153 Symbols in the DWARF debugging section are relative to the beginning 153 Symbols in the DWARF debugging section are relative to the beginning
154 of the section so we begin .debug at 0. */ 154 of the section so we begin .debug at 0. */
155 /* DWARF 1 */ 155 /* DWARF 1 */
156 .debug 0 : C_PHYS(.debug) { *(.debug) } 156 .debug 0 : C_PHYS(.debug) { *(.debug) }
157 .line 0 : C_PHYS(.line) { *(.line) } 157 .line 0 : C_PHYS(.line) { *(.line) }
158 /* GNU DWARF 1 extensions */ 158 /* GNU DWARF 1 extensions */
159 .debug_srcinfo 0 : C_PHYS(.debug_srcinfo) { *(.debug_srcinfo) } 159 .debug_srcinfo 0 : C_PHYS(.debug_srcinfo) { *(.debug_srcinfo) }
160 .debug_sfnames 0 : C_PHYS(.debug_sfnames) { *(.debug_sfnames) } 160 .debug_sfnames 0 : C_PHYS(.debug_sfnames) { *(.debug_sfnames) }
161 /* DWARF 1.1 and DWARF 2 */ 161 /* DWARF 1.1 and DWARF 2 */
162 .debug_aranges 0 : C_PHYS(.debug_aranges) { *(.debug_aranges) } 162 .debug_aranges 0 : C_PHYS(.debug_aranges) { *(.debug_aranges) }
163 .debug_pubnames 0 : C_PHYS(.debug_pubnames) { *(.debug_pubnames) } 163 .debug_pubnames 0 : C_PHYS(.debug_pubnames) { *(.debug_pubnames) }
164 /* DWARF 2 */ 164 /* DWARF 2 */
165 .debug_info 0 : C_PHYS(.debug_info) { *(.debug_info) } 165 .debug_info 0 : C_PHYS(.debug_info) { *(.debug_info) }
166 .debug_abbrev 0 : C_PHYS(.debug_abbrev) { *(.debug_abbrev) } 166 .debug_abbrev 0 : C_PHYS(.debug_abbrev) { *(.debug_abbrev) }
167 .debug_line 0 : C_PHYS(.debug_line) { *(.debug_line) } 167 .debug_line 0 : C_PHYS(.debug_line) { *(.debug_line) }
168 .debug_frame 0 : C_PHYS(.debug_frame) { *(.debug_frame) } 168 .debug_frame 0 : C_PHYS(.debug_frame) { *(.debug_frame) }
169 .debug_str 0 : C_PHYS(.debug_str) { *(.debug_str) } 169 .debug_str 0 : C_PHYS(.debug_str) { *(.debug_str) }
170 .debug_loc 0 : C_PHYS(.debug_loc) { *(.debug_loc) } 170 .debug_loc 0 : C_PHYS(.debug_loc) { *(.debug_loc) }
171 .debug_macinfo 0 : C_PHYS(.debug_macinfo) { *(.debug_macinfo) } 171 .debug_macinfo 0 : C_PHYS(.debug_macinfo) { *(.debug_macinfo) }
172 /* SGI/MIPS DWARF 2 extensions */ 172 /* SGI/MIPS DWARF 2 extensions */
173 .debug_weaknames 0 : C_PHYS(.debug_weaknames) { *(.debug_weaknames) } 173 .debug_weaknames 0 : C_PHYS(.debug_weaknames) { *(.debug_weaknames) }
174 .debug_funcnames 0 : C_PHYS(.debug_funcnames) { *(.debug_funcnames) } 174 .debug_funcnames 0 : C_PHYS(.debug_funcnames) { *(.debug_funcnames) }
175 .debug_typenames 0 : C_PHYS(.debug_typenames) { *(.debug_typenames) } 175 .debug_typenames 0 : C_PHYS(.debug_typenames) { *(.debug_typenames) }
176 .debug_varnames 0 : C_PHYS(.debug_varnames) { *(.debug_varnames) } 176 .debug_varnames 0 : C_PHYS(.debug_varnames) { *(.debug_varnames) }
177 /* These must appear regardless of . */ 177 /* These must appear regardless of . */
178 } 178 }
179 179
arch/sparc/kernel/vmlinux.lds.S
1 /* ld script to make SparcLinux kernel */ 1 /* ld script to make SparcLinux kernel */
2 2
3 #include <asm-generic/vmlinux.lds.h> 3 #include <asm-generic/vmlinux.lds.h>
4 4
5 OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc") 5 OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc")
6 OUTPUT_ARCH(sparc) 6 OUTPUT_ARCH(sparc)
7 ENTRY(_start) 7 ENTRY(_start)
8 jiffies = jiffies_64 + 4; 8 jiffies = jiffies_64 + 4;
9 SECTIONS 9 SECTIONS
10 { 10 {
11 . = 0x10000 + SIZEOF_HEADERS; 11 . = 0x10000 + SIZEOF_HEADERS;
12 .text 0xf0004000 : 12 .text 0xf0004000 :
13 { 13 {
14 _text = .; 14 _text = .;
15 TEXT_TEXT 15 TEXT_TEXT
16 SCHED_TEXT 16 SCHED_TEXT
17 LOCK_TEXT 17 LOCK_TEXT
18 *(.gnu.warning) 18 *(.gnu.warning)
19 } =0 19 } =0
20 _etext = .; 20 _etext = .;
21 PROVIDE (etext = .); 21 PROVIDE (etext = .);
22 RODATA 22 RODATA
23 .data : 23 .data :
24 { 24 {
25 *(.data) 25 DATA_DATA
26 CONSTRUCTORS 26 CONSTRUCTORS
27 } 27 }
28 .data1 : { *(.data1) } 28 .data1 : { *(.data1) }
29 _edata = .; 29 _edata = .;
30 PROVIDE (edata = .); 30 PROVIDE (edata = .);
31 __start___fixup = .; 31 __start___fixup = .;
32 .fixup : { *(.fixup) } 32 .fixup : { *(.fixup) }
33 __stop___fixup = .; 33 __stop___fixup = .;
34 __start___ex_table = .; 34 __start___ex_table = .;
35 __ex_table : { *(__ex_table) } 35 __ex_table : { *(__ex_table) }
36 __stop___ex_table = .; 36 __stop___ex_table = .;
37 37
38 . = ALIGN(4096); 38 . = ALIGN(4096);
39 __init_begin = .; 39 __init_begin = .;
40 _sinittext = .; 40 _sinittext = .;
41 .init.text : { 41 .init.text : {
42 *(.init.text) 42 *(.init.text)
43 } 43 }
44 _einittext = .; 44 _einittext = .;
45 __init_text_end = .; 45 __init_text_end = .;
46 .init.data : { *(.init.data) } 46 .init.data : { *(.init.data) }
47 . = ALIGN(16); 47 . = ALIGN(16);
48 __setup_start = .; 48 __setup_start = .;
49 .init.setup : { *(.init.setup) } 49 .init.setup : { *(.init.setup) }
50 __setup_end = .; 50 __setup_end = .;
51 __initcall_start = .; 51 __initcall_start = .;
52 .initcall.init : { 52 .initcall.init : {
53 INITCALLS 53 INITCALLS
54 } 54 }
55 __initcall_end = .; 55 __initcall_end = .;
56 __con_initcall_start = .; 56 __con_initcall_start = .;
57 .con_initcall.init : { *(.con_initcall.init) } 57 .con_initcall.init : { *(.con_initcall.init) }
58 __con_initcall_end = .; 58 __con_initcall_end = .;
59 SECURITY_INIT 59 SECURITY_INIT
60 60
61 #ifdef CONFIG_BLK_DEV_INITRD 61 #ifdef CONFIG_BLK_DEV_INITRD
62 . = ALIGN(4096); 62 . = ALIGN(4096);
63 __initramfs_start = .; 63 __initramfs_start = .;
64 .init.ramfs : { *(.init.ramfs) } 64 .init.ramfs : { *(.init.ramfs) }
65 __initramfs_end = .; 65 __initramfs_end = .;
66 #endif 66 #endif
67 67
68 . = ALIGN(4096); 68 . = ALIGN(4096);
69 __per_cpu_start = .; 69 __per_cpu_start = .;
70 .data.percpu : { *(.data.percpu) } 70 .data.percpu : { *(.data.percpu) }
71 __per_cpu_end = .; 71 __per_cpu_end = .;
72 . = ALIGN(4096); 72 . = ALIGN(4096);
73 __init_end = .; 73 __init_end = .;
74 . = ALIGN(32); 74 . = ALIGN(32);
75 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 75 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
76 76
77 __bss_start = .; 77 __bss_start = .;
78 .sbss : { *(.sbss) *(.scommon) } 78 .sbss : { *(.sbss) *(.scommon) }
79 .bss : 79 .bss :
80 { 80 {
81 *(.dynbss) 81 *(.dynbss)
82 *(.bss) 82 *(.bss)
83 *(COMMON) 83 *(COMMON)
84 } 84 }
85 _end = . ; 85 _end = . ;
86 PROVIDE (end = .); 86 PROVIDE (end = .);
87 /DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) } 87 /DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) }
88 88
89 STABS_DEBUG 89 STABS_DEBUG
90 90
91 DWARF_DEBUG 91 DWARF_DEBUG
92 } 92 }
93 93
arch/sparc64/kernel/vmlinux.lds.S
1 /* ld script to make UltraLinux kernel */ 1 /* ld script to make UltraLinux kernel */
2 2
3 #include <asm-generic/vmlinux.lds.h> 3 #include <asm-generic/vmlinux.lds.h>
4 4
5 OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc") 5 OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc")
6 OUTPUT_ARCH(sparc:v9a) 6 OUTPUT_ARCH(sparc:v9a)
7 ENTRY(_start) 7 ENTRY(_start)
8 8
9 jiffies = jiffies_64; 9 jiffies = jiffies_64;
10 SECTIONS 10 SECTIONS
11 { 11 {
12 swapper_low_pmd_dir = 0x0000000000402000; 12 swapper_low_pmd_dir = 0x0000000000402000;
13 . = 0x4000; 13 . = 0x4000;
14 .text 0x0000000000404000 : 14 .text 0x0000000000404000 :
15 { 15 {
16 _text = .; 16 _text = .;
17 TEXT_TEXT 17 TEXT_TEXT
18 SCHED_TEXT 18 SCHED_TEXT
19 LOCK_TEXT 19 LOCK_TEXT
20 KPROBES_TEXT 20 KPROBES_TEXT
21 *(.gnu.warning) 21 *(.gnu.warning)
22 } =0 22 } =0
23 _etext = .; 23 _etext = .;
24 PROVIDE (etext = .); 24 PROVIDE (etext = .);
25 25
26 RODATA 26 RODATA
27 27
28 .data : 28 .data :
29 { 29 {
30 *(.data) 30 DATA_DATA
31 CONSTRUCTORS 31 CONSTRUCTORS
32 } 32 }
33 .data1 : { *(.data1) } 33 .data1 : { *(.data1) }
34 . = ALIGN(64); 34 . = ALIGN(64);
35 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 35 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
36 . = ALIGN(64); 36 . = ALIGN(64);
37 .data.read_mostly : { *(.data.read_mostly) } 37 .data.read_mostly : { *(.data.read_mostly) }
38 _edata = .; 38 _edata = .;
39 PROVIDE (edata = .); 39 PROVIDE (edata = .);
40 .fixup : { *(.fixup) } 40 .fixup : { *(.fixup) }
41 41
42 . = ALIGN(16); 42 . = ALIGN(16);
43 __start___ex_table = .; 43 __start___ex_table = .;
44 __ex_table : { *(__ex_table) } 44 __ex_table : { *(__ex_table) }
45 __stop___ex_table = .; 45 __stop___ex_table = .;
46 46
47 . = ALIGN(8192); 47 . = ALIGN(8192);
48 __init_begin = .; 48 __init_begin = .;
49 .init.text : { 49 .init.text : {
50 _sinittext = .; 50 _sinittext = .;
51 *(.init.text) 51 *(.init.text)
52 _einittext = .; 52 _einittext = .;
53 } 53 }
54 .init.data : { *(.init.data) } 54 .init.data : { *(.init.data) }
55 . = ALIGN(16); 55 . = ALIGN(16);
56 __setup_start = .; 56 __setup_start = .;
57 .init.setup : { *(.init.setup) } 57 .init.setup : { *(.init.setup) }
58 __setup_end = .; 58 __setup_end = .;
59 __initcall_start = .; 59 __initcall_start = .;
60 .initcall.init : { 60 .initcall.init : {
61 INITCALLS 61 INITCALLS
62 } 62 }
63 __initcall_end = .; 63 __initcall_end = .;
64 __con_initcall_start = .; 64 __con_initcall_start = .;
65 .con_initcall.init : { *(.con_initcall.init) } 65 .con_initcall.init : { *(.con_initcall.init) }
66 __con_initcall_end = .; 66 __con_initcall_end = .;
67 SECURITY_INIT 67 SECURITY_INIT
68 . = ALIGN(4); 68 . = ALIGN(4);
69 __tsb_ldquad_phys_patch = .; 69 __tsb_ldquad_phys_patch = .;
70 .tsb_ldquad_phys_patch : { *(.tsb_ldquad_phys_patch) } 70 .tsb_ldquad_phys_patch : { *(.tsb_ldquad_phys_patch) }
71 __tsb_ldquad_phys_patch_end = .; 71 __tsb_ldquad_phys_patch_end = .;
72 __tsb_phys_patch = .; 72 __tsb_phys_patch = .;
73 .tsb_phys_patch : { *(.tsb_phys_patch) } 73 .tsb_phys_patch : { *(.tsb_phys_patch) }
74 __tsb_phys_patch_end = .; 74 __tsb_phys_patch_end = .;
75 __cpuid_patch = .; 75 __cpuid_patch = .;
76 .cpuid_patch : { *(.cpuid_patch) } 76 .cpuid_patch : { *(.cpuid_patch) }
77 __cpuid_patch_end = .; 77 __cpuid_patch_end = .;
78 __sun4v_1insn_patch = .; 78 __sun4v_1insn_patch = .;
79 .sun4v_1insn_patch : { *(.sun4v_1insn_patch) } 79 .sun4v_1insn_patch : { *(.sun4v_1insn_patch) }
80 __sun4v_1insn_patch_end = .; 80 __sun4v_1insn_patch_end = .;
81 __sun4v_2insn_patch = .; 81 __sun4v_2insn_patch = .;
82 .sun4v_2insn_patch : { *(.sun4v_2insn_patch) } 82 .sun4v_2insn_patch : { *(.sun4v_2insn_patch) }
83 __sun4v_2insn_patch_end = .; 83 __sun4v_2insn_patch_end = .;
84 84
85 #ifdef CONFIG_BLK_DEV_INITRD 85 #ifdef CONFIG_BLK_DEV_INITRD
86 . = ALIGN(8192); 86 . = ALIGN(8192);
87 __initramfs_start = .; 87 __initramfs_start = .;
88 .init.ramfs : { *(.init.ramfs) } 88 .init.ramfs : { *(.init.ramfs) }
89 __initramfs_end = .; 89 __initramfs_end = .;
90 #endif 90 #endif
91 91
92 . = ALIGN(8192); 92 . = ALIGN(8192);
93 __per_cpu_start = .; 93 __per_cpu_start = .;
94 .data.percpu : { *(.data.percpu) } 94 .data.percpu : { *(.data.percpu) }
95 __per_cpu_end = .; 95 __per_cpu_end = .;
96 . = ALIGN(8192); 96 . = ALIGN(8192);
97 __init_end = .; 97 __init_end = .;
98 __bss_start = .; 98 __bss_start = .;
99 .sbss : { *(.sbss) *(.scommon) } 99 .sbss : { *(.sbss) *(.scommon) }
100 .bss : 100 .bss :
101 { 101 {
102 *(.dynbss) 102 *(.dynbss)
103 *(.bss) 103 *(.bss)
104 *(COMMON) 104 *(COMMON)
105 } 105 }
106 _end = . ; 106 _end = . ;
107 PROVIDE (end = .); 107 PROVIDE (end = .);
108 /DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) } 108 /DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) }
109 109
110 STABS_DEBUG 110 STABS_DEBUG
111 111
112 DWARF_DEBUG 112 DWARF_DEBUG
113 } 113 }
114 114
arch/um/kernel/dyn.lds.S
1 #include <asm-generic/vmlinux.lds.h> 1 #include <asm-generic/vmlinux.lds.h>
2 2
3 OUTPUT_FORMAT(ELF_FORMAT) 3 OUTPUT_FORMAT(ELF_FORMAT)
4 OUTPUT_ARCH(ELF_ARCH) 4 OUTPUT_ARCH(ELF_ARCH)
5 ENTRY(_start) 5 ENTRY(_start)
6 jiffies = jiffies_64; 6 jiffies = jiffies_64;
7 7
8 SECTIONS 8 SECTIONS
9 { 9 {
10 PROVIDE (__executable_start = START); 10 PROVIDE (__executable_start = START);
11 . = START + SIZEOF_HEADERS; 11 . = START + SIZEOF_HEADERS;
12 .interp : { *(.interp) } 12 .interp : { *(.interp) }
13 /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start 13 /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start
14 * is remapped.*/ 14 * is remapped.*/
15 __binary_start = .; 15 __binary_start = .;
16 . = ALIGN(4096); /* Init code and data */ 16 . = ALIGN(4096); /* Init code and data */
17 _text = .; 17 _text = .;
18 _stext = .; 18 _stext = .;
19 __init_begin = .; 19 __init_begin = .;
20 .init.text : { 20 .init.text : {
21 _sinittext = .; 21 _sinittext = .;
22 *(.init.text) 22 *(.init.text)
23 _einittext = .; 23 _einittext = .;
24 } 24 }
25 25
26 . = ALIGN(4096); 26 . = ALIGN(4096);
27 27
28 /* Read-only sections, merged into text segment: */ 28 /* Read-only sections, merged into text segment: */
29 .hash : { *(.hash) } 29 .hash : { *(.hash) }
30 .gnu.hash : { *(.gnu.hash) } 30 .gnu.hash : { *(.gnu.hash) }
31 .dynsym : { *(.dynsym) } 31 .dynsym : { *(.dynsym) }
32 .dynstr : { *(.dynstr) } 32 .dynstr : { *(.dynstr) }
33 .gnu.version : { *(.gnu.version) } 33 .gnu.version : { *(.gnu.version) }
34 .gnu.version_d : { *(.gnu.version_d) } 34 .gnu.version_d : { *(.gnu.version_d) }
35 .gnu.version_r : { *(.gnu.version_r) } 35 .gnu.version_r : { *(.gnu.version_r) }
36 .rel.init : { *(.rel.init) } 36 .rel.init : { *(.rel.init) }
37 .rela.init : { *(.rela.init) } 37 .rela.init : { *(.rela.init) }
38 .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } 38 .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
39 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } 39 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
40 .rel.fini : { *(.rel.fini) } 40 .rel.fini : { *(.rel.fini) }
41 .rela.fini : { *(.rela.fini) } 41 .rela.fini : { *(.rela.fini) }
42 .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } 42 .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
43 .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } 43 .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
44 .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } 44 .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
45 .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } 45 .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
46 .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } 46 .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
47 .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } 47 .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
48 .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } 48 .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
49 .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } 49 .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
50 .rel.ctors : { *(.rel.ctors) } 50 .rel.ctors : { *(.rel.ctors) }
51 .rela.ctors : { *(.rela.ctors) } 51 .rela.ctors : { *(.rela.ctors) }
52 .rel.dtors : { *(.rel.dtors) } 52 .rel.dtors : { *(.rel.dtors) }
53 .rela.dtors : { *(.rela.dtors) } 53 .rela.dtors : { *(.rela.dtors) }
54 .rel.got : { *(.rel.got) } 54 .rel.got : { *(.rel.got) }
55 .rela.got : { *(.rela.got) } 55 .rela.got : { *(.rela.got) }
56 .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } 56 .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
57 .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } 57 .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
58 .rel.plt : { *(.rel.plt) } 58 .rel.plt : { *(.rel.plt) }
59 .rela.plt : { *(.rela.plt) } 59 .rela.plt : { *(.rela.plt) }
60 .init : { 60 .init : {
61 KEEP (*(.init)) 61 KEEP (*(.init))
62 } =0x90909090 62 } =0x90909090
63 .plt : { *(.plt) } 63 .plt : { *(.plt) }
64 .text : { 64 .text : {
65 TEXT_TEXT 65 TEXT_TEXT
66 SCHED_TEXT 66 SCHED_TEXT
67 LOCK_TEXT 67 LOCK_TEXT
68 *(.fixup) 68 *(.fixup)
69 *(.stub .text.* .gnu.linkonce.t.*) 69 *(.stub .text.* .gnu.linkonce.t.*)
70 /* .gnu.warning sections are handled specially by elf32.em. */ 70 /* .gnu.warning sections are handled specially by elf32.em. */
71 *(.gnu.warning) 71 *(.gnu.warning)
72 72
73 . = ALIGN(4096); 73 . = ALIGN(4096);
74 __syscall_stub_start = .; 74 __syscall_stub_start = .;
75 *(.__syscall_stub*) 75 *(.__syscall_stub*)
76 __syscall_stub_end = .; 76 __syscall_stub_end = .;
77 . = ALIGN(4096); 77 . = ALIGN(4096);
78 } =0x90909090 78 } =0x90909090
79 .fini : { 79 .fini : {
80 KEEP (*(.fini)) 80 KEEP (*(.fini))
81 } =0x90909090 81 } =0x90909090
82 82
83 .kstrtab : { *(.kstrtab) } 83 .kstrtab : { *(.kstrtab) }
84 84
85 #include "asm/common.lds.S" 85 #include "asm/common.lds.S"
86 86
87 init.data : { *(.init.data) } 87 init.data : { *(.init.data) }
88 88
89 /* Ensure the __preinit_array_start label is properly aligned. We 89 /* Ensure the __preinit_array_start label is properly aligned. We
90 could instead move the label definition inside the section, but 90 could instead move the label definition inside the section, but
91 the linker would then create the section even if it turns out to 91 the linker would then create the section even if it turns out to
92 be empty, which isn't pretty. */ 92 be empty, which isn't pretty. */
93 . = ALIGN(32 / 8); 93 . = ALIGN(32 / 8);
94 .preinit_array : { *(.preinit_array) } 94 .preinit_array : { *(.preinit_array) }
95 .init_array : { *(.init_array) } 95 .init_array : { *(.init_array) }
96 .fini_array : { *(.fini_array) } 96 .fini_array : { *(.fini_array) }
97 .data : { 97 .data : {
98 . = ALIGN(KERNEL_STACK_SIZE); /* init_task */ 98 . = ALIGN(KERNEL_STACK_SIZE); /* init_task */
99 *(.data.init_task) 99 *(.data.init_task)
100 . = ALIGN(KERNEL_STACK_SIZE); 100 . = ALIGN(KERNEL_STACK_SIZE);
101 *(.data.init_irqstack) 101 *(.data.init_irqstack)
102 *(.data .data.* .gnu.linkonce.d.*) 102 DATA_DATA
103 *(.data.* .gnu.linkonce.d.*)
103 SORT(CONSTRUCTORS) 104 SORT(CONSTRUCTORS)
104 } 105 }
105 .data1 : { *(.data1) } 106 .data1 : { *(.data1) }
106 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } 107 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
107 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } 108 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
108 .eh_frame : { KEEP (*(.eh_frame)) } 109 .eh_frame : { KEEP (*(.eh_frame)) }
109 .gcc_except_table : { *(.gcc_except_table) } 110 .gcc_except_table : { *(.gcc_except_table) }
110 .dynamic : { *(.dynamic) } 111 .dynamic : { *(.dynamic) }
111 .ctors : { 112 .ctors : {
112 /* gcc uses crtbegin.o to find the start of 113 /* gcc uses crtbegin.o to find the start of
113 the constructors, so we make sure it is 114 the constructors, so we make sure it is
114 first. Because this is a wildcard, it 115 first. Because this is a wildcard, it
115 doesn't matter if the user does not 116 doesn't matter if the user does not
116 actually link against crtbegin.o; the 117 actually link against crtbegin.o; the
117 linker won't look for a file to match a 118 linker won't look for a file to match a
118 wildcard. The wildcard also means that it 119 wildcard. The wildcard also means that it
119 doesn't matter which directory crtbegin.o 120 doesn't matter which directory crtbegin.o
120 is in. */ 121 is in. */
121 KEEP (*crtbegin.o(.ctors)) 122 KEEP (*crtbegin.o(.ctors))
122 /* We don't want to include the .ctor section from 123 /* We don't want to include the .ctor section from
123 from the crtend.o file until after the sorted ctors. 124 from the crtend.o file until after the sorted ctors.
124 The .ctor section from the crtend file contains the 125 The .ctor section from the crtend file contains the
125 end of ctors marker and it must be last */ 126 end of ctors marker and it must be last */
126 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) 127 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
127 KEEP (*(SORT(.ctors.*))) 128 KEEP (*(SORT(.ctors.*)))
128 KEEP (*(.ctors)) 129 KEEP (*(.ctors))
129 } 130 }
130 .dtors : { 131 .dtors : {
131 KEEP (*crtbegin.o(.dtors)) 132 KEEP (*crtbegin.o(.dtors))
132 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) 133 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
133 KEEP (*(SORT(.dtors.*))) 134 KEEP (*(SORT(.dtors.*)))
134 KEEP (*(.dtors)) 135 KEEP (*(.dtors))
135 } 136 }
136 .jcr : { KEEP (*(.jcr)) } 137 .jcr : { KEEP (*(.jcr)) }
137 .got : { *(.got.plt) *(.got) } 138 .got : { *(.got.plt) *(.got) }
138 _edata = .; 139 _edata = .;
139 PROVIDE (edata = .); 140 PROVIDE (edata = .);
140 __bss_start = .; 141 __bss_start = .;
141 .bss : { 142 .bss : {
142 *(.dynbss) 143 *(.dynbss)
143 *(.bss .bss.* .gnu.linkonce.b.*) 144 *(.bss .bss.* .gnu.linkonce.b.*)
144 *(COMMON) 145 *(COMMON)
145 /* Align here to ensure that the .bss section occupies space up to 146 /* Align here to ensure that the .bss section occupies space up to
146 _end. Align after .bss to ensure correct alignment even if the 147 _end. Align after .bss to ensure correct alignment even if the
147 .bss section disappears because there are no input sections. */ 148 .bss section disappears because there are no input sections. */
148 . = ALIGN(32 / 8); 149 . = ALIGN(32 / 8);
149 . = ALIGN(32 / 8); 150 . = ALIGN(32 / 8);
150 } 151 }
151 _end = .; 152 _end = .;
152 PROVIDE (end = .); 153 PROVIDE (end = .);
153 154
154 STABS_DEBUG 155 STABS_DEBUG
155 156
156 DWARF_DEBUG 157 DWARF_DEBUG
157 } 158 }
158 159
arch/um/kernel/uml.lds.S
1 #include <asm-generic/vmlinux.lds.h> 1 #include <asm-generic/vmlinux.lds.h>
2 2
3 OUTPUT_FORMAT(ELF_FORMAT) 3 OUTPUT_FORMAT(ELF_FORMAT)
4 OUTPUT_ARCH(ELF_ARCH) 4 OUTPUT_ARCH(ELF_ARCH)
5 ENTRY(_start) 5 ENTRY(_start)
6 jiffies = jiffies_64; 6 jiffies = jiffies_64;
7 7
8 SECTIONS 8 SECTIONS
9 { 9 {
10 /* This must contain the right address - not quite the default ELF one.*/ 10 /* This must contain the right address - not quite the default ELF one.*/
11 PROVIDE (__executable_start = START); 11 PROVIDE (__executable_start = START);
12 /* Static binaries stick stuff here, like the sigreturn trampoline, 12 /* Static binaries stick stuff here, like the sigreturn trampoline,
13 * invisibly to objdump. So, just make __binary_start equal to the very 13 * invisibly to objdump. So, just make __binary_start equal to the very
14 * beginning of the executable, and if there are unmapped pages after this, 14 * beginning of the executable, and if there are unmapped pages after this,
15 * they are forever unusable. 15 * they are forever unusable.
16 */ 16 */
17 __binary_start = START; 17 __binary_start = START;
18 18
19 . = START + SIZEOF_HEADERS; 19 . = START + SIZEOF_HEADERS;
20 20
21 #ifdef MODE_TT 21 #ifdef MODE_TT
22 .remap_data : { UNMAP_PATH (.data .bss) } 22 .remap_data : { UNMAP_PATH (.data .bss) }
23 .remap : { UNMAP_PATH (.text) } 23 .remap : { UNMAP_PATH (.text) }
24 24
25 . = ALIGN(4096); /* Init code and data */ 25 . = ALIGN(4096); /* Init code and data */
26 #endif 26 #endif
27 27
28 _text = .; 28 _text = .;
29 _stext = .; 29 _stext = .;
30 __init_begin = .; 30 __init_begin = .;
31 .init.text : { 31 .init.text : {
32 _sinittext = .; 32 _sinittext = .;
33 *(.init.text) 33 *(.init.text)
34 _einittext = .; 34 _einittext = .;
35 } 35 }
36 . = ALIGN(4096); 36 . = ALIGN(4096);
37 37
38 .text : 38 .text :
39 { 39 {
40 TEXT_TEXT 40 TEXT_TEXT
41 SCHED_TEXT 41 SCHED_TEXT
42 LOCK_TEXT 42 LOCK_TEXT
43 *(.fixup) 43 *(.fixup)
44 /* .gnu.warning sections are handled specially by elf32.em. */ 44 /* .gnu.warning sections are handled specially by elf32.em. */
45 *(.gnu.warning) 45 *(.gnu.warning)
46 *(.gnu.linkonce.t*) 46 *(.gnu.linkonce.t*)
47 47
48 . = ALIGN(4096); 48 . = ALIGN(4096);
49 __syscall_stub_start = .; 49 __syscall_stub_start = .;
50 *(.__syscall_stub*) 50 *(.__syscall_stub*)
51 __syscall_stub_end = .; 51 __syscall_stub_end = .;
52 . = ALIGN(4096); 52 . = ALIGN(4096);
53 } 53 }
54 54
55 #include "asm/common.lds.S" 55 #include "asm/common.lds.S"
56 56
57 init.data : { *(init.data) } 57 init.data : { *(init.data) }
58 .data : 58 .data :
59 { 59 {
60 . = ALIGN(KERNEL_STACK_SIZE); /* init_task */ 60 . = ALIGN(KERNEL_STACK_SIZE); /* init_task */
61 *(.data.init_task) 61 *(.data.init_task)
62 . = ALIGN(KERNEL_STACK_SIZE); 62 . = ALIGN(KERNEL_STACK_SIZE);
63 *(.data.init_irqstack) 63 *(.data.init_irqstack)
64 *(.data) 64 DATA_DATA
65 *(.gnu.linkonce.d*) 65 *(.gnu.linkonce.d*)
66 CONSTRUCTORS 66 CONSTRUCTORS
67 } 67 }
68 .data1 : { *(.data1) } 68 .data1 : { *(.data1) }
69 .ctors : 69 .ctors :
70 { 70 {
71 *(.ctors) 71 *(.ctors)
72 } 72 }
73 .dtors : 73 .dtors :
74 { 74 {
75 *(.dtors) 75 *(.dtors)
76 } 76 }
77 77
78 .got : { *(.got.plt) *(.got) } 78 .got : { *(.got.plt) *(.got) }
79 .dynamic : { *(.dynamic) } 79 .dynamic : { *(.dynamic) }
80 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } 80 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
81 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } 81 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
82 /* We want the small data sections together, so single-instruction offsets 82 /* We want the small data sections together, so single-instruction offsets
83 can access them all, and initialized data all before uninitialized, so 83 can access them all, and initialized data all before uninitialized, so
84 we can shorten the on-disk segment size. */ 84 we can shorten the on-disk segment size. */
85 .sdata : { *(.sdata) } 85 .sdata : { *(.sdata) }
86 _edata = .; 86 _edata = .;
87 PROVIDE (edata = .); 87 PROVIDE (edata = .);
88 . = ALIGN(0x1000); 88 . = ALIGN(0x1000);
89 .sbss : 89 .sbss :
90 { 90 {
91 __bss_start = .; 91 __bss_start = .;
92 PROVIDE(_bss_start = .); 92 PROVIDE(_bss_start = .);
93 *(.sbss) 93 *(.sbss)
94 *(.scommon) 94 *(.scommon)
95 } 95 }
96 .bss : 96 .bss :
97 { 97 {
98 *(.dynbss) 98 *(.dynbss)
99 *(.bss) 99 *(.bss)
100 *(COMMON) 100 *(COMMON)
101 } 101 }
102 _end = .; 102 _end = .;
103 PROVIDE (end = .); 103 PROVIDE (end = .);
104 104
105 STABS_DEBUG 105 STABS_DEBUG
106 106
107 DWARF_DEBUG 107 DWARF_DEBUG
108 } 108 }
109 109
arch/v850/kernel/vmlinux.lds.S
1 /* 1 /*
2 * arch/v850/vmlinux.lds.S -- kernel linker script for v850 platforms 2 * arch/v850/vmlinux.lds.S -- kernel linker script for v850 platforms
3 * 3 *
4 * Copyright (C) 2002,03,04,05 NEC Electronics Corporation 4 * Copyright (C) 2002,03,04,05 NEC Electronics Corporation
5 * Copyright (C) 2002,03,04,05 Miles Bader <miles@gnu.org> 5 * Copyright (C) 2002,03,04,05 Miles Bader <miles@gnu.org>
6 * 6 *
7 * This file is subject to the terms and conditions of the GNU General 7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this 8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details. 9 * archive for more details.
10 * 10 *
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14 14
15 #define VMLINUX_SYMBOL(_sym_) _##_sym_ 15 #define VMLINUX_SYMBOL(_sym_) _##_sym_
16 #include <asm-generic/vmlinux.lds.h> 16 #include <asm-generic/vmlinux.lds.h>
17 17
18 /* For most platforms, this will define useful things like RAM addr/size. */ 18 /* For most platforms, this will define useful things like RAM addr/size. */
19 #include <asm/machdep.h> 19 #include <asm/machdep.h>
20 20
21 21
22 /* The following macros contain the usual definitions for various data areas. 22 /* The following macros contain the usual definitions for various data areas.
23 The prefix `RAMK_' is used to indicate macros suitable for kernels loaded 23 The prefix `RAMK_' is used to indicate macros suitable for kernels loaded
24 into RAM, and similarly `ROMK_' for ROM-resident kernels. Note that all 24 into RAM, and similarly `ROMK_' for ROM-resident kernels. Note that all
25 symbols are prefixed with an extra `_' for compatibility with the v850 25 symbols are prefixed with an extra `_' for compatibility with the v850
26 toolchain. */ 26 toolchain. */
27 27
28 28
29 /* Interrupt vectors. */ 29 /* Interrupt vectors. */
30 #define INTV_CONTENTS \ 30 #define INTV_CONTENTS \
31 . = ALIGN (0x10) ; \ 31 . = ALIGN (0x10) ; \
32 __intv_start = . ; \ 32 __intv_start = . ; \
33 *(.intv.reset) /* Reset vector */ \ 33 *(.intv.reset) /* Reset vector */ \
34 . = __intv_start + 0x10 ; \ 34 . = __intv_start + 0x10 ; \
35 *(.intv.common) /* Vectors common to all v850e proc */\ 35 *(.intv.common) /* Vectors common to all v850e proc */\
36 . = __intv_start + 0x80 ; \ 36 . = __intv_start + 0x80 ; \
37 *(.intv.mach) /* Machine-specific int. vectors. */ \ 37 *(.intv.mach) /* Machine-specific int. vectors. */ \
38 __intv_end = . ; 38 __intv_end = . ;
39 39
40 #define RODATA_CONTENTS \ 40 #define RODATA_CONTENTS \
41 . = ALIGN (16) ; \ 41 . = ALIGN (16) ; \
42 *(.rodata) *(.rodata.*) \ 42 *(.rodata) *(.rodata.*) \
43 *(__vermagic) /* Kernel version magic */ \ 43 *(__vermagic) /* Kernel version magic */ \
44 *(.rodata1) \ 44 *(.rodata1) \
45 /* PCI quirks */ \ 45 /* PCI quirks */ \
46 ___start_pci_fixups_early = . ; \ 46 ___start_pci_fixups_early = . ; \
47 *(.pci_fixup_early) \ 47 *(.pci_fixup_early) \
48 ___end_pci_fixups_early = . ; \ 48 ___end_pci_fixups_early = . ; \
49 ___start_pci_fixups_header = . ; \ 49 ___start_pci_fixups_header = . ; \
50 *(.pci_fixup_header) \ 50 *(.pci_fixup_header) \
51 ___end_pci_fixups_header = . ; \ 51 ___end_pci_fixups_header = . ; \
52 ___start_pci_fixups_final = . ; \ 52 ___start_pci_fixups_final = . ; \
53 *(.pci_fixup_final) \ 53 *(.pci_fixup_final) \
54 ___end_pci_fixups_final = . ; \ 54 ___end_pci_fixups_final = . ; \
55 ___start_pci_fixups_enable = . ; \ 55 ___start_pci_fixups_enable = . ; \
56 *(.pci_fixup_enable) \ 56 *(.pci_fixup_enable) \
57 ___end_pci_fixups_enable = . ; \ 57 ___end_pci_fixups_enable = . ; \
58 /* Kernel symbol table: Normal symbols */ \ 58 /* Kernel symbol table: Normal symbols */ \
59 ___start___ksymtab = .; \ 59 ___start___ksymtab = .; \
60 *(__ksymtab) \ 60 *(__ksymtab) \
61 ___stop___ksymtab = .; \ 61 ___stop___ksymtab = .; \
62 /* Kernel symbol table: GPL-only symbols */ \ 62 /* Kernel symbol table: GPL-only symbols */ \
63 ___start___ksymtab_gpl = .; \ 63 ___start___ksymtab_gpl = .; \
64 *(__ksymtab_gpl) \ 64 *(__ksymtab_gpl) \
65 ___stop___ksymtab_gpl = .; \ 65 ___stop___ksymtab_gpl = .; \
66 /* Kernel symbol table: GPL-future symbols */ \ 66 /* Kernel symbol table: GPL-future symbols */ \
67 ___start___ksymtab_gpl_future = .; \ 67 ___start___ksymtab_gpl_future = .; \
68 *(__ksymtab_gpl_future) \ 68 *(__ksymtab_gpl_future) \
69 ___stop___ksymtab_gpl_future = .; \ 69 ___stop___ksymtab_gpl_future = .; \
70 /* Kernel symbol table: strings */ \ 70 /* Kernel symbol table: strings */ \
71 *(__ksymtab_strings) \ 71 *(__ksymtab_strings) \
72 /* Kernel symbol table: Normal symbols */ \ 72 /* Kernel symbol table: Normal symbols */ \
73 ___start___kcrctab = .; \ 73 ___start___kcrctab = .; \
74 *(__kcrctab) \ 74 *(__kcrctab) \
75 ___stop___kcrctab = .; \ 75 ___stop___kcrctab = .; \
76 /* Kernel symbol table: GPL-only symbols */ \ 76 /* Kernel symbol table: GPL-only symbols */ \
77 ___start___kcrctab_gpl = .; \ 77 ___start___kcrctab_gpl = .; \
78 *(__kcrctab_gpl) \ 78 *(__kcrctab_gpl) \
79 ___stop___kcrctab_gpl = .; \ 79 ___stop___kcrctab_gpl = .; \
80 /* Kernel symbol table: GPL-future symbols */ \ 80 /* Kernel symbol table: GPL-future symbols */ \
81 ___start___kcrctab_gpl_future = .; \ 81 ___start___kcrctab_gpl_future = .; \
82 *(__kcrctab_gpl_future) \ 82 *(__kcrctab_gpl_future) \
83 ___stop___kcrctab_gpl_future = .; \ 83 ___stop___kcrctab_gpl_future = .; \
84 /* Built-in module parameters */ \ 84 /* Built-in module parameters */ \
85 . = ALIGN (4) ; \ 85 . = ALIGN (4) ; \
86 ___start___param = .; \ 86 ___start___param = .; \
87 *(__param) \ 87 *(__param) \
88 ___stop___param = .; 88 ___stop___param = .;
89 89
90 90
91 /* Kernel text segment, and some constant data areas. */ 91 /* Kernel text segment, and some constant data areas. */
92 #define TEXT_CONTENTS \ 92 #define TEXT_CONTENTS \
93 _text = .; \ 93 _text = .; \
94 __stext = . ; \ 94 __stext = . ; \
95 TEXT_TEXT \ 95 TEXT_TEXT \
96 SCHED_TEXT \ 96 SCHED_TEXT \
97 *(.exit.text) /* 2.5 convention */ \ 97 *(.exit.text) /* 2.5 convention */ \
98 *(.text.exit) /* 2.4 convention */ \ 98 *(.text.exit) /* 2.4 convention */ \
99 *(.text.lock) \ 99 *(.text.lock) \
100 *(.exitcall.exit) \ 100 *(.exitcall.exit) \
101 __real_etext = . ; /* There may be data after here. */ \ 101 __real_etext = . ; /* There may be data after here. */ \
102 RODATA_CONTENTS \ 102 RODATA_CONTENTS \
103 . = ALIGN (4) ; \ 103 . = ALIGN (4) ; \
104 *(.call_table_data) \ 104 *(.call_table_data) \
105 *(.call_table_text) \ 105 *(.call_table_text) \
106 . = ALIGN (16) ; /* Exception table. */ \ 106 . = ALIGN (16) ; /* Exception table. */ \
107 ___start___ex_table = . ; \ 107 ___start___ex_table = . ; \
108 *(__ex_table) \ 108 *(__ex_table) \
109 ___stop___ex_table = . ; \ 109 ___stop___ex_table = . ; \
110 . = ALIGN (4) ; \ 110 . = ALIGN (4) ; \
111 __etext = . ; 111 __etext = . ;
112 112
113 /* Kernel data segment. */ 113 /* Kernel data segment. */
114 #define DATA_CONTENTS \ 114 #define DATA_CONTENTS \
115 __sdata = . ; \ 115 __sdata = . ; \
116 *(.data) \ 116 DATA_DATA \
117 *(.exit.data) /* 2.5 convention */ \ 117 *(.exit.data) /* 2.5 convention */ \
118 *(.data.exit) /* 2.4 convention */ \ 118 *(.data.exit) /* 2.4 convention */ \
119 . = ALIGN (16) ; \ 119 . = ALIGN (16) ; \
120 *(.data.cacheline_aligned) \ 120 *(.data.cacheline_aligned) \
121 . = ALIGN (0x2000) ; \ 121 . = ALIGN (0x2000) ; \
122 *(.data.init_task) \ 122 *(.data.init_task) \
123 . = ALIGN (0x2000) ; \ 123 . = ALIGN (0x2000) ; \
124 __edata = . ; 124 __edata = . ;
125 125
126 /* Kernel BSS segment. */ 126 /* Kernel BSS segment. */
127 #define BSS_CONTENTS \ 127 #define BSS_CONTENTS \
128 __sbss = . ; \ 128 __sbss = . ; \
129 *(.bss) \ 129 *(.bss) \
130 *(COMMON) \ 130 *(COMMON) \
131 . = ALIGN (4) ; \ 131 . = ALIGN (4) ; \
132 __init_stack_end = . ; \ 132 __init_stack_end = . ; \
133 __ebss = . ; 133 __ebss = . ;
134 134
135 /* `initcall' tables. */ 135 /* `initcall' tables. */
136 #define INITCALL_CONTENTS \ 136 #define INITCALL_CONTENTS \
137 . = ALIGN (16) ; \ 137 . = ALIGN (16) ; \
138 ___setup_start = . ; \ 138 ___setup_start = . ; \
139 *(.init.setup) /* 2.5 convention */ \ 139 *(.init.setup) /* 2.5 convention */ \
140 *(.setup.init) /* 2.4 convention */ \ 140 *(.setup.init) /* 2.4 convention */ \
141 ___setup_end = . ; \ 141 ___setup_end = . ; \
142 ___initcall_start = . ; \ 142 ___initcall_start = . ; \
143 *(.initcall.init) \ 143 *(.initcall.init) \
144 INITCALLS \ 144 INITCALLS \
145 . = ALIGN (4) ; \ 145 . = ALIGN (4) ; \
146 ___initcall_end = . ; \ 146 ___initcall_end = . ; \
147 ___con_initcall_start = .; \ 147 ___con_initcall_start = .; \
148 *(.con_initcall.init) \ 148 *(.con_initcall.init) \
149 ___con_initcall_end = .; 149 ___con_initcall_end = .;
150 150
151 /* Contents of `init' section for a kernel that's loaded into RAM. */ 151 /* Contents of `init' section for a kernel that's loaded into RAM. */
152 #define RAMK_INIT_CONTENTS \ 152 #define RAMK_INIT_CONTENTS \
153 RAMK_INIT_CONTENTS_NO_END \ 153 RAMK_INIT_CONTENTS_NO_END \
154 __init_end = . ; 154 __init_end = . ;
155 /* Same as RAMK_INIT_CONTENTS, but doesn't define the `__init_end' symbol. */ 155 /* Same as RAMK_INIT_CONTENTS, but doesn't define the `__init_end' symbol. */
156 #define RAMK_INIT_CONTENTS_NO_END \ 156 #define RAMK_INIT_CONTENTS_NO_END \
157 . = ALIGN (4096) ; \ 157 . = ALIGN (4096) ; \
158 __init_start = . ; \ 158 __init_start = . ; \
159 __sinittext = .; \ 159 __sinittext = .; \
160 *(.init.text) /* 2.5 convention */ \ 160 *(.init.text) /* 2.5 convention */ \
161 __einittext = .; \ 161 __einittext = .; \
162 *(.init.data) \ 162 *(.init.data) \
163 *(.text.init) /* 2.4 convention */ \ 163 *(.text.init) /* 2.4 convention */ \
164 *(.data.init) \ 164 *(.data.init) \
165 INITCALL_CONTENTS \ 165 INITCALL_CONTENTS \
166 INITRAMFS_CONTENTS 166 INITRAMFS_CONTENTS
167 167
168 /* The contents of `init' section for a ROM-resident kernel which 168 /* The contents of `init' section for a ROM-resident kernel which
169 should go into RAM. */ 169 should go into RAM. */
170 #define ROMK_INIT_RAM_CONTENTS \ 170 #define ROMK_INIT_RAM_CONTENTS \
171 . = ALIGN (4096) ; \ 171 . = ALIGN (4096) ; \
172 __init_start = . ; \ 172 __init_start = . ; \
173 *(.init.data) /* 2.5 convention */ \ 173 *(.init.data) /* 2.5 convention */ \
174 *(.data.init) /* 2.4 convention */ \ 174 *(.data.init) /* 2.4 convention */ \
175 __init_end = . ; \ 175 __init_end = . ; \
176 . = ALIGN (4096) ; 176 . = ALIGN (4096) ;
177 177
178 /* The contents of `init' section for a ROM-resident kernel which 178 /* The contents of `init' section for a ROM-resident kernel which
179 should go into ROM. */ 179 should go into ROM. */
180 #define ROMK_INIT_ROM_CONTENTS \ 180 #define ROMK_INIT_ROM_CONTENTS \
181 _sinittext = .; \ 181 _sinittext = .; \
182 *(.init.text) /* 2.5 convention */ \ 182 *(.init.text) /* 2.5 convention */ \
183 _einittext = .; \ 183 _einittext = .; \
184 *(.text.init) /* 2.4 convention */ \ 184 *(.text.init) /* 2.4 convention */ \
185 INITCALL_CONTENTS \ 185 INITCALL_CONTENTS \
186 INITRAMFS_CONTENTS 186 INITRAMFS_CONTENTS
187 187
188 /* A root filesystem image, for kernels with an embedded root filesystem. */ 188 /* A root filesystem image, for kernels with an embedded root filesystem. */
189 #define ROOT_FS_CONTENTS \ 189 #define ROOT_FS_CONTENTS \
190 __root_fs_image_start = . ; \ 190 __root_fs_image_start = . ; \
191 *(.root) \ 191 *(.root) \
192 __root_fs_image_end = . ; 192 __root_fs_image_end = . ;
193 193
194 #ifdef CONFIG_BLK_DEV_INITRD 194 #ifdef CONFIG_BLK_DEV_INITRD
195 /* The initramfs archive. */ 195 /* The initramfs archive. */
196 #define INITRAMFS_CONTENTS \ 196 #define INITRAMFS_CONTENTS \
197 . = ALIGN (4) ; \ 197 . = ALIGN (4) ; \
198 ___initramfs_start = . ; \ 198 ___initramfs_start = . ; \
199 *(.init.ramfs) \ 199 *(.init.ramfs) \
200 ___initramfs_end = . ; 200 ___initramfs_end = . ;
201 #endif 201 #endif
202 202
203 /* Where the initial bootmap (bitmap for the boot-time memory allocator) 203 /* Where the initial bootmap (bitmap for the boot-time memory allocator)
204 should be place. */ 204 should be place. */
205 #define BOOTMAP_CONTENTS \ 205 #define BOOTMAP_CONTENTS \
206 . = ALIGN (4096) ; \ 206 . = ALIGN (4096) ; \
207 __bootmap = . ; \ 207 __bootmap = . ; \
208 . = . + 4096 ; /* enough for 128MB. */ 208 . = . + 4096 ; /* enough for 128MB. */
209 209
210 /* The contents of a `typical' kram area for a kernel in RAM. */ 210 /* The contents of a `typical' kram area for a kernel in RAM. */
211 #define RAMK_KRAM_CONTENTS \ 211 #define RAMK_KRAM_CONTENTS \
212 __kram_start = . ; \ 212 __kram_start = . ; \
213 TEXT_CONTENTS \ 213 TEXT_CONTENTS \
214 DATA_CONTENTS \ 214 DATA_CONTENTS \
215 BSS_CONTENTS \ 215 BSS_CONTENTS \
216 RAMK_INIT_CONTENTS \ 216 RAMK_INIT_CONTENTS \
217 __kram_end = . ; \ 217 __kram_end = . ; \
218 BOOTMAP_CONTENTS 218 BOOTMAP_CONTENTS
219 219
220 220
221 /* Define output sections normally used for a ROM-resident kernel. 221 /* Define output sections normally used for a ROM-resident kernel.
222 ROM and RAM should be appropriate memory areas to use for kernel 222 ROM and RAM should be appropriate memory areas to use for kernel
223 ROM and RAM data. This assumes that ROM starts at 0 (and thus can 223 ROM and RAM data. This assumes that ROM starts at 0 (and thus can
224 hold the interrupt vectors). */ 224 hold the interrupt vectors). */
225 #define ROMK_SECTIONS(ROM, RAM) \ 225 #define ROMK_SECTIONS(ROM, RAM) \
226 .rom : { \ 226 .rom : { \
227 INTV_CONTENTS \ 227 INTV_CONTENTS \
228 TEXT_CONTENTS \ 228 TEXT_CONTENTS \
229 ROMK_INIT_ROM_CONTENTS \ 229 ROMK_INIT_ROM_CONTENTS \
230 ROOT_FS_CONTENTS \ 230 ROOT_FS_CONTENTS \
231 } > ROM \ 231 } > ROM \
232 \ 232 \
233 __rom_copy_src_start = . ; \ 233 __rom_copy_src_start = . ; \
234 \ 234 \
235 .data : { \ 235 .data : { \
236 __kram_start = . ; \ 236 __kram_start = . ; \
237 __rom_copy_dst_start = . ; \ 237 __rom_copy_dst_start = . ; \
238 DATA_CONTENTS \ 238 DATA_CONTENTS \
239 ROMK_INIT_RAM_CONTENTS \ 239 ROMK_INIT_RAM_CONTENTS \
240 __rom_copy_dst_end = . ; \ 240 __rom_copy_dst_end = . ; \
241 } > RAM AT> ROM \ 241 } > RAM AT> ROM \
242 \ 242 \
243 .bss ALIGN (4) : { \ 243 .bss ALIGN (4) : { \
244 BSS_CONTENTS \ 244 BSS_CONTENTS \
245 __kram_end = . ; \ 245 __kram_end = . ; \
246 BOOTMAP_CONTENTS \ 246 BOOTMAP_CONTENTS \
247 } > RAM 247 } > RAM
248 248
249 249
250 /* The 32-bit variable `jiffies' is just the lower 32-bits of `jiffies_64'. */ 250 /* The 32-bit variable `jiffies' is just the lower 32-bits of `jiffies_64'. */
251 _jiffies = _jiffies_64 ; 251 _jiffies = _jiffies_64 ;
252 252
253 253
254 /* Include an appropriate platform-dependent linker-script (which 254 /* Include an appropriate platform-dependent linker-script (which
255 usually should use the above macros to do most of the work). */ 255 usually should use the above macros to do most of the work). */
256 256
257 #ifdef CONFIG_V850E_SIM 257 #ifdef CONFIG_V850E_SIM
258 # include "sim.ld" 258 # include "sim.ld"
259 #endif 259 #endif
260 260
261 #ifdef CONFIG_V850E2_SIM85E2 261 #ifdef CONFIG_V850E2_SIM85E2
262 # include "sim85e2.ld" 262 # include "sim85e2.ld"
263 #endif 263 #endif
264 264
265 #ifdef CONFIG_V850E2_FPGA85E2C 265 #ifdef CONFIG_V850E2_FPGA85E2C
266 # include "fpga85e2c.ld" 266 # include "fpga85e2c.ld"
267 #endif 267 #endif
268 268
269 #ifdef CONFIG_V850E2_ANNA 269 #ifdef CONFIG_V850E2_ANNA
270 # ifdef CONFIG_ROM_KERNEL 270 # ifdef CONFIG_ROM_KERNEL
271 # include "anna-rom.ld" 271 # include "anna-rom.ld"
272 # else 272 # else
273 # include "anna.ld" 273 # include "anna.ld"
274 # endif 274 # endif
275 #endif 275 #endif
276 276
277 #ifdef CONFIG_V850E_AS85EP1 277 #ifdef CONFIG_V850E_AS85EP1
278 # ifdef CONFIG_ROM_KERNEL 278 # ifdef CONFIG_ROM_KERNEL
279 # include "as85ep1-rom.ld" 279 # include "as85ep1-rom.ld"
280 # else 280 # else
281 # include "as85ep1.ld" 281 # include "as85ep1.ld"
282 # endif 282 # endif
283 #endif 283 #endif
284 284
285 #ifdef CONFIG_RTE_CB_MA1 285 #ifdef CONFIG_RTE_CB_MA1
286 # ifdef CONFIG_ROM_KERNEL 286 # ifdef CONFIG_ROM_KERNEL
287 # include "rte_ma1_cb-rom.ld" 287 # include "rte_ma1_cb-rom.ld"
288 # else 288 # else
289 # include "rte_ma1_cb.ld" 289 # include "rte_ma1_cb.ld"
290 # endif 290 # endif
291 #endif 291 #endif
292 292
293 #ifdef CONFIG_RTE_CB_NB85E 293 #ifdef CONFIG_RTE_CB_NB85E
294 # ifdef CONFIG_ROM_KERNEL 294 # ifdef CONFIG_ROM_KERNEL
295 # include "rte_nb85e_cb-rom.ld" 295 # include "rte_nb85e_cb-rom.ld"
296 # elif defined(CONFIG_RTE_CB_MULTI) 296 # elif defined(CONFIG_RTE_CB_MULTI)
297 # include "rte_nb85e_cb-multi.ld" 297 # include "rte_nb85e_cb-multi.ld"
298 # else 298 # else
299 # include "rte_nb85e_cb.ld" 299 # include "rte_nb85e_cb.ld"
300 # endif 300 # endif
301 #endif 301 #endif
302 302
303 #ifdef CONFIG_RTE_CB_ME2 303 #ifdef CONFIG_RTE_CB_ME2
304 # include "rte_me2_cb.ld" 304 # include "rte_me2_cb.ld"
305 #endif 305 #endif
306 306
307 307
arch/x86_64/kernel/vmlinux.lds.S
1 /* ld script to make x86-64 Linux kernel 1 /* ld script to make x86-64 Linux kernel
2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>; 2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
3 */ 3 */
4 4
5 #define LOAD_OFFSET __START_KERNEL_map 5 #define LOAD_OFFSET __START_KERNEL_map
6 6
7 #include <asm-generic/vmlinux.lds.h> 7 #include <asm-generic/vmlinux.lds.h>
8 #include <asm/page.h> 8 #include <asm/page.h>
9 9
10 #undef i386 /* in case the preprocessor is a 32bit one */ 10 #undef i386 /* in case the preprocessor is a 32bit one */
11 11
12 OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") 12 OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
13 OUTPUT_ARCH(i386:x86-64) 13 OUTPUT_ARCH(i386:x86-64)
14 ENTRY(phys_startup_64) 14 ENTRY(phys_startup_64)
15 jiffies_64 = jiffies; 15 jiffies_64 = jiffies;
16 _proxy_pda = 1; 16 _proxy_pda = 1;
17 PHDRS { 17 PHDRS {
18 text PT_LOAD FLAGS(5); /* R_E */ 18 text PT_LOAD FLAGS(5); /* R_E */
19 data PT_LOAD FLAGS(7); /* RWE */ 19 data PT_LOAD FLAGS(7); /* RWE */
20 user PT_LOAD FLAGS(7); /* RWE */ 20 user PT_LOAD FLAGS(7); /* RWE */
21 data.init PT_LOAD FLAGS(7); /* RWE */ 21 data.init PT_LOAD FLAGS(7); /* RWE */
22 note PT_NOTE FLAGS(4); /* R__ */ 22 note PT_NOTE FLAGS(4); /* R__ */
23 } 23 }
24 SECTIONS 24 SECTIONS
25 { 25 {
26 . = __START_KERNEL; 26 . = __START_KERNEL;
27 phys_startup_64 = startup_64 - LOAD_OFFSET; 27 phys_startup_64 = startup_64 - LOAD_OFFSET;
28 _text = .; /* Text and read-only data */ 28 _text = .; /* Text and read-only data */
29 .text : AT(ADDR(.text) - LOAD_OFFSET) { 29 .text : AT(ADDR(.text) - LOAD_OFFSET) {
30 /* First the code that has to be first for bootstrapping */ 30 /* First the code that has to be first for bootstrapping */
31 *(.bootstrap.text) 31 *(.bootstrap.text)
32 _stext = .; 32 _stext = .;
33 /* Then the rest */ 33 /* Then the rest */
34 TEXT_TEXT 34 TEXT_TEXT
35 SCHED_TEXT 35 SCHED_TEXT
36 LOCK_TEXT 36 LOCK_TEXT
37 KPROBES_TEXT 37 KPROBES_TEXT
38 *(.fixup) 38 *(.fixup)
39 *(.gnu.warning) 39 *(.gnu.warning)
40 } :text = 0x9090 40 } :text = 0x9090
41 /* out-of-line lock text */ 41 /* out-of-line lock text */
42 .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET) { *(.text.lock) } 42 .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET) { *(.text.lock) }
43 43
44 _etext = .; /* End of text section */ 44 _etext = .; /* End of text section */
45 45
46 . = ALIGN(16); /* Exception table */ 46 . = ALIGN(16); /* Exception table */
47 __start___ex_table = .; 47 __start___ex_table = .;
48 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { *(__ex_table) } 48 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { *(__ex_table) }
49 __stop___ex_table = .; 49 __stop___ex_table = .;
50 50
51 BUG_TABLE 51 BUG_TABLE
52 52
53 RODATA 53 RODATA
54 54
55 . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */ 55 . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */
56 /* Data */ 56 /* Data */
57 .data : AT(ADDR(.data) - LOAD_OFFSET) { 57 .data : AT(ADDR(.data) - LOAD_OFFSET) {
58 *(.data) 58 DATA_DATA
59 CONSTRUCTORS 59 CONSTRUCTORS
60 } :data 60 } :data
61 61
62 _edata = .; /* End of data section */ 62 _edata = .; /* End of data section */
63 63
64 . = ALIGN(PAGE_SIZE); 64 . = ALIGN(PAGE_SIZE);
65 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); 65 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
66 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { 66 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
67 *(.data.cacheline_aligned) 67 *(.data.cacheline_aligned)
68 } 68 }
69 . = ALIGN(CONFIG_X86_INTERNODE_CACHE_BYTES); 69 . = ALIGN(CONFIG_X86_INTERNODE_CACHE_BYTES);
70 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { 70 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
71 *(.data.read_mostly) 71 *(.data.read_mostly)
72 } 72 }
73 73
74 #define VSYSCALL_ADDR (-10*1024*1024) 74 #define VSYSCALL_ADDR (-10*1024*1024)
75 #define VSYSCALL_PHYS_ADDR ((LOADADDR(.data.read_mostly) + SIZEOF(.data.read_mostly) + 4095) & ~(4095)) 75 #define VSYSCALL_PHYS_ADDR ((LOADADDR(.data.read_mostly) + SIZEOF(.data.read_mostly) + 4095) & ~(4095))
76 #define VSYSCALL_VIRT_ADDR ((ADDR(.data.read_mostly) + SIZEOF(.data.read_mostly) + 4095) & ~(4095)) 76 #define VSYSCALL_VIRT_ADDR ((ADDR(.data.read_mostly) + SIZEOF(.data.read_mostly) + 4095) & ~(4095))
77 77
78 #define VLOAD_OFFSET (VSYSCALL_ADDR - VSYSCALL_PHYS_ADDR) 78 #define VLOAD_OFFSET (VSYSCALL_ADDR - VSYSCALL_PHYS_ADDR)
79 #define VLOAD(x) (ADDR(x) - VLOAD_OFFSET) 79 #define VLOAD(x) (ADDR(x) - VLOAD_OFFSET)
80 80
81 #define VVIRT_OFFSET (VSYSCALL_ADDR - VSYSCALL_VIRT_ADDR) 81 #define VVIRT_OFFSET (VSYSCALL_ADDR - VSYSCALL_VIRT_ADDR)
82 #define VVIRT(x) (ADDR(x) - VVIRT_OFFSET) 82 #define VVIRT(x) (ADDR(x) - VVIRT_OFFSET)
83 83
84 . = VSYSCALL_ADDR; 84 . = VSYSCALL_ADDR;
85 .vsyscall_0 : AT(VSYSCALL_PHYS_ADDR) { *(.vsyscall_0) } :user 85 .vsyscall_0 : AT(VSYSCALL_PHYS_ADDR) { *(.vsyscall_0) } :user
86 __vsyscall_0 = VSYSCALL_VIRT_ADDR; 86 __vsyscall_0 = VSYSCALL_VIRT_ADDR;
87 87
88 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); 88 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
89 .vsyscall_fn : AT(VLOAD(.vsyscall_fn)) { *(.vsyscall_fn) } 89 .vsyscall_fn : AT(VLOAD(.vsyscall_fn)) { *(.vsyscall_fn) }
90 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); 90 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
91 .vsyscall_gtod_data : AT(VLOAD(.vsyscall_gtod_data)) 91 .vsyscall_gtod_data : AT(VLOAD(.vsyscall_gtod_data))
92 { *(.vsyscall_gtod_data) } 92 { *(.vsyscall_gtod_data) }
93 vsyscall_gtod_data = VVIRT(.vsyscall_gtod_data); 93 vsyscall_gtod_data = VVIRT(.vsyscall_gtod_data);
94 94
95 95
96 .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT(VLOAD(.vsyscall_1)) 96 .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT(VLOAD(.vsyscall_1))
97 { *(.vsyscall_1) } 97 { *(.vsyscall_1) }
98 .vsyscall_2 ADDR(.vsyscall_0) + 2048: AT(VLOAD(.vsyscall_2)) 98 .vsyscall_2 ADDR(.vsyscall_0) + 2048: AT(VLOAD(.vsyscall_2))
99 { *(.vsyscall_2) } 99 { *(.vsyscall_2) }
100 100
101 .vgetcpu_mode : AT(VLOAD(.vgetcpu_mode)) { *(.vgetcpu_mode) } 101 .vgetcpu_mode : AT(VLOAD(.vgetcpu_mode)) { *(.vgetcpu_mode) }
102 vgetcpu_mode = VVIRT(.vgetcpu_mode); 102 vgetcpu_mode = VVIRT(.vgetcpu_mode);
103 103
104 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); 104 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
105 .jiffies : AT(VLOAD(.jiffies)) { *(.jiffies) } 105 .jiffies : AT(VLOAD(.jiffies)) { *(.jiffies) }
106 jiffies = VVIRT(.jiffies); 106 jiffies = VVIRT(.jiffies);
107 107
108 .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3)) 108 .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3))
109 { *(.vsyscall_3) } 109 { *(.vsyscall_3) }
110 110
111 . = VSYSCALL_VIRT_ADDR + 4096; 111 . = VSYSCALL_VIRT_ADDR + 4096;
112 112
113 #undef VSYSCALL_ADDR 113 #undef VSYSCALL_ADDR
114 #undef VSYSCALL_PHYS_ADDR 114 #undef VSYSCALL_PHYS_ADDR
115 #undef VSYSCALL_VIRT_ADDR 115 #undef VSYSCALL_VIRT_ADDR
116 #undef VLOAD_OFFSET 116 #undef VLOAD_OFFSET
117 #undef VLOAD 117 #undef VLOAD
118 #undef VVIRT_OFFSET 118 #undef VVIRT_OFFSET
119 #undef VVIRT 119 #undef VVIRT
120 120
121 . = ALIGN(8192); /* init_task */ 121 . = ALIGN(8192); /* init_task */
122 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { 122 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
123 *(.data.init_task) 123 *(.data.init_task)
124 }:data.init 124 }:data.init
125 125
126 . = ALIGN(4096); 126 . = ALIGN(4096);
127 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { 127 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
128 *(.data.page_aligned) 128 *(.data.page_aligned)
129 } 129 }
130 130
131 /* might get freed after init */ 131 /* might get freed after init */
132 . = ALIGN(4096); 132 . = ALIGN(4096);
133 __smp_alt_begin = .; 133 __smp_alt_begin = .;
134 __smp_alt_instructions = .; 134 __smp_alt_instructions = .;
135 .smp_altinstructions : AT(ADDR(.smp_altinstructions) - LOAD_OFFSET) { 135 .smp_altinstructions : AT(ADDR(.smp_altinstructions) - LOAD_OFFSET) {
136 *(.smp_altinstructions) 136 *(.smp_altinstructions)
137 } 137 }
138 __smp_alt_instructions_end = .; 138 __smp_alt_instructions_end = .;
139 . = ALIGN(8); 139 . = ALIGN(8);
140 __smp_locks = .; 140 __smp_locks = .;
141 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { 141 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
142 *(.smp_locks) 142 *(.smp_locks)
143 } 143 }
144 __smp_locks_end = .; 144 __smp_locks_end = .;
145 .smp_altinstr_replacement : AT(ADDR(.smp_altinstr_replacement) - LOAD_OFFSET) { 145 .smp_altinstr_replacement : AT(ADDR(.smp_altinstr_replacement) - LOAD_OFFSET) {
146 *(.smp_altinstr_replacement) 146 *(.smp_altinstr_replacement)
147 } 147 }
148 . = ALIGN(4096); 148 . = ALIGN(4096);
149 __smp_alt_end = .; 149 __smp_alt_end = .;
150 150
151 . = ALIGN(4096); /* Init code and data */ 151 . = ALIGN(4096); /* Init code and data */
152 __init_begin = .; 152 __init_begin = .;
153 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { 153 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
154 _sinittext = .; 154 _sinittext = .;
155 *(.init.text) 155 *(.init.text)
156 _einittext = .; 156 _einittext = .;
157 } 157 }
158 __initdata_begin = .; 158 __initdata_begin = .;
159 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { *(.init.data) } 159 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { *(.init.data) }
160 __initdata_end = .; 160 __initdata_end = .;
161 . = ALIGN(16); 161 . = ALIGN(16);
162 __setup_start = .; 162 __setup_start = .;
163 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { *(.init.setup) } 163 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { *(.init.setup) }
164 __setup_end = .; 164 __setup_end = .;
165 __initcall_start = .; 165 __initcall_start = .;
166 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { 166 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
167 INITCALLS 167 INITCALLS
168 } 168 }
169 __initcall_end = .; 169 __initcall_end = .;
170 __con_initcall_start = .; 170 __con_initcall_start = .;
171 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) { 171 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
172 *(.con_initcall.init) 172 *(.con_initcall.init)
173 } 173 }
174 __con_initcall_end = .; 174 __con_initcall_end = .;
175 SECURITY_INIT 175 SECURITY_INIT
176 . = ALIGN(8); 176 . = ALIGN(8);
177 __alt_instructions = .; 177 __alt_instructions = .;
178 .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) { 178 .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) {
179 *(.altinstructions) 179 *(.altinstructions)
180 } 180 }
181 __alt_instructions_end = .; 181 __alt_instructions_end = .;
182 .altinstr_replacement : AT(ADDR(.altinstr_replacement) - LOAD_OFFSET) { 182 .altinstr_replacement : AT(ADDR(.altinstr_replacement) - LOAD_OFFSET) {
183 *(.altinstr_replacement) 183 *(.altinstr_replacement)
184 } 184 }
185 /* .exit.text is discard at runtime, not link time, to deal with references 185 /* .exit.text is discard at runtime, not link time, to deal with references
186 from .altinstructions and .eh_frame */ 186 from .altinstructions and .eh_frame */
187 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } 187 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) }
188 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) } 188 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) }
189 189
190 #ifdef CONFIG_BLK_DEV_INITRD 190 #ifdef CONFIG_BLK_DEV_INITRD
191 . = ALIGN(4096); 191 . = ALIGN(4096);
192 __initramfs_start = .; 192 __initramfs_start = .;
193 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } 193 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) }
194 __initramfs_end = .; 194 __initramfs_end = .;
195 #endif 195 #endif
196 196
197 . = ALIGN(4096); 197 . = ALIGN(4096);
198 __per_cpu_start = .; 198 __per_cpu_start = .;
199 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) } 199 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) }
200 __per_cpu_end = .; 200 __per_cpu_end = .;
201 . = ALIGN(4096); 201 . = ALIGN(4096);
202 __init_end = .; 202 __init_end = .;
203 203
204 . = ALIGN(4096); 204 . = ALIGN(4096);
205 __nosave_begin = .; 205 __nosave_begin = .;
206 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { *(.data.nosave) } 206 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { *(.data.nosave) }
207 . = ALIGN(4096); 207 . = ALIGN(4096);
208 __nosave_end = .; 208 __nosave_end = .;
209 209
210 __bss_start = .; /* BSS */ 210 __bss_start = .; /* BSS */
211 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { 211 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
212 *(.bss.page_aligned) 212 *(.bss.page_aligned)
213 *(.bss) 213 *(.bss)
214 } 214 }
215 __bss_stop = .; 215 __bss_stop = .;
216 216
217 _end = . ; 217 _end = . ;
218 218
219 /* Sections to be discarded */ 219 /* Sections to be discarded */
220 /DISCARD/ : { 220 /DISCARD/ : {
221 *(.exitcall.exit) 221 *(.exitcall.exit)
222 *(.eh_frame) 222 *(.eh_frame)
223 } 223 }
224 224
225 STABS_DEBUG 225 STABS_DEBUG
226 226
227 DWARF_DEBUG 227 DWARF_DEBUG
228 } 228 }
229 229
arch/xtensa/kernel/vmlinux.lds.S
1 /* 1 /*
2 * arch/xtensa/kernel/vmlinux.lds.S 2 * arch/xtensa/kernel/vmlinux.lds.S
3 * 3 *
4 * Xtensa linker script 4 * Xtensa linker script
5 * 5 *
6 * This file is subject to the terms and conditions of the GNU General Public 6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive 7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details. 8 * for more details.
9 * 9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc. 10 * Copyright (C) 2001 - 2005 Tensilica Inc.
11 * 11 *
12 * Chris Zankel <chris@zankel.net> 12 * Chris Zankel <chris@zankel.net>
13 * Marc Gauthier <marc@tensilica.com, marc@alumni.uwaterloo.ca> 13 * Marc Gauthier <marc@tensilica.com, marc@alumni.uwaterloo.ca>
14 * Joe Taylor <joe@tensilica.com, joetylr@yahoo.com> 14 * Joe Taylor <joe@tensilica.com, joetylr@yahoo.com>
15 */ 15 */
16 16
17 #include <asm-generic/vmlinux.lds.h> 17 #include <asm-generic/vmlinux.lds.h>
18 18
19 #include <asm/variant/core.h> 19 #include <asm/variant/core.h>
20 OUTPUT_ARCH(xtensa) 20 OUTPUT_ARCH(xtensa)
21 ENTRY(_start) 21 ENTRY(_start)
22 22
23 #ifdef __XTENSA_EB__ 23 #ifdef __XTENSA_EB__
24 jiffies = jiffies_64 + 4; 24 jiffies = jiffies_64 + 4;
25 #else 25 #else
26 jiffies = jiffies_64; 26 jiffies = jiffies_64;
27 #endif 27 #endif
28 28
29 #define KERNELOFFSET 0xd0001000 29 #define KERNELOFFSET 0xd0001000
30 30
31 /* Note: In the following macros, it would be nice to specify only the 31 /* Note: In the following macros, it would be nice to specify only the
32 vector name and section kind and construct "sym" and "section" using 32 vector name and section kind and construct "sym" and "section" using
33 CPP concatenation, but that does not work reliably. Concatenating a 33 CPP concatenation, but that does not work reliably. Concatenating a
34 string with "." produces an invalid token. CPP will not print a 34 string with "." produces an invalid token. CPP will not print a
35 warning because it thinks this is an assembly file, but it leaves 35 warning because it thinks this is an assembly file, but it leaves
36 them as multiple tokens and there may or may not be whitespace 36 them as multiple tokens and there may or may not be whitespace
37 between them. */ 37 between them. */
38 38
39 /* Macro for a relocation entry */ 39 /* Macro for a relocation entry */
40 40
41 #define RELOCATE_ENTRY(sym, section) \ 41 #define RELOCATE_ENTRY(sym, section) \
42 LONG(sym ## _start); \ 42 LONG(sym ## _start); \
43 LONG(sym ## _end); \ 43 LONG(sym ## _end); \
44 LONG(LOADADDR(section)) 44 LONG(LOADADDR(section))
45 45
46 /* Macro to define a section for a vector. 46 /* Macro to define a section for a vector.
47 * 47 *
48 * Use of the MIN function catches the types of errors illustrated in 48 * Use of the MIN function catches the types of errors illustrated in
49 * the following example: 49 * the following example:
50 * 50 *
51 * Assume the section .DoubleExceptionVector.literal is completely 51 * Assume the section .DoubleExceptionVector.literal is completely
52 * full. Then a programmer adds code to .DoubleExceptionVector.text 52 * full. Then a programmer adds code to .DoubleExceptionVector.text
53 * that produces another literal. The final literal position will 53 * that produces another literal. The final literal position will
54 * overlay onto the first word of the adjacent code section 54 * overlay onto the first word of the adjacent code section
55 * .DoubleExceptionVector.text. (In practice, the literals will 55 * .DoubleExceptionVector.text. (In practice, the literals will
56 * overwrite the code, and the first few instructions will be 56 * overwrite the code, and the first few instructions will be
57 * garbage.) 57 * garbage.)
58 */ 58 */
59 59
60 #define SECTION_VECTOR(sym, section, addr, max_prevsec_size, prevsec) \ 60 #define SECTION_VECTOR(sym, section, addr, max_prevsec_size, prevsec) \
61 section addr : AT((MIN(LOADADDR(prevsec) + max_prevsec_size, \ 61 section addr : AT((MIN(LOADADDR(prevsec) + max_prevsec_size, \
62 LOADADDR(prevsec) + SIZEOF(prevsec)) + 3) & ~ 3) \ 62 LOADADDR(prevsec) + SIZEOF(prevsec)) + 3) & ~ 3) \
63 { \ 63 { \
64 . = ALIGN(4); \ 64 . = ALIGN(4); \
65 sym ## _start = ABSOLUTE(.); \ 65 sym ## _start = ABSOLUTE(.); \
66 *(section) \ 66 *(section) \
67 sym ## _end = ABSOLUTE(.); \ 67 sym ## _end = ABSOLUTE(.); \
68 } 68 }
69 69
70 /* 70 /*
71 * Mapping of input sections to output sections when linking. 71 * Mapping of input sections to output sections when linking.
72 */ 72 */
73 73
74 SECTIONS 74 SECTIONS
75 { 75 {
76 . = KERNELOFFSET; 76 . = KERNELOFFSET;
77 /* .text section */ 77 /* .text section */
78 78
79 _text = .; 79 _text = .;
80 _stext = .; 80 _stext = .;
81 _ftext = .; 81 _ftext = .;
82 82
83 .text : 83 .text :
84 { 84 {
85 /* The .head.text section must be the first section! */ 85 /* The .head.text section must be the first section! */
86 *(.head.text) 86 *(.head.text)
87 *(.literal) 87 *(.literal)
88 TEXT_TEXT 88 TEXT_TEXT
89 *(.srom.text) 89 *(.srom.text)
90 VMLINUX_SYMBOL(__sched_text_start) = .; 90 VMLINUX_SYMBOL(__sched_text_start) = .;
91 *(.sched.literal .sched.text) 91 *(.sched.literal .sched.text)
92 VMLINUX_SYMBOL(__sched_text_end) = .; 92 VMLINUX_SYMBOL(__sched_text_end) = .;
93 VMLINUX_SYMBOL(__lock_text_start) = .; 93 VMLINUX_SYMBOL(__lock_text_start) = .;
94 *(.spinlock.literal .spinlock.text) 94 *(.spinlock.literal .spinlock.text)
95 VMLINUX_SYMBOL(__lock_text_end) = .; 95 VMLINUX_SYMBOL(__lock_text_end) = .;
96 96
97 } 97 }
98 _etext = .; 98 _etext = .;
99 99
100 . = ALIGN(16); 100 . = ALIGN(16);
101 101
102 RODATA 102 RODATA
103 103
104 /* Relocation table */ 104 /* Relocation table */
105 105
106 . = ALIGN(16); 106 . = ALIGN(16);
107 __boot_reloc_table_start = ABSOLUTE(.); 107 __boot_reloc_table_start = ABSOLUTE(.);
108 108
109 __relocate : { 109 __relocate : {
110 110
111 RELOCATE_ENTRY(_WindowVectors_text, 111 RELOCATE_ENTRY(_WindowVectors_text,
112 .WindowVectors.text); 112 .WindowVectors.text);
113 #if 0 113 #if 0
114 RELOCATE_ENTRY(_KernelExceptionVector_literal, 114 RELOCATE_ENTRY(_KernelExceptionVector_literal,
115 .KernelExceptionVector.literal); 115 .KernelExceptionVector.literal);
116 #endif 116 #endif
117 RELOCATE_ENTRY(_KernelExceptionVector_text, 117 RELOCATE_ENTRY(_KernelExceptionVector_text,
118 .KernelExceptionVector.text); 118 .KernelExceptionVector.text);
119 #if 0 119 #if 0
120 RELOCATE_ENTRY(_UserExceptionVector_literal, 120 RELOCATE_ENTRY(_UserExceptionVector_literal,
121 .UserExceptionVector.literal); 121 .UserExceptionVector.literal);
122 #endif 122 #endif
123 RELOCATE_ENTRY(_UserExceptionVector_text, 123 RELOCATE_ENTRY(_UserExceptionVector_text,
124 .UserExceptionVector.text); 124 .UserExceptionVector.text);
125 RELOCATE_ENTRY(_DoubleExceptionVector_literal, 125 RELOCATE_ENTRY(_DoubleExceptionVector_literal,
126 .DoubleExceptionVector.literal); 126 .DoubleExceptionVector.literal);
127 RELOCATE_ENTRY(_DoubleExceptionVector_text, 127 RELOCATE_ENTRY(_DoubleExceptionVector_text,
128 .DoubleExceptionVector.text); 128 .DoubleExceptionVector.text);
129 } 129 }
130 __boot_reloc_table_end = ABSOLUTE(.) ; 130 __boot_reloc_table_end = ABSOLUTE(.) ;
131 131
132 .fixup : { *(.fixup) } 132 .fixup : { *(.fixup) }
133 133
134 . = ALIGN(16); 134 . = ALIGN(16);
135 135
136 __ex_table : { 136 __ex_table : {
137 __start___ex_table = .; 137 __start___ex_table = .;
138 *(__ex_table) 138 *(__ex_table)
139 __stop___ex_table = .; 139 __stop___ex_table = .;
140 } 140 }
141 141
142 /* Data section */ 142 /* Data section */
143 143
144 . = ALIGN(XCHAL_ICACHE_LINESIZE); 144 . = ALIGN(XCHAL_ICACHE_LINESIZE);
145 _fdata = .; 145 _fdata = .;
146 .data : 146 .data :
147 { 147 {
148 *(.data) CONSTRUCTORS 148 DATA_DATA
149 CONSTRUCTORS
149 . = ALIGN(XCHAL_ICACHE_LINESIZE); 150 . = ALIGN(XCHAL_ICACHE_LINESIZE);
150 *(.data.cacheline_aligned) 151 *(.data.cacheline_aligned)
151 } 152 }
152 153
153 _edata = .; 154 _edata = .;
154 155
155 /* The initial task */ 156 /* The initial task */
156 . = ALIGN(8192); 157 . = ALIGN(8192);
157 .data.init_task : { *(.data.init_task) } 158 .data.init_task : { *(.data.init_task) }
158 159
159 /* Initialization code and data: */ 160 /* Initialization code and data: */
160 161
161 . = ALIGN(1 << 12); 162 . = ALIGN(1 << 12);
162 __init_begin = .; 163 __init_begin = .;
163 .init.text : { 164 .init.text : {
164 _sinittext = .; 165 _sinittext = .;
165 *(.init.literal) *(.init.text) 166 *(.init.literal) *(.init.text)
166 _einittext = .; 167 _einittext = .;
167 } 168 }
168 169
169 .init.data : 170 .init.data :
170 { 171 {
171 *(.init.data) 172 *(.init.data)
172 . = ALIGN(0x4); 173 . = ALIGN(0x4);
173 __tagtable_begin = .; 174 __tagtable_begin = .;
174 *(.taglist) 175 *(.taglist)
175 __tagtable_end = .; 176 __tagtable_end = .;
176 } 177 }
177 178
178 . = ALIGN(XCHAL_ICACHE_LINESIZE); 179 . = ALIGN(XCHAL_ICACHE_LINESIZE);
179 180
180 __setup_start = .; 181 __setup_start = .;
181 .init.setup : { *(.init.setup) } 182 .init.setup : { *(.init.setup) }
182 __setup_end = .; 183 __setup_end = .;
183 184
184 __initcall_start = .; 185 __initcall_start = .;
185 .initcall.init : { 186 .initcall.init : {
186 INITCALLS 187 INITCALLS
187 } 188 }
188 __initcall_end = .; 189 __initcall_end = .;
189 190
190 __con_initcall_start = .; 191 __con_initcall_start = .;
191 .con_initcall.init : { *(.con_initcall.init) } 192 .con_initcall.init : { *(.con_initcall.init) }
192 __con_initcall_end = .; 193 __con_initcall_end = .;
193 194
194 SECURITY_INIT 195 SECURITY_INIT
195 196
196 . = ALIGN(4); 197 . = ALIGN(4);
197 198
198 __start___ftr_fixup = .; 199 __start___ftr_fixup = .;
199 __ftr_fixup : { *(__ftr_fixup) } 200 __ftr_fixup : { *(__ftr_fixup) }
200 __stop___ftr_fixup = .; 201 __stop___ftr_fixup = .;
201 202
202 . = ALIGN(4096); 203 . = ALIGN(4096);
203 __per_cpu_start = .; 204 __per_cpu_start = .;
204 .data.percpu : { *(.data.percpu) } 205 .data.percpu : { *(.data.percpu) }
205 __per_cpu_end = .; 206 __per_cpu_end = .;
206 207
207 #ifdef CONFIG_BLK_DEV_INITRD 208 #ifdef CONFIG_BLK_DEV_INITRD
208 . = ALIGN(4096); 209 . = ALIGN(4096);
209 __initramfs_start =.; 210 __initramfs_start =.;
210 .init.ramfs : { *(.init.ramfs) } 211 .init.ramfs : { *(.init.ramfs) }
211 __initramfs_end = .; 212 __initramfs_end = .;
212 #endif 213 #endif
213 214
214 /* We need this dummy segment here */ 215 /* We need this dummy segment here */
215 216
216 . = ALIGN(4); 217 . = ALIGN(4);
217 .dummy : { LONG(0) } 218 .dummy : { LONG(0) }
218 219
219 /* The vectors are relocated to the real position at startup time */ 220 /* The vectors are relocated to the real position at startup time */
220 221
221 SECTION_VECTOR (_WindowVectors_text, 222 SECTION_VECTOR (_WindowVectors_text,
222 .WindowVectors.text, 223 .WindowVectors.text,
223 XCHAL_WINDOW_VECTORS_VADDR, 4, 224 XCHAL_WINDOW_VECTORS_VADDR, 4,
224 .dummy) 225 .dummy)
225 SECTION_VECTOR (_DebugInterruptVector_literal, 226 SECTION_VECTOR (_DebugInterruptVector_literal,
226 .DebugInterruptVector.literal, 227 .DebugInterruptVector.literal,
227 XCHAL_DEBUG_VECTOR_VADDR - 4, 228 XCHAL_DEBUG_VECTOR_VADDR - 4,
228 SIZEOF(.WindowVectors.text), 229 SIZEOF(.WindowVectors.text),
229 .WindowVectors.text) 230 .WindowVectors.text)
230 SECTION_VECTOR (_DebugInterruptVector_text, 231 SECTION_VECTOR (_DebugInterruptVector_text,
231 .DebugInterruptVector.text, 232 .DebugInterruptVector.text,
232 XCHAL_DEBUG_VECTOR_VADDR, 233 XCHAL_DEBUG_VECTOR_VADDR,
233 4, 234 4,
234 .DebugInterruptVector.literal) 235 .DebugInterruptVector.literal)
235 SECTION_VECTOR (_KernelExceptionVector_literal, 236 SECTION_VECTOR (_KernelExceptionVector_literal,
236 .KernelExceptionVector.literal, 237 .KernelExceptionVector.literal,
237 XCHAL_KERNEL_VECTOR_VADDR - 4, 238 XCHAL_KERNEL_VECTOR_VADDR - 4,
238 SIZEOF(.DebugInterruptVector.text), 239 SIZEOF(.DebugInterruptVector.text),
239 .DebugInterruptVector.text) 240 .DebugInterruptVector.text)
240 SECTION_VECTOR (_KernelExceptionVector_text, 241 SECTION_VECTOR (_KernelExceptionVector_text,
241 .KernelExceptionVector.text, 242 .KernelExceptionVector.text,
242 XCHAL_KERNEL_VECTOR_VADDR, 243 XCHAL_KERNEL_VECTOR_VADDR,
243 4, 244 4,
244 .KernelExceptionVector.literal) 245 .KernelExceptionVector.literal)
245 SECTION_VECTOR (_UserExceptionVector_literal, 246 SECTION_VECTOR (_UserExceptionVector_literal,
246 .UserExceptionVector.literal, 247 .UserExceptionVector.literal,
247 XCHAL_USER_VECTOR_VADDR - 4, 248 XCHAL_USER_VECTOR_VADDR - 4,
248 SIZEOF(.KernelExceptionVector.text), 249 SIZEOF(.KernelExceptionVector.text),
249 .KernelExceptionVector.text) 250 .KernelExceptionVector.text)
250 SECTION_VECTOR (_UserExceptionVector_text, 251 SECTION_VECTOR (_UserExceptionVector_text,
251 .UserExceptionVector.text, 252 .UserExceptionVector.text,
252 XCHAL_USER_VECTOR_VADDR, 253 XCHAL_USER_VECTOR_VADDR,
253 4, 254 4,
254 .UserExceptionVector.literal) 255 .UserExceptionVector.literal)
255 SECTION_VECTOR (_DoubleExceptionVector_literal, 256 SECTION_VECTOR (_DoubleExceptionVector_literal,
256 .DoubleExceptionVector.literal, 257 .DoubleExceptionVector.literal,
257 XCHAL_DOUBLEEXC_VECTOR_VADDR - 16, 258 XCHAL_DOUBLEEXC_VECTOR_VADDR - 16,
258 SIZEOF(.UserExceptionVector.text), 259 SIZEOF(.UserExceptionVector.text),
259 .UserExceptionVector.text) 260 .UserExceptionVector.text)
260 SECTION_VECTOR (_DoubleExceptionVector_text, 261 SECTION_VECTOR (_DoubleExceptionVector_text,
261 .DoubleExceptionVector.text, 262 .DoubleExceptionVector.text,
262 XCHAL_DOUBLEEXC_VECTOR_VADDR, 263 XCHAL_DOUBLEEXC_VECTOR_VADDR,
263 32, 264 32,
264 .DoubleExceptionVector.literal) 265 .DoubleExceptionVector.literal)
265 266
266 . = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3) & ~ 3; 267 . = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3) & ~ 3;
267 . = ALIGN(1 << 12); 268 . = ALIGN(1 << 12);
268 269
269 __init_end = .; 270 __init_end = .;
270 271
271 . = ALIGN(8192); 272 . = ALIGN(8192);
272 273
273 /* BSS section */ 274 /* BSS section */
274 _bss_start = .; 275 _bss_start = .;
275 .sbss : { *(.sbss) *(.scommon) } 276 .sbss : { *(.sbss) *(.scommon) }
276 .bss : { *(COMMON) *(.bss) } 277 .bss : { *(COMMON) *(.bss) }
277 _bss_end = .; 278 _bss_end = .;
278 _end = .; 279 _end = .;
279 280
280 /* only used by the boot loader */ 281 /* only used by the boot loader */
281 282
282 . = ALIGN(0x10); 283 . = ALIGN(0x10);
283 .bootstrap : { *(.bootstrap.literal .bootstrap.text .bootstrap.data) } 284 .bootstrap : { *(.bootstrap.literal .bootstrap.text .bootstrap.data) }
284 285
285 . = ALIGN(0x1000); 286 . = ALIGN(0x1000);
286 __initrd_start = .; 287 __initrd_start = .;
287 .initrd : { *(.initrd) } 288 .initrd : { *(.initrd) }
288 __initrd_end = .; 289 __initrd_end = .;
289 290
290 .ResetVector.text XCHAL_RESET_VECTOR_VADDR : 291 .ResetVector.text XCHAL_RESET_VECTOR_VADDR :
291 { 292 {
292 *(.ResetVector.text) 293 *(.ResetVector.text)
293 } 294 }
294 295
295 296
296 /* Sections to be discarded */ 297 /* Sections to be discarded */
297 /DISCARD/ : 298 /DISCARD/ :
298 { 299 {
299 *(.text.exit) 300 *(.text.exit)
300 *(.text.exit.literal) 301 *(.text.exit.literal)
301 *(.data.exit) 302 *(.data.exit)
302 *(.exitcall.exit) 303 *(.exitcall.exit)
303 } 304 }
304 305
305 306
306 .debug 0 : { *(.debug) } 307 .debug 0 : { *(.debug) }
307 .line 0 : { *(.line) } 308 .line 0 : { *(.line) }
308 .debug_srcinfo 0 : { *(.debug_srcinfo) } 309 .debug_srcinfo 0 : { *(.debug_srcinfo) }
309 .debug_sfnames 0 : { *(.debug_sfnames) } 310 .debug_sfnames 0 : { *(.debug_sfnames) }
310 .debug_aranges 0 : { *(.debug_aranges) } 311 .debug_aranges 0 : { *(.debug_aranges) }
311 .debug_pubnames 0 : { *(.debug_pubnames) } 312 .debug_pubnames 0 : { *(.debug_pubnames) }
312 .debug_info 0 : { *(.debug_info) } 313 .debug_info 0 : { *(.debug_info) }
313 .debug_abbrev 0 : { *(.debug_abbrev) } 314 .debug_abbrev 0 : { *(.debug_abbrev) }
314 .debug_line 0 : { *(.debug_line) } 315 .debug_line 0 : { *(.debug_line) }
315 .debug_frame 0 : { *(.debug_frame) } 316 .debug_frame 0 : { *(.debug_frame) }
316 .debug_str 0 : { *(.debug_str) } 317 .debug_str 0 : { *(.debug_str) }
317 .debug_loc 0 : { *(.debug_loc) } 318 .debug_loc 0 : { *(.debug_loc) }
318 .debug_macinfo 0 : { *(.debug_macinfo) } 319 .debug_macinfo 0 : { *(.debug_macinfo) }
319 .debug_weaknames 0 : { *(.debug_weaknames) } 320 .debug_weaknames 0 : { *(.debug_weaknames) }
320 .debug_funcnames 0 : { *(.debug_funcnames) } 321 .debug_funcnames 0 : { *(.debug_funcnames) }
321 .debug_typenames 0 : { *(.debug_typenames) } 322 .debug_typenames 0 : { *(.debug_typenames) }
322 .debug_varnames 0 : { *(.debug_varnames) } 323 .debug_varnames 0 : { *(.debug_varnames) }
323 324
324 .xt.insn 0 : 325 .xt.insn 0 :
325 { 326 {
326 *(.xt.insn) 327 *(.xt.insn)
327 *(.gnu.linkonce.x*) 328 *(.gnu.linkonce.x*)
328 } 329 }
329 330
330 .xt.lit 0 : 331 .xt.lit 0 :
331 { 332 {
332 *(.xt.lit) 333 *(.xt.lit)
333 *(.gnu.linkonce.p*) 334 *(.gnu.linkonce.p*)
334 } 335 }
335 } 336 }
336 337
include/asm-generic/vmlinux.lds.h
1 #ifndef LOAD_OFFSET 1 #ifndef LOAD_OFFSET
2 #define LOAD_OFFSET 0 2 #define LOAD_OFFSET 0
3 #endif 3 #endif
4 4
5 #ifndef VMLINUX_SYMBOL 5 #ifndef VMLINUX_SYMBOL
6 #define VMLINUX_SYMBOL(_sym_) _sym_ 6 #define VMLINUX_SYMBOL(_sym_) _sym_
7 #endif 7 #endif
8 8
9 /* Align . to a 8 byte boundary equals to maximum function alignment. */ 9 /* Align . to a 8 byte boundary equals to maximum function alignment. */
10 #define ALIGN_FUNCTION() . = ALIGN(8) 10 #define ALIGN_FUNCTION() . = ALIGN(8)
11 11
12 /* .data section */
13 #define DATA_DATA \
14 *(.data)
15
12 #define RODATA \ 16 #define RODATA \
13 . = ALIGN(4096); \ 17 . = ALIGN(4096); \
14 .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ 18 .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
15 VMLINUX_SYMBOL(__start_rodata) = .; \ 19 VMLINUX_SYMBOL(__start_rodata) = .; \
16 *(.rodata) *(.rodata.*) \ 20 *(.rodata) *(.rodata.*) \
17 *(__vermagic) /* Kernel version magic */ \ 21 *(__vermagic) /* Kernel version magic */ \
18 } \ 22 } \
19 \ 23 \
20 .rodata1 : AT(ADDR(.rodata1) - LOAD_OFFSET) { \ 24 .rodata1 : AT(ADDR(.rodata1) - LOAD_OFFSET) { \
21 *(.rodata1) \ 25 *(.rodata1) \
22 } \ 26 } \
23 \ 27 \
24 /* PCI quirks */ \ 28 /* PCI quirks */ \
25 .pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \ 29 .pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \
26 VMLINUX_SYMBOL(__start_pci_fixups_early) = .; \ 30 VMLINUX_SYMBOL(__start_pci_fixups_early) = .; \
27 *(.pci_fixup_early) \ 31 *(.pci_fixup_early) \
28 VMLINUX_SYMBOL(__end_pci_fixups_early) = .; \ 32 VMLINUX_SYMBOL(__end_pci_fixups_early) = .; \
29 VMLINUX_SYMBOL(__start_pci_fixups_header) = .; \ 33 VMLINUX_SYMBOL(__start_pci_fixups_header) = .; \
30 *(.pci_fixup_header) \ 34 *(.pci_fixup_header) \
31 VMLINUX_SYMBOL(__end_pci_fixups_header) = .; \ 35 VMLINUX_SYMBOL(__end_pci_fixups_header) = .; \
32 VMLINUX_SYMBOL(__start_pci_fixups_final) = .; \ 36 VMLINUX_SYMBOL(__start_pci_fixups_final) = .; \
33 *(.pci_fixup_final) \ 37 *(.pci_fixup_final) \
34 VMLINUX_SYMBOL(__end_pci_fixups_final) = .; \ 38 VMLINUX_SYMBOL(__end_pci_fixups_final) = .; \
35 VMLINUX_SYMBOL(__start_pci_fixups_enable) = .; \ 39 VMLINUX_SYMBOL(__start_pci_fixups_enable) = .; \
36 *(.pci_fixup_enable) \ 40 *(.pci_fixup_enable) \
37 VMLINUX_SYMBOL(__end_pci_fixups_enable) = .; \ 41 VMLINUX_SYMBOL(__end_pci_fixups_enable) = .; \
38 VMLINUX_SYMBOL(__start_pci_fixups_resume) = .; \ 42 VMLINUX_SYMBOL(__start_pci_fixups_resume) = .; \
39 *(.pci_fixup_resume) \ 43 *(.pci_fixup_resume) \
40 VMLINUX_SYMBOL(__end_pci_fixups_resume) = .; \ 44 VMLINUX_SYMBOL(__end_pci_fixups_resume) = .; \
41 } \ 45 } \
42 \ 46 \
43 /* RapidIO route ops */ \ 47 /* RapidIO route ops */ \
44 .rio_route : AT(ADDR(.rio_route) - LOAD_OFFSET) { \ 48 .rio_route : AT(ADDR(.rio_route) - LOAD_OFFSET) { \
45 VMLINUX_SYMBOL(__start_rio_route_ops) = .; \ 49 VMLINUX_SYMBOL(__start_rio_route_ops) = .; \
46 *(.rio_route_ops) \ 50 *(.rio_route_ops) \
47 VMLINUX_SYMBOL(__end_rio_route_ops) = .; \ 51 VMLINUX_SYMBOL(__end_rio_route_ops) = .; \
48 } \ 52 } \
49 \ 53 \
50 /* Kernel symbol table: Normal symbols */ \ 54 /* Kernel symbol table: Normal symbols */ \
51 __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \ 55 __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
52 VMLINUX_SYMBOL(__start___ksymtab) = .; \ 56 VMLINUX_SYMBOL(__start___ksymtab) = .; \
53 *(__ksymtab) \ 57 *(__ksymtab) \
54 VMLINUX_SYMBOL(__stop___ksymtab) = .; \ 58 VMLINUX_SYMBOL(__stop___ksymtab) = .; \
55 } \ 59 } \
56 \ 60 \
57 /* Kernel symbol table: GPL-only symbols */ \ 61 /* Kernel symbol table: GPL-only symbols */ \
58 __ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) { \ 62 __ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) { \
59 VMLINUX_SYMBOL(__start___ksymtab_gpl) = .; \ 63 VMLINUX_SYMBOL(__start___ksymtab_gpl) = .; \
60 *(__ksymtab_gpl) \ 64 *(__ksymtab_gpl) \
61 VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \ 65 VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \
62 } \ 66 } \
63 \ 67 \
64 /* Kernel symbol table: Normal unused symbols */ \ 68 /* Kernel symbol table: Normal unused symbols */ \
65 __ksymtab_unused : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) { \ 69 __ksymtab_unused : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) { \
66 VMLINUX_SYMBOL(__start___ksymtab_unused) = .; \ 70 VMLINUX_SYMBOL(__start___ksymtab_unused) = .; \
67 *(__ksymtab_unused) \ 71 *(__ksymtab_unused) \
68 VMLINUX_SYMBOL(__stop___ksymtab_unused) = .; \ 72 VMLINUX_SYMBOL(__stop___ksymtab_unused) = .; \
69 } \ 73 } \
70 \ 74 \
71 /* Kernel symbol table: GPL-only unused symbols */ \ 75 /* Kernel symbol table: GPL-only unused symbols */ \
72 __ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \ 76 __ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \
73 VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .; \ 77 VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .; \
74 *(__ksymtab_unused_gpl) \ 78 *(__ksymtab_unused_gpl) \
75 VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .; \ 79 VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .; \
76 } \ 80 } \
77 \ 81 \
78 /* Kernel symbol table: GPL-future-only symbols */ \ 82 /* Kernel symbol table: GPL-future-only symbols */ \
79 __ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \ 83 __ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \
80 VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .; \ 84 VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .; \
81 *(__ksymtab_gpl_future) \ 85 *(__ksymtab_gpl_future) \
82 VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .; \ 86 VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .; \
83 } \ 87 } \
84 \ 88 \
85 /* Kernel symbol table: Normal symbols */ \ 89 /* Kernel symbol table: Normal symbols */ \
86 __kcrctab : AT(ADDR(__kcrctab) - LOAD_OFFSET) { \ 90 __kcrctab : AT(ADDR(__kcrctab) - LOAD_OFFSET) { \
87 VMLINUX_SYMBOL(__start___kcrctab) = .; \ 91 VMLINUX_SYMBOL(__start___kcrctab) = .; \
88 *(__kcrctab) \ 92 *(__kcrctab) \
89 VMLINUX_SYMBOL(__stop___kcrctab) = .; \ 93 VMLINUX_SYMBOL(__stop___kcrctab) = .; \
90 } \ 94 } \
91 \ 95 \
92 /* Kernel symbol table: GPL-only symbols */ \ 96 /* Kernel symbol table: GPL-only symbols */ \
93 __kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) { \ 97 __kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) { \
94 VMLINUX_SYMBOL(__start___kcrctab_gpl) = .; \ 98 VMLINUX_SYMBOL(__start___kcrctab_gpl) = .; \
95 *(__kcrctab_gpl) \ 99 *(__kcrctab_gpl) \
96 VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \ 100 VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \
97 } \ 101 } \
98 \ 102 \
99 /* Kernel symbol table: Normal unused symbols */ \ 103 /* Kernel symbol table: Normal unused symbols */ \
100 __kcrctab_unused : AT(ADDR(__kcrctab_unused) - LOAD_OFFSET) { \ 104 __kcrctab_unused : AT(ADDR(__kcrctab_unused) - LOAD_OFFSET) { \
101 VMLINUX_SYMBOL(__start___kcrctab_unused) = .; \ 105 VMLINUX_SYMBOL(__start___kcrctab_unused) = .; \
102 *(__kcrctab_unused) \ 106 *(__kcrctab_unused) \
103 VMLINUX_SYMBOL(__stop___kcrctab_unused) = .; \ 107 VMLINUX_SYMBOL(__stop___kcrctab_unused) = .; \
104 } \ 108 } \
105 \ 109 \
106 /* Kernel symbol table: GPL-only unused symbols */ \ 110 /* Kernel symbol table: GPL-only unused symbols */ \
107 __kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \ 111 __kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \
108 VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .; \ 112 VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .; \
109 *(__kcrctab_unused_gpl) \ 113 *(__kcrctab_unused_gpl) \
110 VMLINUX_SYMBOL(__stop___kcrctab_unused_gpl) = .; \ 114 VMLINUX_SYMBOL(__stop___kcrctab_unused_gpl) = .; \
111 } \ 115 } \
112 \ 116 \
113 /* Kernel symbol table: GPL-future-only symbols */ \ 117 /* Kernel symbol table: GPL-future-only symbols */ \
114 __kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \ 118 __kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \
115 VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .; \ 119 VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .; \
116 *(__kcrctab_gpl_future) \ 120 *(__kcrctab_gpl_future) \
117 VMLINUX_SYMBOL(__stop___kcrctab_gpl_future) = .; \ 121 VMLINUX_SYMBOL(__stop___kcrctab_gpl_future) = .; \
118 } \ 122 } \
119 \ 123 \
120 /* Kernel symbol table: strings */ \ 124 /* Kernel symbol table: strings */ \
121 __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \ 125 __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
122 *(__ksymtab_strings) \ 126 *(__ksymtab_strings) \
123 } \ 127 } \
124 \ 128 \
125 /* Built-in module parameters. */ \ 129 /* Built-in module parameters. */ \
126 __param : AT(ADDR(__param) - LOAD_OFFSET) { \ 130 __param : AT(ADDR(__param) - LOAD_OFFSET) { \
127 VMLINUX_SYMBOL(__start___param) = .; \ 131 VMLINUX_SYMBOL(__start___param) = .; \
128 *(__param) \ 132 *(__param) \
129 VMLINUX_SYMBOL(__stop___param) = .; \ 133 VMLINUX_SYMBOL(__stop___param) = .; \
130 VMLINUX_SYMBOL(__end_rodata) = .; \ 134 VMLINUX_SYMBOL(__end_rodata) = .; \
131 } \ 135 } \
132 \ 136 \
133 . = ALIGN(4096); 137 . = ALIGN(4096);
134 138
135 #define SECURITY_INIT \ 139 #define SECURITY_INIT \
136 .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \ 140 .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \
137 VMLINUX_SYMBOL(__security_initcall_start) = .; \ 141 VMLINUX_SYMBOL(__security_initcall_start) = .; \
138 *(.security_initcall.init) \ 142 *(.security_initcall.init) \
139 VMLINUX_SYMBOL(__security_initcall_end) = .; \ 143 VMLINUX_SYMBOL(__security_initcall_end) = .; \
140 } 144 }
141 145
142 /* .text section. Map to function alignment to avoid address changes 146 /* .text section. Map to function alignment to avoid address changes
143 * during second ld run in second ld pass when generating System.map */ 147 * during second ld run in second ld pass when generating System.map */
144 #define TEXT_TEXT \ 148 #define TEXT_TEXT \
145 ALIGN_FUNCTION(); \ 149 ALIGN_FUNCTION(); \
146 *(.text) 150 *(.text)
147 151
148 /* sched.text is aling to function alignment to secure we have same 152 /* sched.text is aling to function alignment to secure we have same
149 * address even at second ld pass when generating System.map */ 153 * address even at second ld pass when generating System.map */
150 #define SCHED_TEXT \ 154 #define SCHED_TEXT \
151 ALIGN_FUNCTION(); \ 155 ALIGN_FUNCTION(); \
152 VMLINUX_SYMBOL(__sched_text_start) = .; \ 156 VMLINUX_SYMBOL(__sched_text_start) = .; \
153 *(.sched.text) \ 157 *(.sched.text) \
154 VMLINUX_SYMBOL(__sched_text_end) = .; 158 VMLINUX_SYMBOL(__sched_text_end) = .;
155 159
156 /* spinlock.text is aling to function alignment to secure we have same 160 /* spinlock.text is aling to function alignment to secure we have same
157 * address even at second ld pass when generating System.map */ 161 * address even at second ld pass when generating System.map */
158 #define LOCK_TEXT \ 162 #define LOCK_TEXT \
159 ALIGN_FUNCTION(); \ 163 ALIGN_FUNCTION(); \
160 VMLINUX_SYMBOL(__lock_text_start) = .; \ 164 VMLINUX_SYMBOL(__lock_text_start) = .; \
161 *(.spinlock.text) \ 165 *(.spinlock.text) \
162 VMLINUX_SYMBOL(__lock_text_end) = .; 166 VMLINUX_SYMBOL(__lock_text_end) = .;
163 167
164 #define KPROBES_TEXT \ 168 #define KPROBES_TEXT \
165 ALIGN_FUNCTION(); \ 169 ALIGN_FUNCTION(); \
166 VMLINUX_SYMBOL(__kprobes_text_start) = .; \ 170 VMLINUX_SYMBOL(__kprobes_text_start) = .; \
167 *(.kprobes.text) \ 171 *(.kprobes.text) \
168 VMLINUX_SYMBOL(__kprobes_text_end) = .; 172 VMLINUX_SYMBOL(__kprobes_text_end) = .;
169 173
170 /* DWARF debug sections. 174 /* DWARF debug sections.
171 Symbols in the DWARF debugging sections are relative to 175 Symbols in the DWARF debugging sections are relative to
172 the beginning of the section so we begin them at 0. */ 176 the beginning of the section so we begin them at 0. */
173 #define DWARF_DEBUG \ 177 #define DWARF_DEBUG \
174 /* DWARF 1 */ \ 178 /* DWARF 1 */ \
175 .debug 0 : { *(.debug) } \ 179 .debug 0 : { *(.debug) } \
176 .line 0 : { *(.line) } \ 180 .line 0 : { *(.line) } \
177 /* GNU DWARF 1 extensions */ \ 181 /* GNU DWARF 1 extensions */ \
178 .debug_srcinfo 0 : { *(.debug_srcinfo) } \ 182 .debug_srcinfo 0 : { *(.debug_srcinfo) } \
179 .debug_sfnames 0 : { *(.debug_sfnames) } \ 183 .debug_sfnames 0 : { *(.debug_sfnames) } \
180 /* DWARF 1.1 and DWARF 2 */ \ 184 /* DWARF 1.1 and DWARF 2 */ \
181 .debug_aranges 0 : { *(.debug_aranges) } \ 185 .debug_aranges 0 : { *(.debug_aranges) } \
182 .debug_pubnames 0 : { *(.debug_pubnames) } \ 186 .debug_pubnames 0 : { *(.debug_pubnames) } \
183 /* DWARF 2 */ \ 187 /* DWARF 2 */ \
184 .debug_info 0 : { *(.debug_info \ 188 .debug_info 0 : { *(.debug_info \
185 .gnu.linkonce.wi.*) } \ 189 .gnu.linkonce.wi.*) } \
186 .debug_abbrev 0 : { *(.debug_abbrev) } \ 190 .debug_abbrev 0 : { *(.debug_abbrev) } \
187 .debug_line 0 : { *(.debug_line) } \ 191 .debug_line 0 : { *(.debug_line) } \
188 .debug_frame 0 : { *(.debug_frame) } \ 192 .debug_frame 0 : { *(.debug_frame) } \
189 .debug_str 0 : { *(.debug_str) } \ 193 .debug_str 0 : { *(.debug_str) } \
190 .debug_loc 0 : { *(.debug_loc) } \ 194 .debug_loc 0 : { *(.debug_loc) } \
191 .debug_macinfo 0 : { *(.debug_macinfo) } \ 195 .debug_macinfo 0 : { *(.debug_macinfo) } \
192 /* SGI/MIPS DWARF 2 extensions */ \ 196 /* SGI/MIPS DWARF 2 extensions */ \
193 .debug_weaknames 0 : { *(.debug_weaknames) } \ 197 .debug_weaknames 0 : { *(.debug_weaknames) } \
194 .debug_funcnames 0 : { *(.debug_funcnames) } \ 198 .debug_funcnames 0 : { *(.debug_funcnames) } \
195 .debug_typenames 0 : { *(.debug_typenames) } \ 199 .debug_typenames 0 : { *(.debug_typenames) } \
196 .debug_varnames 0 : { *(.debug_varnames) } \ 200 .debug_varnames 0 : { *(.debug_varnames) } \
197 201
198 /* Stabs debugging sections. */ 202 /* Stabs debugging sections. */
199 #define STABS_DEBUG \ 203 #define STABS_DEBUG \
200 .stab 0 : { *(.stab) } \ 204 .stab 0 : { *(.stab) } \
201 .stabstr 0 : { *(.stabstr) } \ 205 .stabstr 0 : { *(.stabstr) } \
202 .stab.excl 0 : { *(.stab.excl) } \ 206 .stab.excl 0 : { *(.stab.excl) } \
203 .stab.exclstr 0 : { *(.stab.exclstr) } \ 207 .stab.exclstr 0 : { *(.stab.exclstr) } \
204 .stab.index 0 : { *(.stab.index) } \ 208 .stab.index 0 : { *(.stab.index) } \
205 .stab.indexstr 0 : { *(.stab.indexstr) } \ 209 .stab.indexstr 0 : { *(.stab.indexstr) } \
206 .comment 0 : { *(.comment) } 210 .comment 0 : { *(.comment) }
207 211
208 #define BUG_TABLE \ 212 #define BUG_TABLE \
209 . = ALIGN(8); \ 213 . = ALIGN(8); \
210 __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \ 214 __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \
211 __start___bug_table = .; \ 215 __start___bug_table = .; \
212 *(__bug_table) \ 216 *(__bug_table) \
213 __stop___bug_table = .; \ 217 __stop___bug_table = .; \
214 } 218 }
215 219
216 #define NOTES \ 220 #define NOTES \
217 .notes : { *(.note.*) } :note 221 .notes : { *(.note.*) } :note
218 222
219 #define INITCALLS \ 223 #define INITCALLS \
220 *(.initcall0.init) \ 224 *(.initcall0.init) \
221 *(.initcall0s.init) \ 225 *(.initcall0s.init) \
222 *(.initcall1.init) \ 226 *(.initcall1.init) \
223 *(.initcall1s.init) \ 227 *(.initcall1s.init) \
224 *(.initcall2.init) \ 228 *(.initcall2.init) \
225 *(.initcall2s.init) \ 229 *(.initcall2s.init) \
226 *(.initcall3.init) \ 230 *(.initcall3.init) \
227 *(.initcall3s.init) \ 231 *(.initcall3s.init) \
228 *(.initcall4.init) \ 232 *(.initcall4.init) \
229 *(.initcall4s.init) \ 233 *(.initcall4s.init) \
230 *(.initcall5.init) \ 234 *(.initcall5.init) \
231 *(.initcall5s.init) \ 235 *(.initcall5s.init) \
232 *(.initcallrootfs.init) \ 236 *(.initcallrootfs.init) \
233 *(.initcall6.init) \ 237 *(.initcall6.init) \
234 *(.initcall6s.init) \ 238 *(.initcall6s.init) \
235 *(.initcall7.init) \ 239 *(.initcall7.init) \
236 *(.initcall7s.init) 240 *(.initcall7s.init)
237 241
238 242