]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/moe/server/src/main.ld
update
[l4.git] / l4 / pkg / moe / server / src / main.ld
1 /* -*- Makefile -*- */
2 ENTRY(_real_start)
3
4
5 SECTIONS
6 {
7   /* No program code/data before _stext/_prog_img_start! */
8
9   /* Read-only sections, merged into text segment. The start address of
10    * the text segment is : */
11
12   .text :
13   {
14     _stext = .;
15     *(.text .text.* .gnu.linkonce.t.*)
16     KEEP (*(.text.*personality*))
17     KEEP (*(.init))
18     KEEP (*(.fini))
19     *(.rodata .rodata.* .gnu.linkonce.r.*)
20     . = ALIGN(0x1000);
21     _etext = .;
22     PROVIDE (etext = .); /* don't fail if user defines this symbol */
23   } = 0x9090
24
25   /* Linux: exception section for uaccess mechanism */
26   __ex_table :
27   {
28     *(__ex_table)
29   } 
30
31   .ARM.extab      : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
32   __exidx_start = .;
33   .ARM.exidx      : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
34   __exidx_end = .;
35
36   .eh_frame_hdr : { *(.eh_frame_hdr) }
37
38   /* exception frames for C++ */
39   .eh_frame : 
40   {
41     PROVIDE(__eh_frame_start__ = .);
42     KEEP (*(.eh_frame))
43     KEEP (*(.eh_frame_terminator))
44   }
45
46   .gcc_except_table   : { *(.gcc_except_table .gcc_except_table.*) }
47   /* ensure that data starts at a new L4 page */
48   . = ALIGN(0x1000);
49   .data :
50   {
51     *(.data .data.* .gnu.linkonce.d.*)
52     KEEP (*(.gnu.linkonce.d.*personality*))    
53   } 
54   
55   .ctors :
56   {
57     /*KEEP (*(.mark_beg_ctors))*/
58     /* gcc uses crtbegin.o to find the start of
59        the constructors, so we make sure it is
60        first.  Because this is a wildcard, it
61        doesn't matter if the user does not
62        actually link against crtbegin.o; the
63        linker won't look for a file to match a
64        wildcard.  The wildcard also means that it
65        doesn't matter which directory crtbegin.o
66        is in.  */
67     KEEP (*crtbegin.o(.ctors))
68     KEEP (*crtbegin?.o(.ctors))
69     /* We don't want to include the .ctor section from
70        the crtend.o file until after the sorted ctors.
71        The .ctor section from the crtend file contains the
72        end of ctors marker and it must be last */
73     KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
74     KEEP (*(SORT(.ctors.*)))
75     KEEP (*(.ctors))
76     /*
77     KEEP (*(.mark_end_ctors))
78
79     KEEP (*(.mark_beg_c_ctors))
80     KEEP (*(SORT(.c_ctors.?)))
81     KEEP (*(SORT(.c_ctors.??)))
82     KEEP (*(SORT(.c_ctors.???)))
83     KEEP (*(SORT(.c_ctors.????)))
84     KEEP (*(SORT(.c_ctors.?????)))
85     KEEP (*(.c_ctors))
86     KEEP (*(.mark_end_c_ctors))
87     */
88   }
89   .dtors :
90   {
91   /*
92     KEEP (*(.mark_beg_dtors))*/
93     KEEP (*crtbegin.o(.dtors))
94     KEEP (*crtbegin?.o(.dtors))
95     KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
96     KEEP (*(SORT(.dtors.*)))
97     KEEP (*(.dtors))
98     /*
99     KEEP (*(.mark_end_dtors))
100
101     KEEP (*(.mark_beg_c_dtors))
102     KEEP (*(SORT(.c_dtors.?)))
103     KEEP (*(SORT(.c_dtors.??)))
104     KEEP (*(SORT(.c_dtors.???)))
105     KEEP (*(SORT(.c_dtors.????)))
106     KEEP (*(SORT(.c_dtors.?????)))
107     KEEP (*(.c_dtors))
108     KEEP (*(.mark_end_c_dtors))*/
109   }
110   .preinit_array     :
111   {
112     PROVIDE_HIDDEN (__preinit_array_start = .);
113     KEEP (*(.preinit_array))
114     PROVIDE_HIDDEN (__preinit_array_end = .);
115   }
116   .init_array     :
117   {
118      PROVIDE_HIDDEN (__init_array_start = .);
119      KEEP (*(SORT(.init_array.*)))
120      KEEP (*(.init_array))
121      PROVIDE_HIDDEN (__init_array_end = .);
122   }
123   .fini_array     :
124   {
125     PROVIDE_HIDDEN (__fini_array_start = .);
126     KEEP (*(.fini_array))
127     KEEP (*(SORT(.fini_array.*)))
128     PROVIDE_HIDDEN (__fini_array_end = .);
129   }
130
131   .dynamic :  { *(.dynamic) }
132
133   __alt_instructions = .;
134   .altinstructions : { *(.altinstructions) }
135   __alt_instructions_end = .;
136   .altinstr_replacement : { *(.altinstr_replacement) }
137
138   .got : { *(.got.plt) *(.got) } 
139
140   _edata = .;
141   PROVIDE (edata = .); /* don't fail if user defines this symbol */
142
143   __bss_start = .;
144   .bss :
145   {
146    *(.dynbss)
147    *(.bss .bss.* .gnu.linkonce.b.*)
148    *(COMMON)
149    _end = .;
150    PROVIDE (end = .); /* don't fail if user defines this symbol */
151    *(.rospace)
152   }
153
154   /* Moved here to ensure that these sections are located _after_ the text
155    * section. In the other case we would get program sections with a virtual
156    * address of 0 */
157   .hash    : { *(.hash)    }
158   .dynsym  : { *(.dynsym)  }
159   .dynstr  : { *(.dynstr)  }
160   .rel.dyn : { *(.rel.dyn) }
161   .rel.bss : { *(.rel.bss) }
162   .rel.plt : { *(.rel.plt) }
163
164   /* drop the following sections since we don't need them for DROPS */
165   /DISCARD/ : {
166     *(.interp)
167     *(.comment)
168     *(.note)
169     *(.note.*)
170   }
171 }
172