clean
[linux-2.4.21-pre4.git] / arch / mips64 / ld.script.elf64
1 OUTPUT_ARCH(mips)
2 ENTRY(kernel_entry)
3 SECTIONS
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(4096);
63   .data.page_aligned : { *(.data.idt) }
64
65   . = ALIGN(32);
66   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
67
68   .fini      : { *(.fini)    } =0
69   .reginfo : { *(.reginfo) }
70   /* Adjust the address for the data segment.  We want to adjust up to
71      the same address within the page on the next page up.  It would
72      be more correct to do this:
73        . = .;
74      The current expression does not correctly handle the case of a
75      text segment ending precisely at the end of a page; it causes the
76      data segment to skip a page.  The above expression does not have
77      this problem, but it will currently (2/95) cause BFD to allocate
78      a single segment, combining both text and data, for this case.
79      This will prevent the text segment from being shared among
80      multiple executions of the program; I think that is more
81      important than losing a page of the virtual address space (note
82      that no actual memory is lost; the page which is skipped can not
83      be referenced).  */
84   . = .;
85   .data    :
86   {
87     _fdata = . ;
88     *(.data)
89     CONSTRUCTORS
90   }
91   .data1   : { *(.data1) }
92   .lit8 : { *(.lit8) }
93   .lit4 : { *(.lit4) }
94   .ctors         : { *(.ctors)   }
95   .dtors         : { *(.dtors)   }
96   .got           : { *(.got.plt) *(.got) }
97   .dynamic       : { *(.dynamic) }
98   /* We want the small data sections together, so single-instruction offsets
99      can access them all, and initialized data all before uninitialized, so
100      we can shorten the on-disk segment size.  */
101   .sdata     : { *(.sdata) }
102   _edata  =  .;
103
104   .sbss      : { *(.sbss) *(.scommon) }
105   .bss       :
106   {
107    *(.dynbss)
108    *(.bss)
109    *(COMMON)
110   _end = . ;
111   }
112
113   /* Sections to be discarded */
114   /DISCARD/ :
115   {
116         *(.text.exit)
117         *(.data.exit)
118         *(.exitcall.exit)
119   }
120
121   /* These are needed for ELF backends which have not yet been
122      converted to the new style linker.  */
123   .stab 0 : { *(.stab) }
124   .stabstr 0 : { *(.stabstr) }
125   /* DWARF debug sections.
126      Symbols in the .debug DWARF section are relative to the beginning of the
127      section so we begin .debug at 0.  It's not clear yet what needs to happen
128      for the others.   */
129   .debug          0 : { *(.debug) }
130   .debug_srcinfo  0 : { *(.debug_srcinfo) }
131   .debug_aranges  0 : { *(.debug_aranges) }
132   .debug_pubnames 0 : { *(.debug_pubnames) }
133   .debug_sfnames  0 : { *(.debug_sfnames) }
134   .line           0 : { *(.line) }
135   /* These must appear regardless of  .  */
136   .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
137   .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
138 }