source: rtems/c/src/lib/libbsp/powerpc/qemuppc/startup/linkcmds @ 133bffb

4.104.115
Last change on this file since 133bffb was 133bffb, checked in by Thomas Doerfler <Thomas.Doerfler@…>, on 10/06/09 at 19:56:07

various changes

  • Property mode set to 100644
File size: 4.7 KB
Line 
1OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
2              "elf32-powerpc")
3OUTPUT_ARCH(powerpc:common)
4ENTRY(_start)
5MEMORY
6  {
7        RAM       : ORIGIN = 0, LENGTH = 4M
8        ROM       : ORIGIN = 0xFFFC0000, LENGTH = 0x40000
9        VECTORS   : ORIGIN = 0xFFF00000, LENGTH = 0x20000
10        RESET     : ORIGIN = 0xFFFFFFFC, LENGTH = 0x4
11  }
12
13RamBase = DEFINED(RamBase) ? RamBase : 0x0;
14RamSize = DEFINED(RamSize) ? RamSize : 4M;
15HeapSize = DEFINED(HeapSize) ? HeapSize : 0;
16
17bsp_section_align = 32;
18
19SECTIONS
20{
21  /* Read-only sections, merged into text segment: */
22  . = 0xfffc0000;
23/*
24  .entry_point_section :
25  {
26  } =0
27*/
28
29  .text           :
30  {
31    *(.entry_point_section)
32    *(.text .text.* .gnu.linkonce.t.*)
33    *(.eh_frame_hdr*)
34    *(.eh_frame*)
35
36    /*
37     * Special FreeBSD sysctl sections.
38     */
39    . = ALIGN (16);
40    __start_set_sysctl_set = .;
41    *(set_sysctl_*);
42    __stop_set_sysctl_set = ABSOLUTE(.);
43    *(set_domain_*);
44    *(set_pseudo_*);
45
46    /* .gnu.warning sections are handled specially by elf32.em.  */
47    *(.gnu.warning)
48    . = ALIGN (bsp_section_align);
49    __text_end = .;
50  } >ROM =0
51  .init           :
52  {
53    KEEP (*(.init))
54  } >ROM =0
55  .fini           :
56  {
57    _fini = .;
58    KEEP (*(.fini))
59  } >ROM =0
60
61  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
62     get relocated with -mrelocatable. Also put in the .fixup pointers.
63     The current compiler no longer needs this, but keep it around for 2.7.2  */
64   PROVIDE (__GOT2_START__ = .);
65   PROVIDE (_GOT2_START_ = .);
66  .got2           :  { *(.got2)         } >ROM =0
67  PROVIDE (__GOT2_END__ = .);
68  PROVIDE (_GOT2_END_ = .);
69
70  PROVIDE (__CTOR_LIST__ = .);
71  .ctors          : { *(.ctors)         } >ROM =0
72  PROVIDE (__CTOR_END__ = .);
73
74  PROVIDE (__DTOR_LIST__ = .);
75  .dtors          : { *(.dtors)         } >ROM =0
76  PROVIDE (__DTOR_END__ = .);
77  .jcr            : { KEEP (*(.jcr))    } > ROM =0
78
79  .rodata :
80  {
81    *(.rodata .rodata.* .gnu.linkonce.r.*)
82    *(.rodata1)
83    . = ALIGN (bsp_section_align);
84    __rodata_end = .;
85  } >ROM =0
86
87  .vectors :
88  {
89    . = . + 0x2000; /* skip vector area */
90  } >RAM
91
92  __sdata2_load = __rodata_end;
93  .sdata2 : AT (__sdata2_load)
94  {
95    __sdata2_start = .;
96    PROVIDE (_SDA2_BASE_ = 32768);
97    *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
98    . = ALIGN (bsp_section_align);
99    __sdata2_end = .;
100  } >RAM
101  .sbss2 :
102  {
103    __sbss2_start = .;
104    *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
105    . = ALIGN (bsp_section_align);
106    __sbss2_end = .;
107  } >RAM
108  __data_load = __sdata2_load + SIZEOF (.sdata2);
109  .data : AT(__data_load)
110  {
111    __data_start = .;
112    *(.data .data.* .gnu.linkonce.d.*)
113    KEEP (*(.gnu.linkonce.d.*personality*))
114    SORT(CONSTRUCTORS)
115    *(.data1)
116    . = ALIGN (bsp_section_align);
117    __data_end = .;
118  } >RAM
119  __sdata_load = __data_load + SIZEOF (.data);
120  .sdata : AT(__sdata_load) {
121    __sdata_start = .;
122    PROVIDE (_SDA_BASE_ = 32768);
123    *(.sdata .sdata.* .gnu.linkonce.s.*)
124
125    . = ALIGN (bsp_section_align);
126
127    _edata = .;
128    __sdata_end = .;
129    PROVIDE (edata = .);
130
131    /*
132     * BSP: End of data section
133     */
134    bsp_section_data_end = .;
135  } > RAM
136
137  PROVIDE (__EXCEPT_START__ = .);
138  .gcc_except_table   : { *(.gcc_except_table*) } >RAM
139  PROVIDE (__EXCEPT_END__ = .);
140
141  .sbss :
142  {
143    __sbss_start = .;
144    *(.dynsbss)
145    *(.sbss .sbss.* .gnu.linkonce.sb.*)
146    *(.scommon)
147    . = ALIGN (bsp_section_align);
148    __sbss_end = .;
149  } >RAM
150  .bss  :
151  {
152   __bss_start = .;
153   *(.dynbss)
154   *(.bss .bss.* .gnu.linkonce.b.*)
155   *(COMMON)
156    . = ALIGN (bsp_section_align);
157   __bss_end = .;
158
159   /* Allocate the main stack area.  Make sure it starts 16bytes aligned
160      to accommodate any possible program expectation.  */
161   _stack = ALIGN(16) + 0x1000;
162   _end = _stack;
163  } >RAM
164
165  /*
166   * BSP: Interrupt stack
167   */
168  bsp_interrupt_stack_start = _end;
169  bsp_interrupt_stack_end = bsp_interrupt_stack_start + 32k;
170  bsp_interrupt_stack_size = bsp_interrupt_stack_end - bsp_interrupt_stack_start;
171
172  bsp_work_area_start = bsp_interrupt_stack_end;
173  WorkAreaBase = bsp_work_area_start;
174   . = RamBase + RamSize;
175
176  .reset :
177  {
178   KEEP(*(.reset))
179  } >RESET
180
181  /* DWARF 1.1 and DWARF 2 */
182  .debug_aranges  0 : { *(.debug_aranges) }
183  .debug_pubnames 0 : { *(.debug_pubnames) }
184  /* DWARF 2 */
185  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
186  .debug_abbrev   0 : { *(.debug_abbrev) }
187  .debug_line     0 : { *(.debug_line) }
188  .debug_frame    0 : { *(.debug_frame) }
189  .debug_str      0 : { *(.debug_str) }
190  .debug_loc      0 : { *(.debug_loc) }
191  .debug_macinfo  0 : { *(.debug_macinfo) }
192  /* SGI/MIPS DWARF 2 extensions */
193  .debug_weaknames 0 : { *(.debug_weaknames) }
194  .debug_funcnames 0 : { *(.debug_funcnames) }
195  .debug_typenames 0 : { *(.debug_typenames) }
196  .debug_varnames  0 : { *(.debug_varnames) }
197  /DISCARD/ : { *(.note.GNU-stack) }
198}
199
Note: See TracBrowser for help on using the repository browser.