source: rtems/c/src/lib/libbsp/arm/edb7312/startup/linkcmds @ bbad6f0

4.104.114.84.95
Last change on this file since bbad6f0 was 36ea4c2a, checked in by Joel Sherrill <joel.sherrill@…>, on 12/02/02 at 19:13:38

2002-12-02 Joel Sherrill <joel@…>

  • configure.ac, network/Makefile.am: Don't build if networking disabled.
  • startup/linkcmds: Add sections to remove warnings.
  • Property mode set to 100644
File size: 4.6 KB
Line 
1/*
2 * Cirrus EP7312 linker script
3 *
4 * Copyright (c) 2002 by Jay Monkman <jtm@smoothsmoothie.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/* SEARCH_DIR(/usr/local/rtems-arm-dev-tools/arm-rtems/lib); */
20
21
22MEMORY {
23        sdram : ORIGIN = 0x00000000, LENGTH = 16M
24        regs  : ORIGIN = 0x80000000, LENGTH = 1M
25}
26
27/*
28 * Declare some sizes.
29 */
30
31_sdram_base = DEFINED(_sdram_base) ? _sdram_base : 0x00000000;
32_sdram_size = DEFINED(_sdram_size) ? _sdram_size : 16M;
33
34
35_irq_stack_size = DEFINED(_irq_stack_size) ? _irq_stack_size : 0x1000;
36_fiq_stack_size = DEFINED(_fiq_stack_size) ? _fiq_stack_size : 0x400;
37_abt_stack_size = DEFINED(_abt_stack_size) ? _abt_stack_size : 0;
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    _sram_base = .;
50    arm_exception_table = .;   
51
52    arm_reset_vect    = .;     /* 0x00 */
53    . += 4;
54
55    arm_undef_vect    = .;     /* 0x04 */
56    . += 4;
57
58    arm_swi_vect      = .;     /* 0x08 */
59    . += 4;
60
61    arm_iabrt_vect    = .;     /* 0x0c */
62    . += 4;
63
64    arm_dabrt_vect    = .;     /* 0x10 */
65    . += 4;
66
67    /* no vector here */
68    . += 4;
69
70    arm_irq_vect      = .;     /* 0x18 */
71    . += 4;
72
73    arm_fiq_vect      = .;     /* 0x1c */
74    . += 4;
75                              /* FIXME: */
76    fiq_vect_table    = .;    /* this and irq_vector_table should be swapped */
77    . += (32 * 4);
78
79    irq_vector_table = .;
80    . += (32 * 4);     
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        /* .gnu.warning sections are handled specially by elf32.em.  */
96        *(.gnu.warning)
97        *(.gnu.linkonce.t*)
98        *(.glue_7)
99        *(.glue_7t)
100
101        /* I think these come from the ld docs: */     
102        ___CTOR_LIST__ = .;
103        LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)
104        *(.ctors)
105        LONG(0)
106        ___CTOR_END__ = .;
107        ___DTOR_LIST__ = .;
108        LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)
109        *(.dtors)
110        LONG(0)
111        ___DTOR_END__ = .;
112
113        _etext = .;
114        PROVIDE (etext = .);
115  } > sdram 
116
117  .fini      :
118  {
119    KEEP (*(.fini))
120  } > sdram  /*=0*/
121
122  .data :
123  {
124    *(.data)
125    *(.data.*)
126    *(.gnu.linkonce.d*)
127    *(.jcr)
128    SORT(CONSTRUCTORS)
129    _edata = .;
130  } > sdram
131
132  .eh_frame : { *(.eh_frame) } > RAM
133  .data1   : { *(.data1) } > RAM
134  .eh_frame : { *(.eh_frame) } > RAM
135  .gcc_except_table : { *(.gcc_except_table) } > RAM
136
137  .rodata :
138  {
139    *(.rodata)
140    *(.rodata.*)
141    *(.gnu.linkonce.r*)
142  } > sdram
143
144  .bss       :
145  {
146        _bss_start_ = .;
147        _clear_start = .;
148        *(.bss)
149        *(.bss.*)
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        . = ALIGN (1024);
176        _bss_free_start = .;
177
178  } > sdram
179
180/*
181  .regs :
182  {
183        ep7312_regs_base = .;
184        ep7312_regs = .;
185        . += 8192;
186  } > regs
187*/
188
189
190/* Debugging stuff follows? */
191
192  /* Stabs debugging sections.  */
193  .stab 0 : { *(.stab) }
194  .stabstr 0 : { *(.stabstr) }
195  .stab.excl 0 : { *(.stab.excl) }
196  .stab.exclstr 0 : { *(.stab.exclstr) }
197  .stab.index 0 : { *(.stab.index) }
198  .stab.indexstr 0 : { *(.stab.indexstr) }
199  .comment 0 : { *(.comment) }
200  /* DWARF debug sections.
201     Symbols in the DWARF debugging sections are relative to the beginning
202     of the section so we begin them at 0.  */
203  /* DWARF 1 */
204  .debug          0 : { *(.debug) }
205  .line           0 : { *(.line) }
206  /* GNU DWARF 1 extensions */
207  .debug_srcinfo  0 : { *(.debug_srcinfo) }
208  .debug_sfnames  0 : { *(.debug_sfnames) }
209  /* DWARF 1.1 and DWARF 2 */
210  .debug_aranges  0 : { *(.debug_aranges) }
211  .debug_pubnames 0 : { *(.debug_pubnames) }
212  /* DWARF 2 */
213  .debug_info     0 : { *(.debug_info) }
214  .debug_abbrev   0 : { *(.debug_abbrev) }
215  .debug_line     0 : { *(.debug_line) }
216  .debug_frame    0 : { *(.debug_frame) }
217  .debug_str      0 : { *(.debug_str) }
218  .debug_loc      0 : { *(.debug_loc) }
219  .debug_macinfo  0 : { *(.debug_macinfo) }
220  /* SGI/MIPS DWARF 2 extensions */
221  .debug_weaknames 0 : { *(.debug_weaknames) }
222  .debug_funcnames 0 : { *(.debug_funcnames) }
223  .debug_typenames 0 : { *(.debug_typenames) }
224  .debug_varnames  0 : { *(.debug_varnames) }
225  /*.stack 0x80000 : { _stack = .; *(.stack) }*/
226  /* These must appear regardless of  .  */
227}
228
Note: See TracBrowser for help on using the repository browser.