]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/bootstrap/server/src/ARCH-ppc32/bootstrap.ld.in
update
[l4.git] / l4 / pkg / bootstrap / server / src / ARCH-ppc32 / bootstrap.ld.in
1
2 #include "ldscript.inc"
3
4 OUTPUT_FORMAT("elf32-powerpc", "elf32-big",
5               "elf32-little")
6 ENTRY(_start)
7
8 PHDRS {
9   text PT_LOAD;
10   data PT_LOAD;
11   mods PT_LOAD;
12 }
13
14 SECTIONS
15 {
16   /* Read-only sections, merged into text segment. The start address of
17    * the text segment is : */
18   . = LINKADDR;
19   .text :
20   {
21     . = ALIGN(4);
22     _stext = .;
23     *(.text.init) 
24     *(.init)
25     *(.text .text.* .gnu.linkonce.t.*)
26     *(.glue_7t) *(.glue_7)
27     KEEP (*(.fini))
28     LONG(0xc3)  /* terminate .fini */
29     . = ALIGN(0x40);
30     *(.rodata .rodata.* .gnu.linkonce.r.* .rodata1)
31   } : text
32
33   _etext = .;
34   PROVIDE (etext = .);
35
36   /* ensure that data starts at a new L4 page */
37   . = ALIGN(4096);
38   .data :
39   {
40     *(.data .data.* .gnu.linkonce.d.*)
41     *(.anno)
42
43     CTORS
44     PLATFORMS
45
46     . = ALIGN(4);
47     _module_info_start = .;
48     *(.module_info)
49     _module_info_end   = .;
50
51     . = ALIGN(4096);
52     _modules_start = .;
53     *(.module.data)
54     . = ALIGN(4096);
55     _modules_end   = .;
56   } : data
57   /* exception frames for C++ */
58   .eh_frame : 
59   { 
60     KEEP (*(.eh_frame)) 
61     LONG(0) /* terminate .eh_frame */
62   } : data
63
64   . = ALIGN(4);
65   _edata  =  .;
66   PROVIDE (edata = .);
67
68   _bss_start = .;
69   .bss :
70   {
71    *(.dynbss)
72    *(.bss .gnu.linkonce.b.*)
73    *(COMMON)
74   } : data
75   _bss_end = .;
76   _end = . ;
77   PROVIDE (end = .);
78
79   /* Moved here to ensure that these sections are located _after_ the text
80    * section. In the other case we would get program sections with a virtual
81    * address of 0 */
82   .hash    : { *(.hash)    }
83   .dynsym  : { *(.dynsym)  }
84   .dynstr  : { *(.dynstr)  }
85   .rel.dyn : { *(.rel.dyn) }
86
87 /* Only move modules to modaddr if bootstrap is being loaded by an elf
88  * loader, and we do not need to copy images around at runtime (e.g. with
89  * compression) */
90 #if defined(PLACE_MODULES_AT_MODADDR) && !defined(SINGLE_SECTION)
91   . = MODADDR;
92 #else
93   . = ALIGN(4096);
94 #endif
95   _module_data_start = .;
96   .module_data : { *(.module_data) } : mods
97   _module_data_end = .;
98
99   /* drop the following sections since we do not need them for DROPS */
100   /DISCARD/ : {
101     *(.interp)
102     *(.comment)
103     *(.note)
104     *(.stab)
105     *(.stabstr*)
106   } 
107 }
108