source: rtems/c/src/lib/libbsp/mips/rbtx4938/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: 3.6 KB
Line 
1/*
2 *  linkcmds
3 */
4
5/*
6 * Declare some sizes.
7 */
8RamBase = DEFINED(RamBase) ? RamBase : 0x80000000;
9RamSize = DEFINED(RamSize) ? RamSize : 4M;
10HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
11_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
12
13SECTIONS
14{
15  /* 0x80000000 - 0x800FFFFF used by YAMON
16        0x80120000 - 0x8012FFFF reserved for shared memory
17        0x80130000 beginning of text (code) section
18   */
19    .text 0x80130000 :
20    {
21       _ftext = . ;
22       eprol  =  .;
23      *(.text)
24      *(.text.*)
25      *(.gnu.linkonce.t*)
26      *(.mips16.fn.*)
27      *(.mips16.call.*)
28      PROVIDE (__runtime_reloc_start = .);
29      *(.rel.sdata)
30      PROVIDE (__runtime_reloc_stop = .);
31
32      /*
33       * Special FreeBSD sysctl sections.
34       */
35      . = ALIGN (16);
36      __start_set_sysctl_set = .;
37      *(set_sysctl_*);
38      __stop_set_sysctl_set = ABSOLUTE(.);
39      *(set_domain_*);
40      *(set_pseudo_*);
41
42      *(.gcc_except_table*)
43      *(.eh_frame_hdr)
44      *(.eh_frame)
45    }
46
47  .init :
48  {
49        KEEP(*crti.o(.init))
50        KEEP(*(.init))
51        KEEP(*crtn.o(.init))
52  }
53
54  .fini :
55  {
56        KEEP(*crti.o(.fini))
57        KEEP(*(.fini))
58        KEEP(*crtn.o(.fini))
59  }
60
61  .ctors    :
62  {
63    /* gcc uses crtbegin.o to find the start of
64       the constructors, so we make sure it is
65       first.  Because this is a wildcard, it
66       doesn't matter if the user does not
67       actually link against crtbegin.o; the
68       linker won't look for a file to match a
69       wildcard.  The wildcard also means that it
70       doesn't matter which directory crtbegin.o
71       is in.  */
72
73    KEEP (*crtbegin.o(.ctors))
74
75    /* We don't want to include the .ctor section from
76       from the crtend.o file until after the sorted ctors.
77       The .ctor section from the crtend file contains the
78       end of ctors marker and it must be last */
79
80    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
81    KEEP (*(SORT(.ctors.*)))
82    KEEP (*(.ctors))
83  }
84
85  .dtors    :
86  {
87    KEEP (*crtbegin.o(.dtors))
88    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
89    KEEP (*(SORT(.dtors.*)))
90    KEEP (*(.dtors))
91
92    etext  =  .;
93    _etext  =  .;
94  }
95
96  .rdata : {
97    *(.rdata)
98    *(.rodata)
99    *(.rodata.*)
100    *(.gnu.linkonce.r*)
101  }
102
103  .tdata : {
104    _TLS_Data_begin = .;
105    *(.tdata .tdata.* .gnu.linkonce.td.*)
106    _TLS_Data_end = .;
107  }
108
109  .tbss : {
110    _TLS_BSS_begin = .;
111    *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
112    _TLS_BSS_end = .;
113  }
114
115  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
116  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
117  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
118  _TLS_Alignment = ALIGNOF (.tdata);
119
120   _fdata = ALIGN(16);
121
122  .data : {
123    *(.data)
124    *(.data.*)
125    *(.gnu.linkonce.d*)
126    SORT(CONSTRUCTORS)
127  }
128  . = ALIGN(8);
129
130  .jcr : {
131        KEEP (*(.jcr))
132  }
133
134  _gp = ALIGN(16) + 0x8000;
135  __global = _gp;
136
137  .sdata : {
138    *(.sdata)
139    *(.sdata.*)
140    *(.gnu.linkonce.s*)
141  }
142  .lit8 : {
143    *(.lit8)
144  }
145  .lit4 : {
146    *(.lit4)
147  }
148
149   edata  =  .;
150   _edata  =  .;
151   _fbss = .;
152
153  .sbss : {
154    *(.sbss)
155    *(.scommon)
156  }
157  .bss : {
158    _bss_start = . ;
159    *(.bss)
160    *(COMMON)
161    . = ALIGN (64);
162    _stack_limit = .;
163    . += _StackSize;
164    __stack = .;
165    _stack_init = .;
166     end = .;
167    _end = .;
168    WorkAreaBase = .;
169  }
170
171
172  /* Debug sections.  These should never be loadable, but they must have
173     zero addresses for the debuggers to work correctly.  */
174  .line                 0 : { *(.line)                  }
175  .debug                0 : { *(.debug)                 }
176  .debug_sfnames        0 : { *(.debug_sfnames)         }
177  .debug_srcinfo        0 : { *(.debug_srcinfo)         }
178  .debug_macinfo        0 : { *(.debug_macinfo)         }
179  .debug_pubnames       0 : { *(.debug_pubnames)        }
180  .debug_aranges        0 : { *(.debug_aranges)         }
181}
Note: See TracBrowser for help on using the repository browser.