source: rtems/c/src/lib/libbsp/powerpc/ss555/startup/linkcmds @ bd86290d

4.104.114.84.95
Last change on this file since bd86290d was bd86290d, checked in by Joel Sherrill <joel.sherrill@…>, on 03/08/06 at 18:51:44

2006-03-08 Joel Sherrill <joel@…>

  • startup/linkcmds: Add .gnu.linkonce.b.* section.
  • Property mode set to 100644
File size: 7.9 KB
Line 
1/*
2 * Linker command file for Intec SS555 board
3 *
4 * When debugging, we assume that the internal flash ROM will be replaced by
5 * the external RAM on the SS555 board.  All sections are stacked starting
6 * at address zero.  Nothing is placed in the internal RAM, since it's not
7 * contiguous with the external SRAM when the external RAM is placed at
8 * zero.
9 *
10 * For final production, we assume that the .text section will be burned
11 * into flash ROM starting at address zero.  The .data, .bss, heap, and
12 * workspace will reside in RAM, starting at the beginning of the internal
13 * RAM.  The system startup code will configure the external RAM to begin
14 * where the internal RAM ends, so as to make one large RAM block.
15 *
16 * Debugging mode is chosen when the RTEMS_DEBUG symbol is defined.  The
17 * RTEMS_DEBUG symbol is defined in the bsp_specs file whenever make(1) is
18 * invoked with VARIANT=DEBUG.
19 *
20 *  $Id$
21 */
22
23OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
24OUTPUT_ARCH(powerpc)
25ENTRY(start)
26
27int_ram_org     = 0x003F9800;           /* base of internal RAM */
28int_ram_top     = 0x00400000;           /* top of internal RAM */
29ext_ram_size    = 0x00080000;           /* size of external RAM */
30
31
32SECTIONS
33{
34  .vectors 0x0:
35  {
36    /*
37     * For the MPC555, we use the compressed vector table format which puts
38     * all of the exception vectors before 0x100.
39     */
40    *(.vectors)
41  }
42
43  .text 0x100:
44  {
45    /* Read-only sections, merged into text segment: */
46   
47    text.start = .;
48
49    /* Entry point is the .entry section */
50    *(.entry)
51    *(.entry2)
52
53    /* Actual code */
54    *(.text*)
55
56    /* C++ constructors/destructors */
57    *(.gnu.linkonce.t*)
58             
59    /*  Initialization and finalization code.
60     *
61     *  Various files can provide initialization and finalization functions.
62     *  The bodies of these functions are in .init and .fini sections. We
63     *  accumulate the bodies here, and prepend function prologues from
64     *  ecrti.o and function epilogues from ecrtn.o. ecrti.o must be linked
65     *  first; ecrtn.o must be linked last. Because these are wildcards, it
66     *  doesn't matter if the user does not actually link against ecrti.o and
67     *  ecrtn.o; the linker won't look for a file to match a wildcard.  The
68     *  wildcard also means that it doesn't matter which directory ecrti.o
69     *  and ecrtn.o are in.
70     */
71    PROVIDE (_init = .);
72    *ecrti.o(.init)
73    *(.init)
74    *ecrtn.o(.init)
75   
76    PROVIDE (_fini = .);
77    *ecrti.o(.fini)
78    *(.fini)
79    *ecrtn.o(.init)
80
81    /*
82     *  C++ constructors and destructors for static objects.
83     *  PowerPC EABI does not use crtstuff yet, so we build "old-style"
84     *  constructor and destructor lists that begin with the list length
85     *  end terminate with a NULL entry.
86     */
87    PROVIDE (__CTOR_LIST__ = .);             
88    /* LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) */
89    *crtbegin.o(.ctors)
90    *(.ctors)
91    *crtend.o(.ctors)
92    LONG(0)
93    PROVIDE (__CTOR_END__ = .);
94       
95    PROVIDE (__DTOR_LIST__ = .);
96    /* LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) */
97    *crtbegin.o(.dtors)
98    *(.dtors)
99    *crtend.o(.dtors)
100    LONG(0)
101    PROVIDE (__DTOR_END__ = .);
102       
103    /*
104     * Special FreeBSD sysctl sections.
105     */
106    . = ALIGN (16);
107    __start_set_sysctl_set = .;
108    *(set_sysctl_*);
109    __stop_set_sysctl_set = ABSOLUTE(.);
110    *(set_domain_*);
111    *(set_pseudo_*);
112
113    /* Exception frame info */
114    *(.eh_frame)
115
116    /* Miscellaneous read-only data */
117    _rodata_start = . ;
118    *(.gnu.linkonce.r*)
119    *(.lit)
120    *(.shdata)
121    *(.rodata*)
122    *(.rodata1)
123    *.(eh_frame)
124    *(.descriptors)
125    *(rom_ver)
126    _erodata = .;
127
128    /* Various possible names for the end of the .text section */
129    etext = ALIGN(0x10);
130    _etext = .;
131    _endtext = .;
132    text.end = .;
133    PROVIDE (etext = .);
134    PROVIDE (__etext = .);
135
136    /*
137     * .data section contents, copied to RAM at system startup.
138     */
139    . = ALIGN(0x20);
140    data.contents.start = .;
141  }
142  text.size = text.end - text.start;
143
144  /*
145   * If debugging, stack the read/write sections directly after the text
146   * section.  Otherwise, stack the read/write sections starting at base of
147   * internal RAM.
148   */
149  . = DEFINED(RTEMS_DEBUG) ? . : int_ram_org;
150 
151  .data : AT (data.contents.start)
152  {
153    data.start = .;
154   
155    *(.data)
156    *(.data.*)
157    *(.data1)
158   
159    PROVIDE (__SDATA_START__ = .);
160    *(.sdata*)
161    *(.gnu.linkonce.d*)
162    *(.gnu.linkonce.s.*)
163    PROVIDE (__SDATA_END__ = .);
164   
165    PROVIDE (__EXCEPT_START__ = .);
166    *(.gcc_except_table)
167    PROVIDE (__EXCEPT_END__ = .);
168   
169    PROVIDE(__GOT_START__ = .);
170    *(.got.plt)
171    *(.got)
172    PROVIDE(__GOT_END__ = .);
173       
174    *(.got1)
175   
176    PROVIDE (__GOT2_START__ = .);
177    PROVIDE (_GOT2_START_ = .);
178    *(.got2)
179    PROVIDE (__GOT2_END__ = .);
180    PROVIDE (_GOT2_END_ = .);
181       
182    PROVIDE (__FIXUP_START__ = .);
183    PROVIDE (_FIXUP_START_ = .);
184    *(.fixup)
185    PROVIDE (_FIXUP_END_ = .);
186    PROVIDE (__FIXUP_END__ = .);
187
188    /*  We want the small data sections together, so single-instruction
189     *   offsets can access them all.
190     */
191    PROVIDE (__SDATA2_START__ = .);
192    *(.sdata2)
193    *(.gnu.linkonce.s2.*)
194    PROVIDE (__SDATA2_END__ = .);
195
196    data.end = .;
197  }
198  data.size = data.end - data.start;
199       
200  .bss :
201  {
202    bss.start = .;
203       
204    PROVIDE (__SBSS2_START__ = .);
205    *(.sbss2)
206    PROVIDE (__SBSS2_END__ = .);
207       
208    PROVIDE (__SBSS_START__ = .);
209    *(.sbss*)
210    PROVIDE (__SBSS_END__ = .);
211
212    *(.bss .bss* .gnu.linkonce.b*)
213    *(COMMON)
214
215    . = ALIGN(4);
216    bss.end = .;
217  }
218  bss.size = bss.end - bss.start;
219
220  PROVIDE(_end = bss.end);
221
222  /*
223   * Initialization stack
224   */
225  InitStack_start = ALIGN(0x10);
226  . += 0x1000;
227  initStack = .;
228  PROVIDE(initStackPtr = initStack);
229
230  /*
231   * Interrupt stack
232   */
233  IntrStack_start = ALIGN(0x10);
234  . += 0x4000;
235  intrStack = .;
236  PROVIDE(intrStackPtr = intrStack);
237
238  _WorkspaceBase = .;
239  __WorkspaceBase = .;
240       
241  /*
242   * Heap
243   *
244   * The heap is configured at run-time to use all available memory.  It
245   * begins just after the end of the Workspace and continues to the end of
246   * the external RAM.
247   */
248  . = DEFINED(RTEMS_DEBUG) ? 0 + ext_ram_size : int_ram_top + ext_ram_size;
249  _HeapEnd = .;
250  __HeapEnd = .;
251 
252       
253  /*
254   * Internal I/O devices
255   */
256  .usiu 0x002FC000:             /* unified system interface unit */
257  {
258    usiu = .;
259  }
260
261  .imb 0x00300000:              /* inter-module bus and devices */
262  {
263    imb = .;
264  }
265
266  .sram 0x00380000:             /* internal SRAM control registers */
267  {
268    sram = .;
269  }
270
271  /*
272   * SS555 external devices managed by on-board CPLD
273   */
274  .cpld 0xFF000000:             /* SS555 external CPLD devices */
275  {
276    cpld = .;
277  }
278
279
280  /* Stabs debugging sections.  */
281  .stab 0 : { *(.stab) }
282  .stabstr 0 : { *(.stabstr) }
283  .stab.excl 0 : { *(.stab.excl) }
284  .stab.exclstr 0 : { *(.stab.exclstr) }
285  .stab.index 0 : { *(.stab.index) }
286  .stab.indexstr 0 : { *(.stab.indexstr) }
287  .comment 0 : { *(.comment) }
288 
289  /* DWARF debug sections.
290     Symbols in the DWARF debugging sections are relative to the beginning
291     of the section so we begin them at 0.  */
292  /* DWARF 1 */
293  .debug          0 : { *(.debug) }
294  .line           0 : { *(.line) }
295 
296  /* GNU DWARF 1 extensions */
297  .debug_srcinfo  0 : { *(.debug_srcinfo) }
298  .debug_sfnames  0 : { *(.debug_sfnames) }
299 
300  /* DWARF 1.1 and DWARF 2 */
301  .debug_aranges  0 : { *(.debug_aranges) }
302  .debug_pubnames 0 : { *(.debug_pubnames) }
303 
304  /* DWARF 2 */
305  .debug_info     0 : { *(.debug_info) }
306  .debug_abbrev   0 : { *(.debug_abbrev) }
307  .debug_line     0 : { *(.debug_line) }
308  .debug_frame    0 : { *(.debug_frame) }
309  .debug_str      0 : { *(.debug_str) }
310  .debug_loc      0 : { *(.debug_loc) }
311  .debug_macinfo  0 : { *(.debug_macinfo) }
312 
313  /* SGI/MIPS DWARF 2 extensions */
314  .debug_weaknames 0 : { *(.debug_weaknames) }
315  .debug_funcnames 0 : { *(.debug_funcnames) }
316  .debug_typenames 0 : { *(.debug_typenames) }
317  .debug_varnames  0 : { *(.debug_varnames) }
318  /* These must appear regardless of  .  */
319}
Note: See TracBrowser for help on using the repository browser.