source: rtems/c/src/lib/libbsp/mips/malta/startup/linkcmds @ 864cf50

4.115
Last change on this file since 864cf50 was 864cf50, checked in by Joel Sherrill <joel.sherrill@…>, on 07/17/12 at 21:20:01

mips/malta: Add sections for new FreeBSD TCP/IP stack

  • Property mode set to 100644
File size: 4.1 KB
Line 
1/*
2 *  MIPS Malta Linker Script
3 */
4
5/*
6 * Declare some sizes.
7 */
8RamBase = DEFINED(RamBase) ? RamBase : 0x80000000;
9RamSize = DEFINED(RamSize) ? RamSize : 128M;
10HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
11_StackSize = DEFINED(_StackSize) ? _StackSize : 0x2000;
12
13SECTIONS
14{
15    . = 0x80010000;
16    .text :
17    {
18       _ftext = . ;
19       eprol  =  .;
20      *(.text*)
21      *(.gnu.linkonce.t*)
22      *(.mips16.fn.*)
23      *(.mips16.call.*)
24      PROVIDE (__runtime_reloc_start = .);
25      *(.rel.sdata)
26      PROVIDE (__runtime_reloc_stop = .);
27
28      *(.gcc_except_table*)
29      *(.eh_frame_hdr)
30      *(.eh_frame)
31    }
32
33  .init :
34  {
35        KEEP(*(.init))
36  }
37
38  .fini :
39  {
40        KEEP(*(.fini))
41  }
42
43  .ctors    :
44  {
45    /* gcc uses crtbegin.o to find the start of
46       the constructors, so we make sure it is
47       first.  Because this is a wildcard, it
48       doesn't matter if the user does not
49       actually link against crtbegin.o; the
50       linker won't look for a file to match a
51       wildcard.  The wildcard also means that it
52       doesn't matter which directory crtbegin.o
53       is in.  */
54
55    KEEP (*crtbegin.o(.ctors))
56
57    /* We don't want to include the .ctor section from
58       from the crtend.o file until after the sorted ctors.
59       The .ctor section from the crtend file contains the
60       end of ctors marker and it must be last */
61
62    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
63    KEEP (*(SORT(.ctors.*)))
64    KEEP (*(.ctors))
65  }
66
67  .dtors    :
68  {
69    KEEP (*crtbegin.o(.dtors))
70    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
71    KEEP (*(SORT(.dtors.*)))
72    KEEP (*(.dtors))
73
74    etext  =  .;
75    _etext  =  .;
76  }
77
78  .robsdsets : {
79    /* for pre rtems-libbsd FreeBSD code */
80    __start_set_sysctl_set = .;
81    *(set_sysctl_*);
82    __stop_set_sysctl_set = .;
83    *(set_domain_*);
84    *(set_pseudo_*);
85
86    /* for rtems-libbsd FreeBSD code */
87    _bsd__start_set_modmetadata_set = .;
88    *(_bsd_set_modmetadata_set);
89    _bsd__stop_set_modmetadata_set = .;
90
91    _bsd__start_set_sysctl_set = .;
92    *(_bsd_set_sysctl_set);
93    _bsd__stop_set_sysctl_set = .;
94
95    _bsd__start_set_sysinit_set = .;
96    *(_bsd_set_sysinit_*);
97    _bsd__stop_set_sysinit_set = .;
98
99    . = ALIGN (16);
100    _endtext = .;
101  }
102
103  .rdata : {
104    *(.rdata)
105    *(.rodata)
106    *(.rodata.*)
107    *(.gnu.linkonce.r*)
108  }
109   _fdata = ALIGN(16);
110
111  .data : {
112    *(.data)
113    *(.data.*)
114    *(.gnu.linkonce.d*)
115    SORT(CONSTRUCTORS)
116  }
117  . = ALIGN(8);
118
119  .jcr : {
120        KEEP (*(.jcr))
121  }
122
123  _gp = ALIGN(16) + 0x7440;
124  __global = _gp;
125
126  .sdata : {
127    *(.sdata)
128    *(.sdata.*)
129    *(.gnu.linkonce.s*)
130  }
131  .lit8 : {
132    *(.lit8)
133  }
134  .lit4 : {
135    *(.lit4)
136  }
137
138   edata  =  .;
139   _edata  =  .;
140   _fbss = .;
141
142  .sbss : {
143    *(.sbss*)
144    *(.scommon)
145  }
146  .bss : {
147    _bss_start = . ;
148    *(.bss*)
149    *(COMMON)
150    . = ALIGN (64);
151    _stack_limit = .;
152    . += _StackSize;
153    __stack = .;
154    _stack_init = .;
155    WorkAreaBase = .;
156    _clear_end = .;
157  }
158  . = 0x88400000; /* reserve some memory for Work Area */
159 end = .;
160 _end = .;
161
162
163/* Put starting stack in SRAM (8 Kb); this size is the same as the stack from
164      the original script (when everything was in SRAM). */
165   /* __stack = 0x8000A000; */
166  /* DWARF debug sections.
167     Symbols in the DWARF debugging sections are relative to
168     the beginning of the section so we begin them at 0.  */
169
170  /* DWARF 1 */
171  .debug          0 : { *(.debug) }
172  .line           0 : { *(.line) }
173
174  /* GNU DWARF 1 extensions */
175  .debug_srcinfo  0 : { *(.debug_srcinfo) }
176  .debug_sfnames  0 : { *(.debug_sfnames) }
177
178  /* DWARF 1.1 and DWARF 2 */
179  .debug_aranges  0 : { *(.debug_aranges) }
180  .debug_pubnames 0 : { *(.debug_pubnames) }
181
182  /* DWARF 2 */
183  .debug_info     0 : { *(.debug_info) }
184  .debug_abbrev   0 : { *(.debug_abbrev) }
185  .debug_line     0 : { *(.debug_line) }
186  .debug_frame    0 : { *(.debug_frame) }
187  .debug_str      0 : { *(.debug_str) }
188  .debug_loc      0 : { *(.debug_loc) }
189  .debug_macinfo  0 : { *(.debug_macinfo) }
190
191  /* SGI/MIPS DWARF 2 extensions */
192  .debug_weaknames 0 : { *(.debug_weaknames) }
193  .debug_funcnames 0 : { *(.debug_funcnames) }
194  .debug_typenames 0 : { *(.debug_typenames) }
195  .debug_varnames  0 : { *(.debug_varnames) }
196}
Note: See TracBrowser for help on using the repository browser.