source: rtems/c/src/lib/libbsp/arm/csb337/startup/linkcmds @ b759b04

4.104.114.84.95
Last change on this file since b759b04 was b759b04, checked in by Jay Monkman <jtm@…>, on Jul 15, 2004 at 6:16:16 AM

2004-07-15 Jay Monkman

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