source: rtems/c/src/lib/libbsp/mips/genmongoosev/startup/linkcmds @ 7de58239

4.104.114.84.95
Last change on this file since 7de58239 was 7de58239, checked in by Joel Sherrill <joel.sherrill@…>, on Feb 1, 2002 at 4:45:18 PM

2001-02-01 Greg Menke <gregory.menke@…>

  • Update of BSP to address problems restarting, provide more information during boot, and better handle ROM vs RAM images.
  • README, include/bsp.h, start/regs.S, start/start.S, startup/bspstart.c, startup/linkcmds, timer/timer.c: Updated
  • Property mode set to 100644
File size: 4.0 KB
Line 
1/*
2 *  Linker script for Mongoose-V prototyping board.
3 *  See README for address map details.
4 *
5 *  $Id$
6 */
7
8/*    . = 0x80020000; */
9
10/*
11 * Declare some sizes.
12 */
13
14_RamBase = DEFINED(_RamBase) ? _RamBase : 0x80000000;
15_RamSize = DEFINED(_RamSize) ? _RamSize : 32M;
16HeapSize = DEFINED(HeapSize) ? HeapSize : 0x40000;
17_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
18ClockRate = DEFINED(ClockRate) ? ClockRate : 12000000;
19
20
21
22MEMORY
23{
24   romstore : ORIGIN = 0xbfc40000, LENGTH = 4M
25   ram      : ORIGIN = 0x80020000, LENGTH = 4M
26}
27
28SECTIONS
29{
30    .text :
31    {
32       _ftext = . ;
33      *(.init)
34       eprol  =  .;
35      *(.text)
36      *(.text.*)
37      *(.gnu.linkonce.t*)
38      *(.mips16.fn.*)
39      *(.mips16.call.*)
40      PROVIDE (__runtime_reloc_start = .);
41      *(.rel.sdata)
42      *(.rel.dyn)
43      PROVIDE (__runtime_reloc_stop = .);
44      *(.fini)
45    } >ram  AT>romstore
46
47  .ctors    :
48  {
49    /* gcc uses crtbegin.o to find the start of
50       the constructors, so we make sure it is
51       first.  Because this is a wildcard, it
52       doesn't matter if the user does not
53       actually link against crtbegin.o; the
54       linker won't look for a file to match a
55       wildcard.  The wildcard also means that it
56       doesn't matter which directory crtbegin.o
57       is in.  */
58
59    KEEP (*crtbegin.o(.ctors))
60
61    /* We don't want to include the .ctor section from
62       from the crtend.o file until after the sorted ctors.
63       The .ctor section from the crtend file contains the
64       end of ctors marker and it must be last */
65
66    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
67    KEEP (*(SORT(.ctors.*)))
68    KEEP (*(.ctors))
69  } >ram  AT>romstore
70
71  .dtors    :
72  {
73    KEEP (*crtbegin.o(.dtors))
74    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
75    KEEP (*(SORT(.dtors.*)))
76    KEEP (*(.dtors))
77
78    etext  =  .;
79    _etext  =  .;
80  } >ram  AT>romstore
81
82/*    . = .; */
83
84  .rdata :
85  {
86    *(.rdata)
87    *(.rodata)
88    *(.rodata.*)
89    *(.gnu.linkonce.r*)
90  } >ram  AT>romstore
91
92  .data :
93  {
94    _fdata = ALIGN(16);
95
96    *(.data)
97    *(.data.*)
98    *(.gnu.linkonce.d*)
99  } >ram  AT>romstore
100
101
102  .lit8 :
103  {
104    . = ALIGN(8);
105
106    _gp = . + 0x8000;
107    __global = _gp;
108    *(.lit8)
109  } >ram  AT>romstore
110
111  .lit4 :
112  {
113    *(.lit4)
114  } >ram  AT>romstore
115
116  .sdata :   
117  {
118    *(.sdata)
119    *(.sdata.*)
120    *(.gnu.linkonce.s*)
121  } >ram  AT>romstore
122
123  .sbss :
124  {
125  . = ALIGN(4);
126   edata  =  .;
127   _edata  =  .;
128   _fbss = .;
129    *(.sbss)
130    *(.scommon)
131  } >ram  AT>romstore
132
133
134  .bss :
135  {
136    _bss_start = . ;
137    *(.bss)
138    *(.reginfo)
139    *(COMMON)
140    . = ALIGN (64);
141    _stack_limit = .;
142    . += _StackSize;
143    __stack = .;
144    _stack_init = .;
145    _clear_end = .;
146    HeapBase = .;
147    . += HeapSize;    /* reserve some memory for heap */
148    WorkspaceBase = .;
149    end = .;
150    _end = .;
151  } >ram  AT>romstore
152
153
154/*
155** DWARF debug sections.
156** Symbols in the DWARF debugging sections are relative to
157** the beginning of the section so we begin them at 0. 
158*/
159
160  /* DWARF 1 */
161  .debug          0 : { *(.debug) } AT>romstore
162  .line           0 : { *(.line) } AT>romstore
163
164  /* GNU DWARF 1 extensions */
165  .debug_srcinfo  0 : { *(.debug_srcinfo) } AT>romstore
166  .debug_sfnames  0 : { *(.debug_sfnames) } AT>romstore
167
168  /* DWARF 1.1 and DWARF 2 */
169  .debug_aranges  0 : { *(.debug_aranges) } AT>romstore
170  .debug_pubnames 0 : { *(.debug_pubnames) } AT>romstore
171
172  /* DWARF 2 */
173  .debug_info     0 : { *(.debug_info) }    AT>romstore
174  .debug_abbrev   0 : { *(.debug_abbrev) }  AT>romstore
175  .debug_line     0 : { *(.debug_line) }    AT>romstore
176  .debug_frame    0 : { *(.debug_frame)}    AT>romstore
177  .debug_str      0 : { *(.debug_str) }     AT>romstore
178  .debug_loc      0 : { *(.debug_loc) }     AT>romstore
179  .debug_macinfo  0 : { *(.debug_macinfo) } AT>romstore
180
181  /* SGI/MIPS DWARF 2 extensions */
182  .debug_weaknames 0 : { *(.debug_weaknames) } AT>romstore
183  .debug_funcnames 0 : { *(.debug_funcnames) } AT>romstore
184  .debug_typenames 0 : { *(.debug_typenames) } AT>romstore
185  .debug_varnames  0 : { *(.debug_varnames) }  AT>romstore
186}
Note: See TracBrowser for help on using the repository browser.