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

4.104.114.84.9
Last change on this file since a800d09c was a800d09c, checked in by Joel Sherrill <joel.sherrill@…>, on Apr 12, 2004 at 9:52:13 PM

2004-04-12 David Querbach <querbach@…>

  • .cvsignore, ChangeLog?, Makefile.am, README, bsp_specs, configure.ac, times, clock/p_clock.c, console/console.c, include/.cvsignore, include/bsp.h, include/coverhd.h, irq/irq.h, startup/bspstart.c, startup/iss555.c, startup/linkcmds, startup/start.S, wrapup/.cvsignore, wrapup/Makefile.am: New files.
  • 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    *(.text.*)
56             
57    /* C++ constructors/destructors */
58    *(.gnu.linkonce.t*)
59             
60    /*  Initialization and finalization code.
61     *
62     *  Various files can provide initialization and finalization functions.
63     *  The bodies of these functions are in .init and .fini sections. We
64     *  accumulate the bodies here, and prepend function prologues from
65     *  ecrti.o and function epilogues from ecrtn.o. ecrti.o must be linked
66     *  first; ecrtn.o must be linked last. Because these are wildcards, it
67     *  doesn't matter if the user does not actually link against ecrti.o and
68     *  ecrtn.o; the linker won't look for a file to match a wildcard.  The
69     *  wildcard also means that it doesn't matter which directory ecrti.o
70     *  and ecrtn.o are in.
71     */
72    PROVIDE (_init = .);
73    *ecrti.o(.init)
74    *(.init)
75    *ecrtn.o(.init)
76   
77    PROVIDE (_fini = .);
78    *ecrti.o(.fini)
79    *(.fini)
80    *ecrtn.o(.init)
81
82    /*
83     *  C++ constructors and destructors for static objects.
84     *  PowerPC EABI does not use crtstuff yet, so we build "old-style"
85     *  constructor and destructor lists that begin with the list length
86     *  end terminate with a NULL entry.
87     */
88    PROVIDE (__CTOR_LIST__ = .);             
89    /* LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) */
90    *crtbegin.o(.ctors)
91    *(.ctors)
92    *crtend.o(.ctors)
93    LONG(0)
94    PROVIDE (__CTOR_END__ = .);
95       
96    PROVIDE (__DTOR_LIST__ = .);
97    /* LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) */
98    *crtbegin.o(.dtors)
99    *(.dtors)
100    *crtend.o(.dtors)
101    LONG(0)
102    PROVIDE (__DTOR_END__ = .);
103       
104    /*
105     * Special FreeBSD sysctl sections.
106     */
107    . = ALIGN (16);
108    __start_set_sysctl_set = .;
109    *(set_sysctl_*);
110    __stop_set_sysctl_set = ABSOLUTE(.);
111    *(set_domain_*);
112    *(set_pseudo_*);
113
114    /* Exception frame info */
115    *(.eh_frame)
116
117    /* Miscellaneous read-only data */
118    _rodata_start = . ;
119    *(.gnu.linkonce.r*)
120    *(.lit)
121    *(.shdata)
122    *(.rodata*)
123    *(.rodata1)
124    *.(eh_frame)
125    *(.descriptors)
126    *(rom_ver)
127    _erodata = .;
128
129    /* Various possible names for the end of the .text section */
130    etext = ALIGN(0x10);
131    _etext = .;
132    _endtext = .;
133    text.end = .;
134    PROVIDE (etext = .);
135    PROVIDE (__etext = .);
136
137    /*
138     * .data section contents, copied to RAM at system startup.
139     */
140    . = ALIGN(0x20);
141    data.contents.start = .;
142  }
143  text.size = text.end - text.start;
144
145  /*
146   * If debugging, stack the read/write sections directly after the text
147   * section.  Otherwise, stack the read/write sections starting at base of
148   * internal RAM.
149   */
150  . = DEFINED(RTEMS_DEBUG) ? . : int_ram_org;
151 
152  .data : AT (data.contents.start)
153  {
154    data.start = .;
155   
156    *(.data)
157    *(.data.*)
158    *(.data1)
159   
160    PROVIDE (__SDATA_START__ = .);
161    *(.sdata)
162    *(.gnu.linkonce.d*)
163    *(.gnu.linkonce.s.*)
164    PROVIDE (__SDATA_END__ = .);
165   
166    PROVIDE (__EXCEPT_START__ = .);
167    *(.gcc_except_table)
168    PROVIDE (__EXCEPT_END__ = .);
169   
170    PROVIDE(__GOT_START__ = .);
171    *(.got.plt)
172    *(.got)
173    PROVIDE(__GOT_END__ = .);
174       
175    *(.got1)
176   
177    PROVIDE (__GOT2_START__ = .);
178    PROVIDE (_GOT2_START_ = .);
179    *(.got2)
180    PROVIDE (__GOT2_END__ = .);
181    PROVIDE (_GOT2_END_ = .);
182       
183    PROVIDE (__FIXUP_START__ = .);
184    PROVIDE (_FIXUP_START_ = .);
185    *(.fixup)
186    PROVIDE (_FIXUP_END_ = .);
187    PROVIDE (__FIXUP_END__ = .);
188
189    /*  We want the small data sections together, so single-instruction
190     *   offsets can access them all.
191     */
192    PROVIDE (__SDATA2_START__ = .);
193    *(.sdata2)
194    *(.gnu.linkonce.s2.*)
195    PROVIDE (__SDATA2_END__ = .);
196
197    data.end = .;
198  }
199  data.size = data.end - data.start;
200       
201  .bss :
202  {
203    bss.start = .;
204       
205    PROVIDE (__SBSS2_START__ = .);
206    *(.sbss2)
207    PROVIDE (__SBSS2_END__ = .);
208       
209    PROVIDE (__SBSS_START__ = .);
210    *(.sbss)
211    PROVIDE (__SBSS_END__ = .);
212
213    *(.bss)
214    *(COMMON)
215
216    . = ALIGN(4);
217    bss.end = .;
218  }
219  bss.size = bss.end - bss.start;
220
221  PROVIDE(_end = bss.end);
222
223  /*
224   * Initialization stack
225   */
226  InitStack_start = ALIGN(0x10);
227  . += 0x1000;
228  initStack = .;
229  PROVIDE(initStackPtr = initStack);
230
231  /*
232   * Interrupt stack
233   */
234  IntrStack_start = ALIGN(0x10);
235  . += 0x4000;
236  intrStack = .;
237  PROVIDE(intrStackPtr = intrStack);
238
239  _WorkspaceBase = .;
240  __WorkspaceBase = .;
241       
242  /*
243   * Heap
244   *
245   * The heap is configured at run-time to use all available memory.  It
246   * begins just after the end of the Workspace and continues to the end of
247   * the external RAM.
248   */
249  . = DEFINED(RTEMS_DEBUG) ? 0 + ext_ram_size : int_ram_top + ext_ram_size;
250  _HeapEnd = .;
251  __HeapEnd = .;
252 
253       
254  /*
255   * Internal I/O devices
256   */
257  .usiu 0x002FC000:             /* unified system interface unit */
258  {
259    usiu = .;
260  }
261
262  .imb 0x00300000:              /* inter-module bus and devices */
263  {
264    imb = .;
265  }
266
267  .sram 0x00380000:             /* internal SRAM control registers */
268  {
269    sram = .;
270  }
271
272  /*
273   * SS555 external devices managed by on-board CPLD
274   */
275  .cpld 0xFF000000:             /* SS555 external CPLD devices */
276  {
277    cpld = .;
278  }
279
280
281  /* Stabs debugging sections.  */
282  .stab 0 : { *(.stab) }
283  .stabstr 0 : { *(.stabstr) }
284  .stab.excl 0 : { *(.stab.excl) }
285  .stab.exclstr 0 : { *(.stab.exclstr) }
286  .stab.index 0 : { *(.stab.index) }
287  .stab.indexstr 0 : { *(.stab.indexstr) }
288  .comment 0 : { *(.comment) }
289 
290  /* DWARF debug sections.
291     Symbols in the DWARF debugging sections are relative to the beginning
292     of the section so we begin them at 0.  */
293  /* DWARF 1 */
294  .debug          0 : { *(.debug) }
295  .line           0 : { *(.line) }
296 
297  /* GNU DWARF 1 extensions */
298  .debug_srcinfo  0 : { *(.debug_srcinfo) }
299  .debug_sfnames  0 : { *(.debug_sfnames) }
300 
301  /* DWARF 1.1 and DWARF 2 */
302  .debug_aranges  0 : { *(.debug_aranges) }
303  .debug_pubnames 0 : { *(.debug_pubnames) }
304 
305  /* DWARF 2 */
306  .debug_info     0 : { *(.debug_info) }
307  .debug_abbrev   0 : { *(.debug_abbrev) }
308  .debug_line     0 : { *(.debug_line) }
309  .debug_frame    0 : { *(.debug_frame) }
310  .debug_str      0 : { *(.debug_str) }
311  .debug_loc      0 : { *(.debug_loc) }
312  .debug_macinfo  0 : { *(.debug_macinfo) }
313 
314  /* SGI/MIPS DWARF 2 extensions */
315  .debug_weaknames 0 : { *(.debug_weaknames) }
316  .debug_funcnames 0 : { *(.debug_funcnames) }
317  .debug_typenames 0 : { *(.debug_typenames) }
318  .debug_varnames  0 : { *(.debug_varnames) }
319  /* These must appear regardless of  .  */
320}
Note: See TracBrowser for help on using the repository browser.