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

4.104.114.95
Last change on this file since d1f57b5 was d1f57b5, checked in by Joel Sherrill <joel.sherrill@…>, on 03/03/08 at 23:07:47

2008-03-03 Joel Sherrill <joel.sherrill@…>

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