source: rtems/c/src/lib/libbsp/arm/gdbarmsim/startup/linkcmds @ 44bb5cd0

4.104.115
Last change on this file since 44bb5cd0 was 44bb5cd0, checked in by Joel Sherrill <joel.sherrill@…>, on 10/01/09 at 21:48:42

2009-10-01 Joel Sherrill <joel.sherrill@…>

  • .cvsignore, ChangeLog?, Makefile.am, bsp_specs, configure.ac, preinstall.am, console/.cvsignore, console/console-io.c, include/.cvsignore, include/bsp.h, include/irq.h, include/swi.h, start/.cvsignore, start/start.S, startup/.cvsignore, startup/bspreset.c, startup/bspstart.c, startup/linkcmds, startup/syscalls.c: New files.
  • Property mode set to 100644
File size: 5.4 KB
Line 
1/*
2 *  Cogent CSB336 Linker script
3 *
4 *  Copyright (c) 2004 by Cogent Computer Systems
5 *  Written by Jay Monkman <jtm@lopingdog.com>
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *
10 *  http://www.rtems.com/license/LICENSE.
11 *
12 *  $Id$
13 */
14OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
15              "elf32-littlearm")
16OUTPUT_ARCH(arm)
17ENTRY(_start)
18/* SEARCH_DIR(/usr/local/rtems-arm-dev-tools/arm-rtems/lib); */
19
20
21MEMORY {
22        sdram : ORIGIN = 0x00000000, LENGTH = 4M
23}
24
25/*
26 * Declare some sizes.
27 */
28
29/* The base for SDRAM is set to umon's APPRAMBASE */
30_sdram_base = DEFINED(_sdram_base) ? _sdram_base : 0x0;
31_sdram_size = DEFINED(_sdram_size) ? _sdram_size : 4M;
32
33RamBase = _sdram_base;
34RamSize = _sdram_size;
35HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
36
37_irq_stack_size = DEFINED(_irq_stack_size) ? _irq_stack_size : 0x1000;
38_fiq_stack_size = DEFINED(_fiq_stack_size) ? _fiq_stack_size : 0x400;
39_abt_stack_size = DEFINED(_abt_stack_size) ? _abt_stack_size : 0x400;
40_undef_stack_size = DEFINED(_undef_stack_size) ? _undef_stack_size : 0x400;
41_svc_stack_size = DEFINED(_svc_stack_size) ? _svc_stack_size : 0x1000;
42
43
44
45/* Do we need any of these for elf?
46   __DYNAMIC = 0;    */
47
48SECTIONS
49{
50  .base :
51  {
52    arm_exception_table = .;   
53
54    arm_reset_vect    = .;     /* 0x00 */
55    . += 4;
56
57    arm_undef_vect    = .;     /* 0x04 */
58    . += 4;
59
60    arm_swi_vect      = .;     /* 0x08 */
61    . += 4;
62
63    arm_iabrt_vect    = .;     /* 0x0c */
64    . += 4;
65
66    arm_dabrt_vect    = .;     /* 0x10 */
67    . += 4;
68
69    /* no vector here */
70    . += 4;
71
72    arm_irq_vect      = .;     /* 0x18 */
73    . += 4;
74
75    arm_fiq_vect      = .;     /* 0x1c */
76    . += 4;
77                              /* FIXME: */
78
79    rtems_vector_table = .;
80    . += (8 * 4);                     /* 8 ARM interrupts */
81       
82    . = ALIGN (0x100);
83
84
85  } > sdram
86
87  .text      :
88  {
89        . = 0x8000;
90        _text_start = .;
91         CREATE_OBJECT_SYMBOLS
92        *(.text)
93        *(.text.*)
94
95        /*
96         * Special FreeBSD sysctl sections.
97         */
98        . = ALIGN (16);
99        __start_set_sysctl_set = .;
100        *(set_sysctl_*);
101        __stop_set_sysctl_set = ABSOLUTE(.);
102        *(set_domain_*);
103        *(set_pseudo_*);
104
105        /* .gnu.warning sections are handled specially by elf32.em.  */
106        *(.gnu.warning)
107        *(.gnu.linkonce.t*)
108        *(.glue_7)
109        *(.glue_7t)
110
111        /* I think these come from the ld docs: */     
112        ___CTOR_LIST__ = .;
113        LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)
114        *(.ctors)
115        LONG(0)
116        ___CTOR_END__ = .;
117        ___DTOR_LIST__ = .;
118        LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)
119        *(.dtors)
120        LONG(0)
121        ___DTOR_END__ = .;
122
123        _etext = .;
124        PROVIDE (etext = .);
125  } > sdram 
126
127  .init          :
128  {
129    KEEP (*(.init))
130  } > sdram   /*=0*/
131
132  .fini      :
133  {
134    KEEP (*(.fini))
135  } > sdram  /*=0*/
136
137  .data :
138  {
139    *(.data)
140    *(.data.*)
141    *(.gnu.linkonce.d*)
142    *(.jcr)
143    SORT(CONSTRUCTORS)
144    _edata = .;
145  } > sdram
146
147  .eh_frame : { *(.eh_frame) } > sdram
148  .data1   : { *(.data1) } > sdram
149  .eh_frame : { *(.eh_frame) } > sdram
150  .gcc_except_table : { *(.gcc_except_table*) } > sdram
151
152  .rodata :
153  {
154    *(.rodata)
155    *(.rodata.*)
156    *(.gnu.linkonce.r*)
157  } > sdram
158
159  .bss       :
160  {
161        __bss_start__ = .;
162        _bss_start_ = .;
163        _clear_start = .;
164        *(.bss)
165        *(.bss.*)
166        *(.gnu.linkonce.b.*)
167        *(COMMON)
168        . = ALIGN(64);
169        _clear_end = .;
170
171        . = ALIGN (256);
172        _abt_stack = .;
173        . += _abt_stack_size;
174
175        . = ALIGN (256);
176        _undef_stack = .;
177        . += _undef_stack_size;
178
179        . = ALIGN (256);
180        _irq_stack = .;
181        . += _irq_stack_size;
182
183        . = ALIGN (256);
184        _fiq_stack = .;
185        . += _fiq_stack_size;
186
187        . = ALIGN (256);
188        _svc_stack = .;
189        . += _svc_stack_size;
190
191/*
192 * Ideally, the MMU's translation table would be in SRAM. But we
193 * don't have any. If we don't use more regions than TLB entries (64),
194 * the lookup will only happen once for each region.
195 */
196        . = ALIGN (16 * 1024);
197        _ttbl_base = .;
198        . += (16 * 1024);
199
200        . = ALIGN (1024);
201        _bss_free_start = .;
202        WorkAreaBase = .;
203
204        . = RamSize + RamBase - 1;
205        __clear_end__ = .;
206        __bss_end__ = .;
207        _bss_end_ = .;
208        _end = .;
209        __end = .;
210
211  } > sdram
212
213
214/* Debugging stuff follows? */
215
216  /* Stabs debugging sections.  */
217  .stab 0 : { *(.stab) }
218  .stabstr 0 : { *(.stabstr) }
219  .stab.excl 0 : { *(.stab.excl) }
220  .stab.exclstr 0 : { *(.stab.exclstr) }
221  .stab.index 0 : { *(.stab.index) }
222  .stab.indexstr 0 : { *(.stab.indexstr) }
223  .comment 0 : { *(.comment) }
224  /* DWARF debug sections.
225     Symbols in the DWARF debugging sections are relative to the beginning
226     of the section so we begin them at 0.  */
227  /* DWARF 1 */
228  .debug          0 : { *(.debug) }
229  .line           0 : { *(.line) }
230  /* GNU DWARF 1 extensions */
231  .debug_srcinfo  0 : { *(.debug_srcinfo) }
232  .debug_sfnames  0 : { *(.debug_sfnames) }
233  /* DWARF 1.1 and DWARF 2 */
234  .debug_aranges  0 : { *(.debug_aranges) }
235  .debug_pubnames 0 : { *(.debug_pubnames) }
236  /* DWARF 2 */
237  .debug_info     0 : { *(.debug_info) }
238  .debug_abbrev   0 : { *(.debug_abbrev) }
239  .debug_line     0 : { *(.debug_line) }
240  .debug_frame    0 : { *(.debug_frame) }
241  .debug_str      0 : { *(.debug_str) }
242  .debug_loc      0 : { *(.debug_loc) }
243  .debug_macinfo  0 : { *(.debug_macinfo) }
244  /* SGI/MIPS DWARF 2 extensions */
245  .debug_weaknames 0 : { *(.debug_weaknames) }
246  .debug_funcnames 0 : { *(.debug_funcnames) }
247  .debug_typenames 0 : { *(.debug_typenames) }
248  .debug_varnames  0 : { *(.debug_varnames) }
249  /*.stack 0x80000 : { _stack = .; *(.stack) }*/
250  /* These must appear regardless of  .  */
251}
252
Note: See TracBrowser for help on using the repository browser.