source: rtems/c/src/lib/libbsp/mips/jmr3904/startup/linkcmds @ 8f10c92

4.104.114.84.95
Last change on this file since 8f10c92 was 8f10c92, checked in by Joel Sherrill <joel.sherrill@…>, on 01/03/03 at 16:45:10

2002-12-08 Greg Menke <gregory.menke@…>

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