]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/kernel.sparc.ld
update
[l4.git] / kernel / fiasco / src / kernel.sparc.ld
1 /* -*- c -*- */
2
3 ENTRY(_start)
4
5 PHDRS {
6   etext PT_LOAD;
7   etextcommon PT_LOAD;
8   phys PT_LOAD;
9   kip PT_LOAD;
10   koptions PT_LOAD;
11   ktext PT_LOAD;
12   kdata PT_LOAD;
13   kitext PT_LOAD;
14   kidata PT_LOAD;
15 }
16
17 SECTIONS {
18   . = kernel_load_addr + 0x1000;
19   /* 0x0 */
20   .except : AT (0x0) {
21      *(.except)
22   } : etext = 0x0
23   . = ALIGN(4K) + 8K;
24
25   /* 0x3000 */
26   PROVIDE (_kernel_image_start = .);
27   .physmem : AT(ADDR(.physmem)) {
28   } : phys = 0x0
29
30   .kip : AT(ADDR(.kip)) {
31     *(.kernel_info_page)
32     _initkip_start = .;
33     KEEP(*(.initkip.version))
34     KEEP(*(.initkip.features))
35     KEEP(*(.initkip.features.fini))
36     _initkip_end = .;
37     . = ALIGN(4K);
38   } : kip = 0
39
40   .koptions : AT (ADDR(.koptions)) {
41     *(.koptions)
42   } : koptions = 0
43
44   .mp_tramp : AT (ADDR(.mp_tramp)) {
45       KEEP(*(.mp_tramp))
46   }
47
48   .exceptcommon : AT(ADDR(.exceptcommon)) {
49     *(.exceptcommon)
50   } : etextcommon = 0x0
51
52   .text : AT (ADDR(.text)) {
53     crt0.o(.text)
54     *(.init)
55     *(.text SORT(.text.*) .gnu.linkonce.t.*)
56     *(.fini)
57
58     PROVIDE (_ecode = .);
59
60     *(.rodata .rodata.* .gnu.linkonce.r.*)
61
62     . = ALIGN(4);
63     PROVIDE (_log_table = .);
64     /*
65      * The section must start with ".debug" because else the linker
66      * complains about references to discarded sections
67       */
68     KEEP(*(SORT(.debug.jdb.log_table)))
69     PROVIDE (_log_table_end = .);
70
71     . = ALIGN(0x40);
72
73     PROVIDE (_etext = .);
74   } : ktext = 0x0000000
75
76   . = ALIGN(0x10);
77   .data : AT (ADDR(.data)) {
78     *(.data .data.* .gnu.linkonce.d.*)
79     *(.anno)
80
81     /* Constructor and destructor lists, ordered by priority.  The lists
82        are traversed from end to start, therefore the *_END__ symbols
83        precede the *_LIST__ symbols. */
84     . = ALIGN(8);
85     __PER_CPU_INIT_ARRAY_START__ = .;
86     KEEP (*(.init_array.65534))
87     KEEP (*(.init_array.65533))
88     KEEP (*(.init_array.65532))
89     KEEP (*(.init_array.65531))
90     KEEP (*(.init_array.65530))
91     KEEP (*(.init_array.65529))
92     KEEP (*(.init_array.65528))
93     KEEP (*(.init_array.65527))
94     KEEP (*(.init_array.65526))
95     KEEP (*(.init_array.65525))
96     __PER_CPU_INIT_ARRAY_END__ = .;
97
98     __PER_CPU_LATE_INIT_ARRAY_START__ = .;
99     KEEP (*(.init_array.65524))
100     KEEP (*(.init_array.65523))
101     KEEP (*(.init_array.65522))
102     KEEP (*(.init_array.65521))
103     KEEP (*(.init_array.65520))
104     KEEP (*(.init_array.65519))
105     KEEP (*(.init_array.65518))
106     KEEP (*(.init_array.65517))
107     KEEP (*(.init_array.65516))
108     KEEP (*(.init_array.65515))
109     __PER_CPU_LATE_INIT_ARRAY_END__ = .;
110
111     __INIT_ARRAY_START__ = .;
112     KEEP (*(SORT (.init_array.*)))
113     KEEP (*(.init_array))
114     __INIT_ARRAY_END__ = .;
115
116     __PER_CPU_CTORS_END__ = .;
117     KEEP (*(.ctors.00010))
118     KEEP (*(.ctors.00009))
119     KEEP (*(.ctors.00008))
120     KEEP (*(.ctors.00007))
121     KEEP (*(.ctors.00006))
122     KEEP (*(.ctors.00005))
123     KEEP (*(.ctors.00004))
124     KEEP (*(.ctors.00003))
125     KEEP (*(.ctors.00002))
126     KEEP (*(.ctors.00001))
127     __PER_CPU_CTORS_LIST__ = .;
128
129     __PER_CPU_LATE_CTORS_END__ = .;
130     KEEP (*(.ctors.00020))
131     KEEP (*(.ctors.00019))
132     KEEP (*(.ctors.00018))
133     KEEP (*(.ctors.00017))
134     KEEP (*(.ctors.00016))
135     KEEP (*(.ctors.00015))
136     KEEP (*(.ctors.00014))
137     KEEP (*(.ctors.00013))
138     KEEP (*(.ctors.00012))
139     KEEP (*(.ctors.00011))
140     __PER_CPU_LATE_CTORS_LIST__ = .;
141
142     __CTOR_END__ = .;
143     CONSTRUCTORS
144     KEEP (*(.ctors))
145     KEEP (*(SORT (.ctors.*)))
146     __CTOR_LIST__ = .;
147
148     __DTOR_END__ = .;    
149     KEEP (*(SORT (.dtors.*)))
150     KEEP (*(.dtors))
151     __DTOR_LIST__ = .;
152
153     PROVIDE (_edata = .);
154   } : kdata
155
156   . = ALIGN(8);
157   .per_cpu_data : AT (ADDR(.per_cpu_data)) {
158     PROVIDE (_per_cpu_data_start = .);
159     *(.per_cpu.data)
160     . = ALIGN(8);
161     PROVIDE (_per_cpu_data_end = .);
162   } : kdata
163
164   . = ALIGN(0x10);
165   .bss : AT (ADDR(.bss)) {
166     PROVIDE (_bss_start = .);
167     . = ALIGN(4);
168     _per_cpu_ctor_data_start = .;
169     KEEP (*(.bss.per_cpu_ctor_data))
170     _per_cpu_ctor_data_end = .;
171
172     *(.bss .bss.* .gnu.linkonce.b.* COMMON)
173     PROVIDE (_bss_end = .);
174   } : kdata
175
176   . = ALIGN(4K);
177   PROVIDE (_end = .);
178
179   .initcall.text : AT (ADDR(.initcall.text)) {
180   PROVIDE (_initcall_start = .);
181     *(.initcall.text*)
182   } : kitext = 0x000000000
183
184   .initcall.data : AT (ADDR(.initcall.data)) {
185     *(.initcall.data*)
186     . = ALIGN(4K);
187     PROVIDE (_initcall_end = .);
188   } : kidata
189
190   /DISCARD/ : {
191     *(.note)
192     *(.note.ABI-tag)
193     *(.comment)
194     *(.eh_frame)
195     *(.dummy)
196   }
197 }