source: rtems/c/src/lib/libbsp/arm/csb336/startup/linkcmds @ 7a6f8d0

4.104.115
Last change on this file since 7a6f8d0 was 127e726a, checked in by Joel Sherrill <joel.sherrill@…>, on 09/19/08 at 21:14:03

2008-09-19 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, startup/linkcmds: Use top level shared bsp_get_work_area() implementation.
  • Property mode set to 100644
File size: 5.3 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 = 0x08200000, LENGTH = 30M
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 : 0x08200000;
31_sdram_size = DEFINED(_sdram_size) ? _sdram_size : 30M;
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  .init          :
88  {
89    KEEP (*(.init))
90  } > sdram   /*=0*/
91
92  .text      :
93  {
94        _text_start = .;
95         CREATE_OBJECT_SYMBOLS
96        *(.text)
97        *(.text.*)
98
99        /*
100         * Special FreeBSD sysctl sections.
101         */
102        . = ALIGN (16);
103        __start_set_sysctl_set = .;
104        *(set_sysctl_*);
105        __stop_set_sysctl_set = ABSOLUTE(.);
106        *(set_domain_*);
107        *(set_pseudo_*);
108
109        /* .gnu.warning sections are handled specially by elf32.em.  */
110        *(.gnu.warning)
111        *(.gnu.linkonce.t*)
112        *(.glue_7)
113        *(.glue_7t)
114
115        /* I think these come from the ld docs: */     
116        ___CTOR_LIST__ = .;
117        LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)
118        *(.ctors)
119        LONG(0)
120        ___CTOR_END__ = .;
121        ___DTOR_LIST__ = .;
122        LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)
123        *(.dtors)
124        LONG(0)
125        ___DTOR_END__ = .;
126
127        _etext = .;
128        PROVIDE (etext = .);
129  } > sdram 
130
131  .fini      :
132  {
133    KEEP (*(.fini))
134  } > sdram  /*=0*/
135
136  .data :
137  {
138    *(.data)
139    *(.data.*)
140    *(.gnu.linkonce.d*)
141    *(.jcr)
142    SORT(CONSTRUCTORS)
143    _edata = .;
144  } > sdram
145
146  .eh_frame : { *(.eh_frame) } > sdram
147  .data1   : { *(.data1) } > sdram
148  .eh_frame : { *(.eh_frame) } > sdram
149  .gcc_except_table : { *(.gcc_except_table*) } > sdram
150
151  .rodata :
152  {
153    *(.rodata)
154    *(.rodata.*)
155    *(.gnu.linkonce.r*)
156  } > sdram
157
158  .bss       :
159  {
160        _bss_start_ = .;
161        _clear_start = .;
162        *(.bss)
163        *(.bss.*)
164        *(.gnu.linkonce.b.*)
165        *(COMMON)
166        . = ALIGN(64);
167        _clear_end = .;
168
169        . = ALIGN (256);
170        _abt_stack = .;
171        . += _abt_stack_size;
172
173        . = ALIGN (256);
174        _undef_stack = .;
175        . += _undef_stack_size;
176
177        . = ALIGN (256);
178        _irq_stack = .;
179        . += _irq_stack_size;
180
181        . = ALIGN (256);
182        _fiq_stack = .;
183        . += _fiq_stack_size;
184
185        . = ALIGN (256);
186        _svc_stack = .;
187        . += _svc_stack_size;
188
189        _bss_end_ = .;
190        _end = .;
191        __end = .;
192
193/*
194 * Ideally, the MMU's translation table would be in SRAM. But we
195 * don't have any. If we don't use more regions than TLB entries (64),
196 * the lookup will only happen once for each region.
197 */
198        . = ALIGN (16 * 1024);
199        _ttbl_base = .;
200        . += (16 * 1024);
201
202        . = ALIGN (1024);
203        _bss_free_start = .;
204        WorkAreaBase = .;
205
206  } > sdram
207
208
209/* Debugging stuff follows? */
210
211  /* Stabs debugging sections.  */
212  .stab 0 : { *(.stab) }
213  .stabstr 0 : { *(.stabstr) }
214  .stab.excl 0 : { *(.stab.excl) }
215  .stab.exclstr 0 : { *(.stab.exclstr) }
216  .stab.index 0 : { *(.stab.index) }
217  .stab.indexstr 0 : { *(.stab.indexstr) }
218  .comment 0 : { *(.comment) }
219  /* DWARF debug sections.
220     Symbols in the DWARF debugging sections are relative to the beginning
221     of the section so we begin them at 0.  */
222  /* DWARF 1 */
223  .debug          0 : { *(.debug) }
224  .line           0 : { *(.line) }
225  /* GNU DWARF 1 extensions */
226  .debug_srcinfo  0 : { *(.debug_srcinfo) }
227  .debug_sfnames  0 : { *(.debug_sfnames) }
228  /* DWARF 1.1 and DWARF 2 */
229  .debug_aranges  0 : { *(.debug_aranges) }
230  .debug_pubnames 0 : { *(.debug_pubnames) }
231  /* DWARF 2 */
232  .debug_info     0 : { *(.debug_info) }
233  .debug_abbrev   0 : { *(.debug_abbrev) }
234  .debug_line     0 : { *(.debug_line) }
235  .debug_frame    0 : { *(.debug_frame) }
236  .debug_str      0 : { *(.debug_str) }
237  .debug_loc      0 : { *(.debug_loc) }
238  .debug_macinfo  0 : { *(.debug_macinfo) }
239  /* SGI/MIPS DWARF 2 extensions */
240  .debug_weaknames 0 : { *(.debug_weaknames) }
241  .debug_funcnames 0 : { *(.debug_funcnames) }
242  .debug_typenames 0 : { *(.debug_typenames) }
243  .debug_varnames  0 : { *(.debug_varnames) }
244  /*.stack 0x80000 : { _stack = .; *(.stack) }*/
245  /* These must appear regardless of  .  */
246}
247
Note: See TracBrowser for help on using the repository browser.