blob: e830d788c10653a066c1b6eb4693775625887593 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#include <linux/config.h>
2#include <asm-generic/vmlinux.lds.h>
3
4#undef mips /* CPP really sucks for this job */
5#define mips mips
6OUTPUT_ARCH(mips)
7ENTRY(kernel_entry)
8jiffies = JIFFIES;
9SECTIONS
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 *(.data.init_task)
54
55 *(.data)
56
57 /* Align the initial ramdisk image (INITRD) on page boundaries. */
58 . = ALIGN(4096);
59 __rd_start = .;
60 *(.initrd)
61 . = ALIGN(4096);
62 __rd_end = .;
63
64 CONSTRUCTORS
65 }
66 _gp = . + 0x8000;
67 .lit8 : { *(.lit8) }
68 .lit4 : { *(.lit4) }
69 /* We want the small data sections together, so single-instruction offsets
70 can access them all, and initialized data all before uninitialized, so
71 we can shorten the on-disk segment size. */
72 .sdata : { *(.sdata) }
73
74 . = ALIGN(4096);
75 __nosave_begin = .;
76 .data_nosave : { *(.data.nosave) }
77 . = ALIGN(4096);
78 __nosave_end = .;
79
80 . = ALIGN(32);
81 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
82
83 _edata = .; /* End of data section */
84
85 /* will be freed after init */
86 . = ALIGN(4096); /* Init code and data */
87 __init_begin = .;
88 .init.text : {
89 _sinittext = .;
90 *(.init.text)
91 _einittext = .;
92 }
93 .init.data : { *(.init.data) }
94 . = ALIGN(16);
95 __setup_start = .;
96 .init.setup : { *(.init.setup) }
97 __setup_end = .;
98
99 .early_initcall.init : {
100 __earlyinitcall_start = .;
101 *(.initcall.early1.init)
102 }
103 __earlyinitcall_end = .;
104
105 __initcall_start = .;
106 .initcall.init : {
107 *(.initcall1.init)
108 *(.initcall2.init)
109 *(.initcall3.init)
110 *(.initcall4.init)
111 *(.initcall5.init)
112 *(.initcall6.init)
113 *(.initcall7.init)
114 }
115 __initcall_end = .;
116
117 __con_initcall_start = .;
118 .con_initcall.init : { *(.con_initcall.init) }
119 __con_initcall_end = .;
120 SECURITY_INIT
121 . = ALIGN(4096);
122 __initramfs_start = .;
123 .init.ramfs : { *(.init.ramfs) }
124 __initramfs_end = .;
125 . = ALIGN(32);
126 __per_cpu_start = .;
127 .data.percpu : { *(.data.percpu) }
128 __per_cpu_end = .;
129 . = ALIGN(4096);
130 __init_end = .;
131 /* freed after init ends here */
132
133 __bss_start = .; /* BSS */
134 .sbss : {
135 *(.sbss)
136 *(.scommon)
137 }
138 .bss : {
139 *(.bss)
140 *(COMMON)
141 }
142 __bss_stop = .;
143
144 _end = . ;
145
146 /* Sections to be discarded */
147 /DISCARD/ : {
148 *(.exit.text)
149 *(.exit.data)
150 *(.exitcall.exit)
151
152 /* ABI crap starts here */
153 *(.comment)
154 *(.MIPS.options)
155 *(.note)
156 *(.options)
157 *(.pdr)
158 *(.reginfo)
159 *(.mdebug*)
160 }
161
162 /* This is the MIPS specific mdebug section. */
163 .mdebug : { *(.mdebug) }
164 /* These are needed for ELF backends which have not yet been
165 converted to the new style linker. */
166 .stab 0 : { *(.stab) }
167 .stabstr 0 : { *(.stabstr) }
168 /* DWARF debug sections.
169 Symbols in the .debug DWARF section are relative to the beginning of the
170 section so we begin .debug at 0. It's not clear yet what needs to happen
171 for the others. */
172 .debug 0 : { *(.debug) }
173 .debug_srcinfo 0 : { *(.debug_srcinfo) }
174 .debug_aranges 0 : { *(.debug_aranges) }
175 .debug_pubnames 0 : { *(.debug_pubnames) }
176 .debug_sfnames 0 : { *(.debug_sfnames) }
177 .line 0 : { *(.line) }
178 /* These must appear regardless of . */
179 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
180 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
181 .comment : { *(.comment) }
182 .note : { *(.note) }
183}