1#include <asm/asm-offsets.h>
2#include <asm-generic/vmlinux.lds.h>
3
4#undef mips
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_TEXT
31    SCHED_TEXT
32    LOCK_TEXT
33    *(.fixup)
34    *(.gnu.warning)
35  } =0
36
37  . = ALIGN(32);
38  __fastpath_begin = .;
39  .text.fastpath : { *(.text.fastpath) }
40  __fastpath_end = .;
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  __start___dbe_table = .;	/* Exception table for data bus errors */
50  __dbe_table : { *(__dbe_table) }
51  __stop___dbe_table = .;
52
53  RODATA
54
55  /* writeable */
56  .data : {			/* Data */
57    . = . + DATAOFFSET;		/* for CONFIG_MAPPED_KERNEL */
58    . = ALIGN(_PAGE_SIZE);
59    *(.data.init_task)
60
61    DATA_DATA
62
63    CONSTRUCTORS
64  }
65  _gp = . + 0x8000;
66  .lit8 : { *(.lit8) }
67  .lit4 : { *(.lit4) }
68  /* We want the small data sections together, so single-instruction offsets
69     can access them all, and initialized data all before uninitialized, so
70     we can shorten the on-disk segment size.  */
71  .sdata     : { *(.sdata) }
72
73  . = ALIGN(_PAGE_SIZE);
74  __nosave_begin = .;
75  .data_nosave : { *(.data.nosave) }
76  . = ALIGN(_PAGE_SIZE);
77  __nosave_end = .;
78
79  . = ALIGN(32);
80  .data.cacheline_aligned : { *(.data.cacheline_aligned) }
81
82  _edata =  .;			/* End of data section */
83
84  /* will be freed after init */
85  . = ALIGN(_PAGE_SIZE);		/* Init code and data */
86  __init_begin = .;
87  .init.text : {
88	_sinittext = .;
89	*(.init.text)
90	_einittext = .;
91  }
92  .init.data : { *(.init.data) }
93  . = ALIGN(16);
94  __setup_start = .;
95  .init.setup : { *(.init.setup) }
96  __setup_end = .;
97
98  __initcall_start = .;
99  .initcall.init : {
100	INITCALLS
101  }
102  __initcall_end = .;
103
104  __con_initcall_start = .;
105  .con_initcall.init : { *(.con_initcall.init) }
106  __con_initcall_end = .;
107  SECURITY_INIT
108    /* .exit.text is discarded at runtime, not link time, to deal with
109     references from .rodata */
110  .exit.text : { *(.exit.text) }
111  .exit.data : { *(.exit.data) }
112#if defined(CONFIG_BLK_DEV_INITRD)
113  . = ALIGN(_PAGE_SIZE);
114  __initramfs_start = .;
115  .init.ramfs : { *(.init.ramfs) }
116  __initramfs_end = .;
117#endif
118  . = ALIGN(_PAGE_SIZE);
119  __per_cpu_start = .;
120  .data.percpu  : { *(.data.percpu) }
121  __per_cpu_end = .;
122  . = ALIGN(_PAGE_SIZE);
123  __init_end = .;
124  /* freed after init ends here */
125
126  __bss_start = .;		/* BSS */
127  .sbss      : {
128    *(.sbss)
129    *(.scommon)
130  }
131  .bss : {
132    *(.bss)
133    *(COMMON)
134  }
135  __bss_stop = .;
136
137  _end = . ;
138
139  /* Sections to be discarded */
140  /DISCARD/ : {
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}
165