]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/mn10300/kernel/vmlinux.lds.S
MN10300: vmlinux.lds.S cleanup - use PAGE_SIZE, PERCPU macros
[linux-2.6-omap-h63xx.git] / arch / mn10300 / kernel / vmlinux.lds.S
1 /* MN10300 Main kernel linker script
2  *
3  * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4  * Written by David Howells (dhowells@redhat.com)
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public Licence
8  * as published by the Free Software Foundation; either version
9  * 2 of the Licence, or (at your option) any later version.
10  */
11 #define __VMLINUX_LDS__
12 #include <asm-generic/vmlinux.lds.h>
13 #include <asm/thread_info.h>
14 #include <asm/page.h>
15
16 OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin")
17 OUTPUT_ARCH(mn10300)
18 ENTRY(_start)
19 jiffies = jiffies_64;
20 #ifndef CONFIG_MN10300_CURRENT_IN_E2
21 current = __current;
22 #endif
23 SECTIONS
24 {
25   . = CONFIG_KERNEL_TEXT_ADDRESS;
26   /* read-only */
27   _stext = .;
28   _text = .;                    /* Text and read-only data */
29   .text : {
30         *(
31         .text.head
32         .text
33         )
34         TEXT_TEXT
35         SCHED_TEXT
36         LOCK_TEXT
37         KPROBES_TEXT
38         *(.fixup)
39         *(.gnu.warning)
40         } = 0xcb
41
42   _etext = .;                   /* End of text section */
43
44   . = ALIGN(16);                /* Exception table */
45   __start___ex_table = .;
46   __ex_table : { *(__ex_table) }
47   __stop___ex_table = .;
48
49   BUG_TABLE
50
51   RODATA
52
53   /* writeable */
54   .data : {                     /* Data */
55         DATA_DATA
56         CONSTRUCTORS
57         }
58
59   . = ALIGN(PAGE_SIZE);
60   __nosave_begin = .;
61   .data_nosave : { *(.data.nosave) }
62   . = ALIGN(PAGE_SIZE);
63   __nosave_end = .;
64
65   . = ALIGN(PAGE_SIZE);
66   .data.page_aligned : { *(.data.idt) }
67
68   . = ALIGN(32);
69   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
70
71   /* rarely changed data like cpu maps */
72   . = ALIGN(32);
73   .data.read_mostly : AT(ADDR(.data.read_mostly)) {
74         *(.data.read_mostly)
75         _edata = .;             /* End of data section */
76   }
77
78   . = ALIGN(THREAD_SIZE);       /* init_task */
79   .data.init_task : { *(.data.init_task) }
80
81   /* might get freed after init */
82   . = ALIGN(PAGE_SIZE);
83   .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
84         __smp_locks = .;
85         *(.smp_locks)
86         __smp_locks_end = .;
87   }
88
89   /* will be freed after init */
90   . = ALIGN(PAGE_SIZE);         /* Init code and data */
91   __init_begin = .;
92   .init.text : {
93         _sinittext = .;
94         *(.init.text)
95         _einittext = .;
96   }
97   .init.data : { *(.init.data) }
98   . = ALIGN(16);
99   __setup_start = .;
100   .setup.init : { KEEP(*(.init.setup)) }
101   __setup_end = .;
102
103   __initcall_start = .;
104   .initcall.init : {
105         INITCALLS
106   }
107   __initcall_end = .;
108   __con_initcall_start = .;
109   .con_initcall.init : { *(.con_initcall.init) }
110   __con_initcall_end = .;
111
112   SECURITY_INIT
113   . = ALIGN(4);
114   __alt_instructions = .;
115   .altinstructions : { *(.altinstructions) }
116   __alt_instructions_end = .;
117  .altinstr_replacement : { *(.altinstr_replacement) }
118   /* .exit.text is discard at runtime, not link time, to deal with references
119      from .altinstructions and .eh_frame */
120   .exit.text : { *(.exit.text) }
121   .exit.data : { *(.exit.data) }
122
123 #ifdef CONFIG_BLK_DEV_INITRD
124   . = ALIGN(PAGE_SIZE);
125   __initramfs_start = .;
126   .init.ramfs : { *(.init.ramfs) }
127   __initramfs_end = .;
128 #endif
129
130   PERCPU(32)
131   . = ALIGN(PAGE_SIZE);
132   __init_end = .;
133   /* freed after init ends here */
134
135   __bss_start = .;              /* BSS */
136   .bss : {
137         *(.bss.page_aligned)
138         *(.bss)
139   }
140   . = ALIGN(4);
141   __bss_stop = .;
142
143   _end = . ;
144
145   /* This is where the kernel creates the early boot page tables */
146   . = ALIGN(PAGE_SIZE);
147   pg0 = .;
148
149   /* Sections to be discarded */
150   /DISCARD/ : {
151         *(.exitcall.exit)
152         }
153
154   STABS_DEBUG
155
156   DWARF_DEBUG
157 }