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