source: rtems/bsps/mips/rbtx4925/start/linkcmds @ 9964895

5
Last change on this file since 9964895 was 9964895, checked in by Sebastian Huber <sebastian.huber@…>, on 04/20/18 at 08:35:35

bsps: Move startup files to bsps

Adjust build support files to new directory layout.

This patch is a part of the BSP source reorganization.

Update #3285.

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