1OUTPUT_ARCH(mips)
2ENTRY(kernel_entry)
3SECTIONS
4{
5  /* Read-only sections, merged into text segment: */
6  /* . = 0xc000000000000000; */
7
8  /* This is the value for an Origin kernel, taken from an IRIX kernel.  */
9  /* . = 0xc00000000001c000; */
10
11  /* Set the vaddr for the text segment to a value
12        >= 0xa800 0000 0001 9000 if no symmon is going to configured
13        >= 0xa800 0000 0030 0000 otherwise  */
14
15  /* . = 0xa800000000300000; */
16  /* . = 0xa800000000300000; */
17  . = 0xffffffff80300000;
18  .text : {
19    _ftext = .;
20    *(.text)
21    *(.rodata)
22    *(.rodata.*)
23    *(.rodata1)
24    /* .gnu.warning sections are handled specially by elf32.em.  */
25    *(.gnu.warning)
26  } = 0
27  .kstrtab : { *(.kstrtab) }
28
29  . = ALIGN(16);		/* Exception table */
30  __start___ex_table = .;
31  __ex_table : { *(__ex_table) }
32  __stop___ex_table = .;
33
34  __start___dbe_table = .;	/* Exception table for data bus errors */
35  __dbe_table : { *(__dbe_table) }
36  __stop___dbe_table = .;
37
38  __start___ksymtab = .;	/* Kernel symbol table */
39  __ksymtab : { *(__ksymtab) }
40  __stop___ksymtab = .;
41
42  _etext = .;
43
44  . = ALIGN(16384);
45  .data.init_task : { *(.data.init_task) }
46
47  /* Startup code */
48  . = ALIGN(4096);
49  __init_begin = .;
50  .text.init : { *(.text.init) }
51  .data.init : { *(.data.init) }
52  . = ALIGN(16);
53  __setup_start = .;
54  .setup.init : { *(.setup.init) }
55  __setup_end = .;
56  __initcall_start = .;
57  .initcall.init : { *(.initcall.init) }
58  __initcall_end = .;
59  . = ALIGN(4096);	/* Align double page for init_task_union */
60  __init_end = .;
61
62  . = ALIGN(32);
63  .data.cacheline_aligned : { *(.data.cacheline_aligned) }
64
65  .fini      : { *(.fini)    } =0
66  .reginfo : { *(.reginfo) }
67  .options : { *(.options) }
68  .MIPS.options : { *(.MIPS.options) }
69  /* Adjust the address for the data segment.  We want to adjust up to
70     the same address within the page on the next page up.  It would
71     be more correct to do this:
72       . = .;
73     The current expression does not correctly handle the case of a
74     text segment ending precisely at the end of a page; it causes the
75     data segment to skip a page.  The above expression does not have
76     this problem, but it will currently (2/95) cause BFD to allocate
77     a single segment, combining both text and data, for this case.
78     This will prevent the text segment from being shared among
79     multiple executions of the program; I think that is more
80     important than losing a page of the virtual address space (note
81     that no actual memory is lost; the page which is skipped can not
82     be referenced).  */
83  . = .;
84  .data    :
85  {
86    _fdata = . ;
87    *(.data)
88
89    /* Align the initial ramdisk image (INITRD) on page boundaries. */
90    . = ALIGN(4096);
91    __rd_start = .;
92    *(.initrd)
93    . = ALIGN(4096);
94    __rd_end = .;
95
96    CONSTRUCTORS
97  }
98  .data1   : { *(.data1) }
99  .lit8 : { *(.lit8) }
100  .lit4 : { *(.lit4) }
101  .ctors         : { *(.ctors)   }
102  .dtors         : { *(.dtors)   }
103  .got           : { *(.got.plt) *(.got) }
104  .dynamic       : { *(.dynamic) }
105  /* We want the small data sections together, so single-instruction offsets
106     can access them all, and initialized data all before uninitialized, so
107     we can shorten the on-disk segment size.  */
108  .sdata     : { *(.sdata) }
109  _edata  =  .;
110
111  .sbss      : { *(.sbss) *(.scommon) }
112  .bss       :
113  {
114   *(.dynbss)
115   *(.bss)
116   *(COMMON)
117  _end = . ;
118  }
119
120  /* Sections to be discarded */
121  /DISCARD/ :
122  {
123        *(.text.exit)
124        *(.data.exit)
125        *(.exitcall.exit)
126  }
127
128  /* These are needed for ELF backends which have not yet been
129     converted to the new style linker.  */
130  .stab 0 : { *(.stab) }
131  .stabstr 0 : { *(.stabstr) }
132  /* DWARF debug sections.
133     Symbols in the .debug DWARF section are relative to the beginning of the
134     section so we begin .debug at 0.  It's not clear yet what needs to happen
135     for the others.   */
136  .debug          0 : { *(.debug) }
137  .debug_srcinfo  0 : { *(.debug_srcinfo) }
138  .debug_aranges  0 : { *(.debug_aranges) }
139  .debug_pubnames 0 : { *(.debug_pubnames) }
140  .debug_sfnames  0 : { *(.debug_sfnames) }
141  .line           0 : { *(.line) }
142  /* These must appear regardless of  .  */
143  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
144  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
145}
146