]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/kernel.ppc32.ld
adca26216fc854952df9b1c7e4035a30530822b5
[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     __PER_CPU_CTORS_END__ = .;
83     KEEP (*(.ctors.00010))
84     KEEP (*(.ctors.00009))
85     KEEP (*(.ctors.00008))
86     KEEP (*(.ctors.00007))
87     KEEP (*(.ctors.00006))
88     KEEP (*(.ctors.00005))
89     KEEP (*(.ctors.00004))
90     KEEP (*(.ctors.00003))
91     KEEP (*(.ctors.00002))
92     KEEP (*(.ctors.00001))
93     __PER_CPU_CTORS_LIST__ = .;
94
95     __CTOR_END__ = .;
96     CONSTRUCTORS
97     KEEP (*(.ctors))
98     KEEP (*(SORT (.ctors.*)))
99     __CTOR_LIST__ = .;
100
101     __DTOR_END__ = .;    
102     KEEP (*(SORT (.dtors.*)))
103     KEEP (*(.dtors))
104     __DTOR_LIST__ = .;
105
106     PROVIDE (_edata = .);
107   } : kdata
108
109   . = ALIGN(8);
110   .per_cpu_data : AT (ADDR(.per_cpu_data)) {
111     PROVIDE (_per_cpu_data_start = .);
112     *(.per_cpu.data)
113     . = ALIGN(8);
114     PROVIDE (_per_cpu_data_end = .);
115   } : kdata
116
117   . = ALIGN(0x10);
118   .bss : AT (ADDR(.bss)) {
119     PROVIDE (_bss_start = .);
120     *(.bss .bss.* .gnu.linkonce.b.* COMMON)
121     PROVIDE (_bss_end = .);
122   } : kdata
123
124   . = ALIGN(4K);
125   PROVIDE (_end = .);
126
127   .initcall.text : AT (ADDR(.initcall.text)) {
128   PROVIDE (_initcall_start = .);
129     *(.initcall.text*)
130   } : kitext = 0x000000000
131
132   .initcall.data : AT (ADDR(.initcall.data)) {
133     *(.initcall.data*)
134     . = ALIGN(4K);
135     PROVIDE (_initcall_end = .);
136   } : kidata
137
138   /DISCARD/ : {
139     *(.note)
140     *(.note.ABI-tag)
141     *(.comment)
142     *(.eh_frame)
143     *(.dummy)
144   }
145 }