2f4508f55fcaf2673ecceaa7f061177825c5dcac
[deliverable/linux.git] / arch / mips / kernel / vmlinux.lds.S
1 #include <asm/asm-offsets.h>
2 #include <asm-generic/vmlinux.lds.h>
3
4 #undef mips
5 #define mips mips
6 OUTPUT_ARCH(mips)
7 ENTRY(kernel_entry)
8 jiffies = JIFFIES;
9 SECTIONS
10 {
11 #ifdef CONFIG_BOOT_ELF64
12 /* Read-only sections, merged into text segment: */
13 /* . = 0xc000000000000000; */
14
15 /* This is the value for an Origin kernel, taken from an IRIX kernel. */
16 /* . = 0xc00000000001c000; */
17
18 /* Set the vaddr for the text segment to a value
19 >= 0xa800 0000 0001 9000 if no symmon is going to configured
20 >= 0xa800 0000 0030 0000 otherwise */
21
22 /* . = 0xa800000000300000; */
23 /* . = 0xa800000000300000; */
24 . = 0xffffffff80300000;
25 #endif
26 . = LOADADDR;
27 /* read-only */
28 _text = .; /* Text and read-only data */
29 .text : {
30 *(.text)
31 SCHED_TEXT
32 LOCK_TEXT
33 *(.fixup)
34 *(.gnu.warning)
35 } =0
36
37 _etext = .; /* End of text section */
38
39 . = ALIGN(16); /* Exception table */
40 __start___ex_table = .;
41 __ex_table : { *(__ex_table) }
42 __stop___ex_table = .;
43
44 __start___dbe_table = .; /* Exception table for data bus errors */
45 __dbe_table : { *(__dbe_table) }
46 __stop___dbe_table = .;
47
48 RODATA
49
50 /* writeable */
51 .data : { /* Data */
52 . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */
53 /*
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
56 * warning:
57 *
58 * CC arch/mips/kernel/init_task.o
59 * arch/mips/kernel/init_task.c:30: warning: alignment of ‘init_thread_union’
60 * is greater than maximum object file alignment. Using 32768
61 */
62 . = ALIGN(_PAGE_SIZE);
63 *(.data.init_task)
64
65 *(.data)
66
67 CONSTRUCTORS
68 }
69 _gp = . + 0x8000;
70 .lit8 : { *(.lit8) }
71 .lit4 : { *(.lit4) }
72 /* We want the small data sections together, so single-instruction offsets
73 can access them all, and initialized data all before uninitialized, so
74 we can shorten the on-disk segment size. */
75 .sdata : { *(.sdata) }
76
77 . = ALIGN(_PAGE_SIZE);
78 __nosave_begin = .;
79 .data_nosave : { *(.data.nosave) }
80 . = ALIGN(_PAGE_SIZE);
81 __nosave_end = .;
82
83 . = ALIGN(32);
84 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
85
86 _edata = .; /* End of data section */
87
88 /* will be freed after init */
89 . = ALIGN(_PAGE_SIZE); /* Init code and data */
90 __init_begin = .;
91 .init.text : {
92 _sinittext = .;
93 *(.init.text)
94 _einittext = .;
95 }
96 .init.data : { *(.init.data) }
97 . = ALIGN(16);
98 __setup_start = .;
99 .init.setup : { *(.init.setup) }
100 __setup_end = .;
101
102 __initcall_start = .;
103 .initcall.init : {
104 INITCALLS
105 }
106 __initcall_end = .;
107
108 __con_initcall_start = .;
109 .con_initcall.init : { *(.con_initcall.init) }
110 __con_initcall_end = .;
111 SECURITY_INIT
112 . = ALIGN(_PAGE_SIZE);
113 __initramfs_start = .;
114 .init.ramfs : { *(.init.ramfs) }
115 __initramfs_end = .;
116 . = ALIGN(32);
117 __per_cpu_start = .;
118 .data.percpu : { *(.data.percpu) }
119 __per_cpu_end = .;
120 . = ALIGN(_PAGE_SIZE);
121 __init_end = .;
122 /* freed after init ends here */
123
124 __bss_start = .; /* BSS */
125 .sbss : {
126 *(.sbss)
127 *(.scommon)
128 }
129 .bss : {
130 *(.bss)
131 *(COMMON)
132 }
133 __bss_stop = .;
134
135 _end = . ;
136
137 /* Sections to be discarded */
138 /DISCARD/ : {
139 *(.exit.text)
140 *(.exit.data)
141 *(.exitcall.exit)
142
143 /* ABI crap starts here */
144 *(.comment)
145 *(.MIPS.options)
146 *(.note)
147 *(.options)
148 *(.pdr)
149 *(.reginfo)
150 *(.mdebug*)
151 }
152
153 /* This is the MIPS specific mdebug section. */
154 .mdebug : { *(.mdebug) }
155
156 STABS_DEBUG
157
158 DWARF_DEBUG
159
160 /* These must appear regardless of . */
161 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
162 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
163 .note : { *(.note) }
164 }
This page took 0.034521 seconds and 4 git commands to generate.