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