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

4.115
Last change on this file since a36d1b4 was a36d1b4, checked in by Jennifer Averett <jennifer.averett@…>, on 04/04/12 at 17:21:15

Add MIPS/Malta BSP.

  • Property mode set to 100644
File size: 3.8 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      /*
29       * Special FreeBSD sysctl sections.
30       */
31      . = ALIGN (16);
32      __start_set_sysctl_set = .;
33      *(set_sysctl_*);
34      __stop_set_sysctl_set = ABSOLUTE(.);
35      *(set_domain_*);
36      *(set_pseudo_*);
37
38      *(.gcc_except_table*)
39      *(.eh_frame_hdr)
40      *(.eh_frame)
41    }
42
43  .init :
44  {
45        KEEP(*(.init))
46  }
47
48  .fini :
49  {
50        KEEP(*(.fini))
51  }
52
53  .ctors    :
54  {
55    /* gcc uses crtbegin.o to find the start of
56       the constructors, so we make sure it is
57       first.  Because this is a wildcard, it
58       doesn't matter if the user does not
59       actually link against crtbegin.o; the
60       linker won't look for a file to match a
61       wildcard.  The wildcard also means that it
62       doesn't matter which directory crtbegin.o
63       is in.  */
64
65    KEEP (*crtbegin.o(.ctors))
66
67    /* We don't want to include the .ctor section from
68       from the crtend.o file until after the sorted ctors.
69       The .ctor section from the crtend file contains the
70       end of ctors marker and it must be last */
71
72    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
73    KEEP (*(SORT(.ctors.*)))
74    KEEP (*(.ctors))
75  }
76
77  .dtors    :
78  {
79    KEEP (*crtbegin.o(.dtors))
80    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
81    KEEP (*(SORT(.dtors.*)))
82    KEEP (*(.dtors))
83
84    etext  =  .;
85    _etext  =  .;
86  }
87
88  .rdata : {
89    *(.rdata)
90    *(.rodata)
91    *(.rodata.*)
92    *(.gnu.linkonce.r*)
93  }
94   _fdata = ALIGN(16);
95
96  .data : {
97    *(.data)
98    *(.data.*)
99    *(.gnu.linkonce.d*)
100    SORT(CONSTRUCTORS)
101  }
102  . = ALIGN(8);
103
104  .jcr : {
105        KEEP (*(.jcr))
106  }
107
108  _gp = ALIGN(16) + 0x7440;
109  __global = _gp;
110
111  .sdata : {
112    *(.sdata)
113    *(.sdata.*)
114    *(.gnu.linkonce.s*)
115  }
116  .lit8 : {
117    *(.lit8)
118  }
119  .lit4 : {
120    *(.lit4)
121  }
122
123   edata  =  .;
124   _edata  =  .;
125   _fbss = .;
126
127  .sbss : {
128    *(.sbss*)
129    *(.scommon)
130  }
131  .bss : {
132    _bss_start = . ;
133    *(.bss*)
134    *(COMMON)
135    . = ALIGN (64);
136    _stack_limit = .;
137    . += _StackSize;
138    __stack = .;
139    _stack_init = .;
140    WorkAreaBase = .;
141    _clear_end = .;
142  }
143  . = 0x88400000; /* reserve some memory for Work Area */
144 end = .;
145 _end = .;
146
147
148/* Put starting stack in SRAM (8 Kb); this size is the same as the stack from
149      the original script (when everything was in SRAM). */
150   /* __stack = 0x8000A000; */
151  /* DWARF debug sections.
152     Symbols in the DWARF debugging sections are relative to
153     the beginning of the section so we begin them at 0.  */
154
155  /* DWARF 1 */
156  .debug          0 : { *(.debug) }
157  .line           0 : { *(.line) }
158
159  /* GNU DWARF 1 extensions */
160  .debug_srcinfo  0 : { *(.debug_srcinfo) }
161  .debug_sfnames  0 : { *(.debug_sfnames) }
162
163  /* DWARF 1.1 and DWARF 2 */
164  .debug_aranges  0 : { *(.debug_aranges) }
165  .debug_pubnames 0 : { *(.debug_pubnames) }
166
167  /* DWARF 2 */
168  .debug_info     0 : { *(.debug_info) }
169  .debug_abbrev   0 : { *(.debug_abbrev) }
170  .debug_line     0 : { *(.debug_line) }
171  .debug_frame    0 : { *(.debug_frame) }
172  .debug_str      0 : { *(.debug_str) }
173  .debug_loc      0 : { *(.debug_loc) }
174  .debug_macinfo  0 : { *(.debug_macinfo) }
175
176  /* SGI/MIPS DWARF 2 extensions */
177  .debug_weaknames 0 : { *(.debug_weaknames) }
178  .debug_funcnames 0 : { *(.debug_funcnames) }
179  .debug_typenames 0 : { *(.debug_typenames) }
180  .debug_varnames  0 : { *(.debug_varnames) }
181}
Note: See TracBrowser for help on using the repository browser.