Import changeset
[linux-flexiantxendom0-3.2.10.git] / arch / mips / ld.script.little
1 OUTPUT_FORMAT("elf32-littlemips")
2 OUTPUT_ARCH(mips)
3 ENTRY(kernel_entry)
4 SECTIONS
5 {
6   /* Read-only sections, merged into text segment: */
7   . = 0x80000000;
8   .init          : { *(.init)           } =0
9   .text      :
10   {
11     _ftext = . ;
12     *(.text)
13     *(.rodata)
14     *(.rodata1)
15     /* .gnu.warning sections are handled specially by elf32.em.  */
16     *(.gnu.warning)
17   } =0
18   _etext = .;
19   PROVIDE (etext = .);
20
21   . = ALIGN(8192);
22   .data.init_task : { *(.data.init_task) }
23
24   /* Startup code */
25   . = ALIGN(4096);
26   __init_begin = .;
27   .text.init : { *(.text.init) }
28   .data.init : { *(.data.init) }
29   . = ALIGN(16);
30   __setup_start = .;
31   .setup.init : { *(.setup.init) }
32   __setup_end = .;
33   __initcall_start = .;
34   .initcall.init : { *(.initcall.init) }
35   __initcall_end = .;
36   . = ALIGN(4096);      /* Align double page for init_task_union */
37   __init_end = .;
38
39   . = ALIGN(4096);
40   .data.page_aligned : { *(.data.idt) }
41
42   . = ALIGN(32);
43   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
44
45   .fini      : { *(.fini)    } =0
46   .reginfo : { *(.reginfo) }
47   /* Adjust the address for the data segment.  We want to adjust up to
48      the same address within the page on the next page up.  It would
49      be more correct to do this:
50        . = .;
51      The current expression does not correctly handle the case of a
52      text segment ending precisely at the end of a page; it causes the
53      data segment to skip a page.  The above expression does not have
54      this problem, but it will currently (2/95) cause BFD to allocate
55      a single segment, combining both text and data, for this case.
56      This will prevent the text segment from being shared among
57      multiple executions of the program; I think that is more
58      important than losing a page of the virtual address space (note
59      that no actual memory is lost; the page which is skipped can not
60      be referenced).  */
61   . = .;
62   .data    :
63   {
64     _fdata = . ;
65     *(.data)
66     CONSTRUCTORS
67   }
68   .data1   : { *(.data1) }
69   _gp = . + 0x8000;
70   .lit8 : { *(.lit8) }
71   .lit4 : { *(.lit4) }
72   .ctors         : { *(.ctors)   }
73   .dtors         : { *(.dtors)   }
74   .got           : { *(.got.plt) *(.got) }
75   .dynamic       : { *(.dynamic) }
76   /* We want the small data sections together, so single-instruction offsets
77      can access them all, and initialized data all before uninitialized, so
78      we can shorten the on-disk segment size.  */
79   .sdata     : { *(.sdata) }
80   _edata  =  .;
81   PROVIDE (edata = .);
82
83   __bss_start = .;
84   _fbss = .;
85   .sbss      : { *(.sbss) *(.scommon) }
86   .bss       :
87   {
88    *(.dynbss)
89    *(.bss)
90    *(COMMON)
91   _end = . ;
92   PROVIDE (end = .);
93   }
94
95   /* Sections to be discarded */
96   /DISCARD/ : 
97   {
98         *(.text.exit)
99         *(.data.exit)
100         *(.exitcall.exit)
101   }
102
103   /* These are needed for ELF backends which have not yet been
104      converted to the new style linker.  */
105   .stab 0 : { *(.stab) }
106   .stabstr 0 : { *(.stabstr) }
107   /* DWARF debug sections.
108      Symbols in the .debug DWARF section are relative to the beginning of the
109      section so we begin .debug at 0.  It's not clear yet what needs to happen
110      for the others.   */
111   .debug          0 : { *(.debug) }
112   .debug_srcinfo  0 : { *(.debug_srcinfo) }
113   .debug_aranges  0 : { *(.debug_aranges) }
114   .debug_pubnames 0 : { *(.debug_pubnames) }
115   .debug_sfnames  0 : { *(.debug_sfnames) }
116   .line           0 : { *(.line) }
117   /* These must appear regardless of  .  */
118   .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
119   .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
120 }