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