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