source: rtems/c/src/lib/libbsp/arm/csb336/startup/linkcmds @ 1453d92

4.104.114.84.95
Last change on this file since 1453d92 was 1453d92, checked in by Jay Monkman <jtm@…>, on 06/03/06 at 03:22:19

2006-06-02 Jay Monkman <jtm@…>

  • startup/linkcmds: Removed unnecessary global definition of bsp_vector_table.
  • Property mode set to 100644
File size: 5.2 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.OARcorp.com/rtems/license.html.
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
33
34_irq_stack_size = DEFINED(_irq_stack_size) ? _irq_stack_size : 0x1000;
35_fiq_stack_size = DEFINED(_fiq_stack_size) ? _fiq_stack_size : 0x400;
36_abt_stack_size = DEFINED(_abt_stack_size) ? _abt_stack_size : 0x400;
37_undef_stack_size = DEFINED(_undef_stack_size) ? _undef_stack_size : 0x400;
38_svc_stack_size = DEFINED(_svc_stack_size) ? _svc_stack_size : 0x1000;
39
40
41
42/* Do we need any of these for elf?
43   __DYNAMIC = 0;    */
44
45SECTIONS
46{
47  .base :
48  {
49    arm_exception_table = .;   
50
51    arm_reset_vect    = .;     /* 0x00 */
52    . += 4;
53
54    arm_undef_vect    = .;     /* 0x04 */
55    . += 4;
56
57    arm_swi_vect      = .;     /* 0x08 */
58    . += 4;
59
60    arm_iabrt_vect    = .;     /* 0x0c */
61    . += 4;
62
63    arm_dabrt_vect    = .;     /* 0x10 */
64    . += 4;
65
66    /* no vector here */
67    . += 4;
68
69    arm_irq_vect      = .;     /* 0x18 */
70    . += 4;
71
72    arm_fiq_vect      = .;     /* 0x1c */
73    . += 4;
74                              /* FIXME: */
75
76    rtems_vector_table = .;
77    . += (8 * 4);                     /* 8 ARM interrupts */
78       
79    . = ALIGN (0x100);
80
81
82  } > sdram
83
84  .init          :
85  {
86    KEEP (*(.init))
87  } > sdram   /*=0*/
88
89  .text      :
90  {
91        _text_start = .;
92         CREATE_OBJECT_SYMBOLS
93        *(.text)
94        *(.text.*)
95
96        /*
97         * Special FreeBSD sysctl sections.
98         */
99        . = ALIGN (16);
100        __start_set_sysctl_set = .;
101        *(set_sysctl_*);
102        __stop_set_sysctl_set = ABSOLUTE(.);
103        *(set_domain_*);
104        *(set_pseudo_*);
105
106        /* .gnu.warning sections are handled specially by elf32.em.  */
107        *(.gnu.warning)
108        *(.gnu.linkonce.t*)
109        *(.glue_7)
110        *(.glue_7t)
111
112        /* I think these come from the ld docs: */     
113        ___CTOR_LIST__ = .;
114        LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)
115        *(.ctors)
116        LONG(0)
117        ___CTOR_END__ = .;
118        ___DTOR_LIST__ = .;
119        LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)
120        *(.dtors)
121        LONG(0)
122        ___DTOR_END__ = .;
123
124        _etext = .;
125        PROVIDE (etext = .);
126  } > sdram 
127
128  .fini      :
129  {
130    KEEP (*(.fini))
131  } > sdram  /*=0*/
132
133  .data :
134  {
135    *(.data)
136    *(.data.*)
137    *(.gnu.linkonce.d*)
138    *(.jcr)
139    SORT(CONSTRUCTORS)
140    _edata = .;
141  } > sdram
142
143  .eh_frame : { *(.eh_frame) } > sdram
144  .data1   : { *(.data1) } > sdram
145  .eh_frame : { *(.eh_frame) } > sdram
146  .gcc_except_table : { *(.gcc_except_table) } > sdram
147
148  .rodata :
149  {
150    *(.rodata)
151    *(.rodata.*)
152    *(.gnu.linkonce.r*)
153  } > sdram
154
155  .bss       :
156  {
157        _bss_start_ = .;
158        _clear_start = .;
159        *(.bss)
160        *(.bss.*)
161        *(.gnu.linkonce.b.*)
162        *(COMMON)
163        . = ALIGN(64);
164        _clear_end = .;
165
166        . = ALIGN (256);
167        _abt_stack = .;
168        . += _abt_stack_size;
169
170        . = ALIGN (256);
171        _undef_stack = .;
172        . += _undef_stack_size;
173
174        . = ALIGN (256);
175        _irq_stack = .;
176        . += _irq_stack_size;
177
178        . = ALIGN (256);
179        _fiq_stack = .;
180        . += _fiq_stack_size;
181
182        . = ALIGN (256);
183        _svc_stack = .;
184        . += _svc_stack_size;
185
186        _bss_end_ = .;
187        _end = .;
188        __end = .;
189
190/*
191 * Ideally, the MMU's translation table would be in SRAM. But we
192 * don't have any. If we don't use more regions than TLB entries (64),
193 * the lookup will only happen once for each region.
194 */
195        . = ALIGN (16 * 1024);
196        _ttbl_base = .;
197        . += (16 * 1024);
198
199        . = ALIGN (1024);
200        _bss_free_start = .;
201
202  } > sdram
203
204
205/* Debugging stuff follows? */
206
207  /* Stabs debugging sections.  */
208  .stab 0 : { *(.stab) }
209  .stabstr 0 : { *(.stabstr) }
210  .stab.excl 0 : { *(.stab.excl) }
211  .stab.exclstr 0 : { *(.stab.exclstr) }
212  .stab.index 0 : { *(.stab.index) }
213  .stab.indexstr 0 : { *(.stab.indexstr) }
214  .comment 0 : { *(.comment) }
215  /* DWARF debug sections.
216     Symbols in the DWARF debugging sections are relative to the beginning
217     of the section so we begin them at 0.  */
218  /* DWARF 1 */
219  .debug          0 : { *(.debug) }
220  .line           0 : { *(.line) }
221  /* GNU DWARF 1 extensions */
222  .debug_srcinfo  0 : { *(.debug_srcinfo) }
223  .debug_sfnames  0 : { *(.debug_sfnames) }
224  /* DWARF 1.1 and DWARF 2 */
225  .debug_aranges  0 : { *(.debug_aranges) }
226  .debug_pubnames 0 : { *(.debug_pubnames) }
227  /* DWARF 2 */
228  .debug_info     0 : { *(.debug_info) }
229  .debug_abbrev   0 : { *(.debug_abbrev) }
230  .debug_line     0 : { *(.debug_line) }
231  .debug_frame    0 : { *(.debug_frame) }
232  .debug_str      0 : { *(.debug_str) }
233  .debug_loc      0 : { *(.debug_loc) }
234  .debug_macinfo  0 : { *(.debug_macinfo) }
235  /* SGI/MIPS DWARF 2 extensions */
236  .debug_weaknames 0 : { *(.debug_weaknames) }
237  .debug_funcnames 0 : { *(.debug_funcnames) }
238  .debug_typenames 0 : { *(.debug_typenames) }
239  .debug_varnames  0 : { *(.debug_varnames) }
240  /*.stack 0x80000 : { _stack = .; *(.stack) }*/
241  /* These must appear regardless of  .  */
242}
243
Note: See TracBrowser for help on using the repository browser.