source: rtems/c/src/lib/libbsp/arm/csb337/startup/linkcmds.csb337 @ 7b25525

4.104.115
Last change on this file since 7b25525 was 7b25525, checked in by Joel Sherrill <joel.sherrill@…>, on 11/30/09 at 22:00:36

2009-11-30 Fernando Nicodemos <fgnicodemos@…>

  • Makefile.am, preinstall.am, console/fbcons.c, console/font8x16.h, console/sed1356.c, console/uarts.c, include/sed1356.h, startup/bspstart.c, startup/linkcmds.csb337, startup/linkcmds.csb637, startup/memmap.c, startup/umonsupp.c: Update to match development version.
  • Property mode set to 100644
File size: 5.2 KB
Line 
1/*
2 *  Cogent CSB337 Linker script
3 *
4 *  Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
5 *
6 *  The license and distribution terms for this file may be
7 *  found in the file LICENSE in this distribution or at
8 *  http://www.rtems.com/license/LICENSE.
9 *
10 *  $Id$
11 */
12
13OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
14              "elf32-littlearm")
15OUTPUT_ARCH(arm)
16ENTRY(_start)
17
18MEMORY
19{
20        sdram : ORIGIN = 0x20100000, LENGTH = 15M
21        sram  : ORIGIN = 0x00200000, LENGTH = 16K
22}
23
24/*
25 * Declare some sizes.
26 */
27_sdram_base = DEFINED(_sdram_base) ? _sdram_base : 0x20100000;
28_sdram_size = DEFINED(_sdram_size) ? _sdram_size : 15M;
29
30RamBase = _sdram_base;
31RamSize = _sdram_size;
32HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
33
34_sram_base = DEFINED(_sram_base) ? _sram_base : 0x00000000;
35_sram_size = DEFINED(_sram_size) ? _sram_size : 16K;
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 : 0x100;
40_svc_stack_size = DEFINED(_svc_stack_size) ? _svc_stack_size : 0x1000;
41
42
43
44/* Do we need any of these for elf?
45   __DYNAMIC = 0;    */
46
47SECTIONS
48{
49    .base :
50    {
51        _sram_base = .;
52
53        /* reserve room for the vectors and function pointers */
54        arm_exception_table = .;   
55        . += 64;
56
57        /* 256 byte aligned rx buffer header array */
58        . = ALIGN (0x100);
59        at91rm9200_emac_rxbuf_hdrs = .;
60
61        /* 1 transmit buffer, 0x600 size */
62        . += (0x100);
63        at91rm9200_emac_txbuf = .;
64        . += (0x600);
65
66        /* 8 receive buffers, 0x600 each */
67        at91rm9200_emac_rxbufs = .;
68        . += (0x600 * 8);
69
70    } > sram
71
72    .text      :
73    {
74        _text_start = .;
75         CREATE_OBJECT_SYMBOLS
76        *(.text)
77        *(.text.*)
78
79        /*
80         * Special FreeBSD sysctl sections.
81         */
82        . = ALIGN (16);
83        __start_set_sysctl_set = .;
84        *(set_sysctl_*);
85        __stop_set_sysctl_set = ABSOLUTE(.);
86        *(set_domain_*);
87        *(set_pseudo_*);
88
89        /* .gnu.warning sections are handled specially by elf32.em.  */
90        *(.gnu.warning)
91        *(.gnu.linkonce.t*)
92        *(.glue_7)
93        *(.glue_7t)
94
95        /* I think these come from the ld docs: */
96        ___CTOR_LIST__ = .;
97        LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)
98        *(.ctors)
99        LONG(0)
100        ___CTOR_END__ = .;
101        ___DTOR_LIST__ = .;
102        LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)
103        *(.dtors)
104        LONG(0)
105        ___DTOR_END__ = .;
106
107        _etext = .;
108        PROVIDE (etext = .);
109    } > sdram 
110
111    .init          :
112    {
113        KEEP (*(.init))
114    } > sdram   /*=0*/
115
116    .fini      :
117    {
118        KEEP (*(.fini))
119    } > sdram  /*=0*/
120
121    .data :
122    {
123        *(.data)
124        *(.data.*)
125        *(.gnu.linkonce.d*)
126        *(.jcr)
127        SORT(CONSTRUCTORS)
128        _edata = .;
129    } > sdram
130
131    .eh_frame : { *(.eh_frame) } > sdram
132    .data1   : { *(.data1) } > sdram
133    .eh_frame : { *(.eh_frame) } > sdram
134    .gcc_except_table : { *(.gcc_except_table*) } > sdram
135
136    .rodata :
137    {
138      *(.rodata)
139      *(.rodata.*)
140      *(.gnu.linkonce.r*)
141    } > sdram
142
143    .bss       :
144    {
145        _bss_start_ = .;
146        _clear_start = .;
147        *(.bss)
148        *(.bss.*)
149        *(.gnu.linkonce.b.*)
150        *(COMMON)
151        . = ALIGN(64);
152        _clear_end = .;
153
154        . = ALIGN (256);
155        _abt_stack = .;
156        . += _abt_stack_size;
157
158        . = ALIGN (256);
159        _irq_stack = .;
160        . += _irq_stack_size;
161
162        . = ALIGN (256);
163        _fiq_stack = .;
164        . += _fiq_stack_size;
165
166        . = ALIGN (256);
167        _svc_stack = .;
168        . += _svc_stack_size;
169
170        _bss_end_ = .;
171        _end = .;
172        __end = .;
173
174/*
175 * Ideally, the MMU's translation table would be in SRAM. But we need
176 * 16K which is the size of SRAM. If we do the mapping right, the TLB
177 * should be big enough that to hold all the translations that matter,
178 * so keeping the table in SDRAM won't be a problem.
179 */
180        . = ALIGN (16 * 1024);
181          _ttbl_base = .;
182          . += (16 * 1024);
183
184
185        . = ALIGN (1024);
186        _bss_free_start = .;
187        WorkAreaBase = .;
188
189    } > sdram
190
191
192/* Debugging stuff follows? */
193
194    /* Stabs debugging sections.  */
195    .stab 0 : { *(.stab) }
196    .stabstr 0 : { *(.stabstr) }
197    .stab.excl 0 : { *(.stab.excl) }
198    .stab.exclstr 0 : { *(.stab.exclstr) }
199    .stab.index 0 : { *(.stab.index) }
200    .stab.indexstr 0 : { *(.stab.indexstr) }
201    .comment 0 : { *(.comment) }
202    /* DWARF debug sections.
203       Symbols in the DWARF debugging sections are relative to the beginning
204       of the section so we begin them at 0.  */
205    /* DWARF 1 */
206    .debug          0 : { *(.debug) }
207    .line           0 : { *(.line) }
208    /* GNU DWARF 1 extensions */
209    .debug_srcinfo  0 : { *(.debug_srcinfo) }
210    .debug_sfnames  0 : { *(.debug_sfnames) }
211    /* DWARF 1.1 and DWARF 2 */
212    .debug_aranges  0 : { *(.debug_aranges) }
213    .debug_pubnames 0 : { *(.debug_pubnames) }
214    /* DWARF 2 */
215    .debug_info     0 : { *(.debug_info) }
216    .debug_abbrev   0 : { *(.debug_abbrev) }
217    .debug_line     0 : { *(.debug_line) }
218    .debug_frame    0 : { *(.debug_frame) }
219    .debug_str      0 : { *(.debug_str) }
220    .debug_loc      0 : { *(.debug_loc) }
221    .debug_macinfo  0 : { *(.debug_macinfo) }
222    /* SGI/MIPS DWARF 2 extensions */
223    .debug_weaknames 0 : { *(.debug_weaknames) }
224    .debug_funcnames 0 : { *(.debug_funcnames) }
225    .debug_typenames 0 : { *(.debug_typenames) }
226    .debug_varnames  0 : { *(.debug_varnames) }
227/*    .stack 0x80000 : { _stack = .; *(.stack) }*/
228  /* These must appear regardless of  .  */
229}
230
Note: See TracBrowser for help on using the repository browser.