source: rtems/c/src/lib/libbsp/mips/genmongoosev/startup/linkcmds @ 960fd85

4.115
Last change on this file since 960fd85 was 960fd85, checked in by Sebastian Huber <sebastian.huber@…>, on 01/28/14 at 10:52:17

bsps: Thread-local storage (TLS) for linkcmds

  • Property mode set to 100644
File size: 4.4 KB
Line 
1/*
2 *  Linker script for Mongoose-V prototyping board.
3 *  See README for address map details.
4 */
5
6/*    . = 0x80020000; */
7
8/*
9 * Declare some sizes.
10 */
11
12RamBase = DEFINED(RamBase) ? RamBase : 0x80000000;
13RamSize = DEFINED(RamSize) ? RamSize : 32M;
14HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
15_StackSize = DEFINED(_StackSize) ? _StackSize : 0x4000;
16ClockRate = DEFINED(ClockRate) ? ClockRate : 12000000;
17
18MEMORY
19{
20   ram      : ORIGIN = 0x80020000, LENGTH = 4M
21}
22
23SECTIONS
24{
25    .text :
26    {
27       _ftext = . ;
28
29      */start.o(.text)
30
31      *(.text*)
32      *(.gnu.linkonce.t*)
33      *(.mips16.fn.*)
34      *(.mips16.call.*)
35      *(.reginfo)
36      PROVIDE (__runtime_reloc_start = .);
37      *(.rel.sdata)
38      *(.rel.dyn)
39      PROVIDE (__runtime_reloc_stop = .);
40
41      /*
42       * Special FreeBSD sysctl sections.
43       */
44      . = ALIGN (16);
45      __start_set_sysctl_set = .;
46      *(set_sysctl_*);
47      __stop_set_sysctl_set = ABSOLUTE(.);
48      *(set_domain_*);
49      *(set_pseudo_*);
50
51      *(.gcc_except_table*)
52      *(.eh_frame_hdr)
53      *(.eh_frame)
54    } >ram 
55
56  .init :
57  {
58     KEEP(*(.init))
59
60  } > ram
61
62  .fini :
63  {
64     KEEP(*(.fini))
65
66  }  > ram
67
68
69  .ctors    :
70  {
71    /* gcc uses crtbegin.o to find the start of
72       the constructors, so we make sure it is
73       first.  Because this is a wildcard, it
74       doesn't matter if the user does not
75       actually link against crtbegin.o; the
76       linker won't look for a file to match a
77       wildcard.  The wildcard also means that it
78       doesn't matter which directory crtbegin.o
79       is in.  */
80
81    KEEP (*crtbegin.o(.ctors))
82
83    /* We don't want to include the .ctor section from
84       from the crtend.o file until after the sorted ctors.
85       The .ctor section from the crtend file contains the
86       end of ctors marker and it must be last */
87
88    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
89    KEEP (*(SORT(.ctors.*)))
90    KEEP (*(.ctors))
91  } >ram 
92
93  .dtors    :
94  {
95    KEEP (*crtbegin.o(.dtors))
96    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
97    KEEP (*(SORT(.dtors.*)))
98    KEEP (*(.dtors))
99
100    etext  =  .;
101    _etext  =  .;
102  } >ram 
103
104
105
106  .rdata :
107  {
108    *(.rdata)
109    *(.rodata)
110    *(.rodata.*)
111    *(.gnu.linkonce.r*)
112  } >ram 
113
114  .tdata : {
115    _TLS_Data_begin = .;
116    *(.tdata .tdata.* .gnu.linkonce.td.*)
117    _TLS_Data_end = .;
118  } >ram
119
120  .tbss : {
121    _TLS_BSS_begin = .;
122    *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
123    _TLS_BSS_end = .;
124  } >ram
125
126  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
127  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
128  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
129  _TLS_Alignment = ALIGNOF (.tdata);
130
131  .data :
132  {
133    _fdata = ALIGN(16);
134
135    *(.data)
136    *(.data.*)
137    *(.gnu.linkonce.d*)
138  } >ram 
139
140  .jcr :
141  {
142    . = ALIGN(8);
143    KEEP (*(.jcr))
144
145    _gp = ALIGN(16) + 0x7440;
146    __global = _gp;
147  } >ram
148
149  .lit8 :
150  {
151    *(.lit8)
152  } >ram 
153
154  .lit4 :
155  {
156    *(.lit4)
157  } >ram   
158
159  .sdata :   
160  {
161    *(.sdata*)
162    *(.gnu.linkonce.s*)
163  } >ram 
164
165  .sbss :
166  {
167   edata  =  .;
168   _edata  =  .;
169   _fbss = .;
170    *(.sbss*)
171    *(.scommon)
172  } >ram   
173
174
175  .bss :
176  {
177    _bss_start = . ;
178    *(.bss .bss.* .gnu.linkonce.b.*)
179    *(COMMON)
180    . = ALIGN (64);
181    _stack_limit = .;
182    . += _StackSize;
183    __stack = .;
184    _stack_init = .;
185    _clear_end = .;
186    WorkAreaBase = .;
187    end = .;
188    _end = .;
189  } >ram   
190
191
192/*
193** DWARF debug sections.
194** Symbols in the DWARF debugging sections are relative to
195** the beginning of the section so we begin them at 0. 
196*/
197
198  /* DWARF 1 */
199  .debug          0 : { *(.debug) }
200  .line           0 : { *(.line) }
201
202  /* GNU DWARF 1 extensions */
203  .debug_srcinfo  0 : { *(.debug_srcinfo) }
204  .debug_sfnames  0 : { *(.debug_sfnames) }
205
206  /* DWARF 1.1 and DWARF 2 */
207  .debug_aranges  0 : { *(.debug_aranges) }
208  .debug_pubnames 0 : { *(.debug_pubnames) }
209
210  /* DWARF 2 */
211  .debug_info     0 : { *(.debug_info) }   
212  .debug_abbrev   0 : { *(.debug_abbrev) } 
213  .debug_line     0 : { *(.debug_line) }   
214  .debug_frame    0 : { *(.debug_frame)}   
215  .debug_str      0 : { *(.debug_str) }     
216  .debug_loc      0 : { *(.debug_loc) }     
217  .debug_macinfo  0 : { *(.debug_macinfo) }
218
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}
Note: See TracBrowser for help on using the repository browser.