source: rtems/c/src/lib/libbsp/mips/genmongoosev/startup/linkcmds @ 9cd4a6e8

4.104.114.84.95
Last change on this file since 9cd4a6e8 was 8f10c92, checked in by Joel Sherrill <joel.sherrill@…>, on 01/03/03 at 16:45:10

2002-12-08 Greg Menke <gregory.menke@…>

  • bsp_specs: Added crtbegin/crtend and INIT_FINI for C++ support.
  • linkcmds: Added .init, .fini & related sections.
  • Property mode set to 100644
File size: 3.8 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 : 0x4000;
18ClockRate = DEFINED(ClockRate) ? ClockRate : 12000000;
19
20
21
22MEMORY
23{
24   ram      : ORIGIN = 0x80020000, LENGTH = 4M
25}
26
27SECTIONS
28{
29    .text :
30    {
31       _ftext = . ;
32
33      */start.o(.text)
34
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
45      *(.gcc_except_table)
46      *(.eh_frame_hdr)
47      *(.eh_frame)
48    } >ram 
49
50  .init :
51  {
52     KEEP(*(.init))
53
54  } > ram
55
56  .fini :
57  {
58     KEEP(*(.fini))
59
60  }  > ram
61
62
63  .ctors    :
64  {
65    /* gcc uses crtbegin.o to find the start of
66       the constructors, so we make sure it is
67       first.  Because this is a wildcard, it
68       doesn't matter if the user does not
69       actually link against crtbegin.o; the
70       linker won't look for a file to match a
71       wildcard.  The wildcard also means that it
72       doesn't matter which directory crtbegin.o
73       is in.  */
74
75    KEEP (*crtbegin.o(.ctors))
76
77    /* We don't want to include the .ctor section from
78       from the crtend.o file until after the sorted ctors.
79       The .ctor section from the crtend file contains the
80       end of ctors marker and it must be last */
81
82    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
83    KEEP (*(SORT(.ctors.*)))
84    KEEP (*(.ctors))
85  } >ram 
86
87  .dtors    :
88  {
89    KEEP (*crtbegin.o(.dtors))
90    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
91    KEEP (*(SORT(.dtors.*)))
92    KEEP (*(.dtors))
93
94    etext  =  .;
95    _etext  =  .;
96  } >ram 
97
98
99
100  .rdata :
101  {
102    *(.rdata)
103    *(.rodata)
104    *(.rodata.*)
105    *(.gnu.linkonce.r*)
106  } >ram 
107
108  .data :
109  {
110    _fdata = ALIGN(16);
111
112    *(.data)
113    *(.data.*)
114    *(.gnu.linkonce.d*)
115  } >ram 
116
117  .jcr :
118  {
119    . = ALIGN(8);
120    KEEP (*(.jcr))
121
122    _gp = ALIGN(16) + 0x7440;
123    __global = _gp;
124  } >ram
125
126  .lit8 :
127  {
128    *(.lit8)
129  } >ram 
130
131  .lit4 :
132  {
133    *(.lit4)
134  } >ram   
135
136  .sdata :   
137  {
138    *(.sdata)
139    *(.sdata.*)
140    *(.gnu.linkonce.s*)
141  } >ram 
142
143  .sbss :
144  {
145   edata  =  .;
146   _edata  =  .;
147   _fbss = .;
148    *(.sbss)
149    *(.scommon)
150  } >ram   
151
152
153  .bss :
154  {
155    _bss_start = . ;
156    *(.bss)
157    *(.reginfo)
158    *(COMMON)
159    . = ALIGN (64);
160    _stack_limit = .;
161    . += _StackSize;
162    __stack = .;
163    _stack_init = .;
164    _clear_end = .;
165    HeapBase = .;
166    . += HeapSize;    /* reserve some memory for heap */
167    WorkspaceBase = .;
168    end = .;
169    _end = .;
170  } >ram   
171
172
173/*
174** DWARF debug sections.
175** Symbols in the DWARF debugging sections are relative to
176** the beginning of the section so we begin them at 0. 
177*/
178
179  /* DWARF 1 */
180  .debug          0 : { *(.debug) }
181  .line           0 : { *(.line) }
182
183  /* GNU DWARF 1 extensions */
184  .debug_srcinfo  0 : { *(.debug_srcinfo) }
185  .debug_sfnames  0 : { *(.debug_sfnames) }
186
187  /* DWARF 1.1 and DWARF 2 */
188  .debug_aranges  0 : { *(.debug_aranges) }
189  .debug_pubnames 0 : { *(.debug_pubnames) }
190
191  /* DWARF 2 */
192  .debug_info     0 : { *(.debug_info) }   
193  .debug_abbrev   0 : { *(.debug_abbrev) } 
194  .debug_line     0 : { *(.debug_line) }   
195  .debug_frame    0 : { *(.debug_frame)}   
196  .debug_str      0 : { *(.debug_str) }     
197  .debug_loc      0 : { *(.debug_loc) }     
198  .debug_macinfo  0 : { *(.debug_macinfo) }
199
200  /* SGI/MIPS DWARF 2 extensions */
201  .debug_weaknames 0 : { *(.debug_weaknames) }
202  .debug_funcnames 0 : { *(.debug_funcnames) }
203  .debug_typenames 0 : { *(.debug_typenames) }
204  .debug_varnames  0 : { *(.debug_varnames) } 
205}
Note: See TracBrowser for help on using the repository browser.