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

4.104.115
Last change on this file since c4e0484c was c4e0484c, checked in by Joel Sherrill <joel.sherrill@…>, on 09/16/08 at 20:58:50

2008-09-16 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, startup/linkcmds: Use top level shared bsp_get_work_area() implementation.
  • startup/bspgetworkarea.c: Removed.
  • Property mode set to 100644
File size: 3.8 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 */
10RamBase = DEFINED(RamBase) ? RamBase : 0x88000000;
11RamSize = DEFINED(RamSize) ? RamSize : 4M;
12HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
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    WorkAreaBase = .;
143    _clear_end = .;
144  }
145  . = 0x88400000; /* reserve some memory for Work Area */
146 end = .;
147 _end = .;
148
149
150/* Put starting stack in SRAM (8 Kb); this size is the same as the stack from
151      the original script (when everything was in SRAM). */
152   /* __stack = 0x8000A000; */
153  /* DWARF debug sections.
154     Symbols in the DWARF debugging sections are relative to
155     the beginning of the section so we begin them at 0.  */
156
157  /* DWARF 1 */
158  .debug          0 : { *(.debug) }
159  .line           0 : { *(.line) }
160
161  /* GNU DWARF 1 extensions */
162  .debug_srcinfo  0 : { *(.debug_srcinfo) }
163  .debug_sfnames  0 : { *(.debug_sfnames) }
164
165  /* DWARF 1.1 and DWARF 2 */
166  .debug_aranges  0 : { *(.debug_aranges) }
167  .debug_pubnames 0 : { *(.debug_pubnames) }
168
169  /* DWARF 2 */
170  .debug_info     0 : { *(.debug_info) }
171  .debug_abbrev   0 : { *(.debug_abbrev) }
172  .debug_line     0 : { *(.debug_line) }
173  .debug_frame    0 : { *(.debug_frame) }
174  .debug_str      0 : { *(.debug_str) }
175  .debug_loc      0 : { *(.debug_loc) }
176  .debug_macinfo  0 : { *(.debug_macinfo) }
177
178  /* SGI/MIPS DWARF 2 extensions */
179  .debug_weaknames 0 : { *(.debug_weaknames) }
180  .debug_funcnames 0 : { *(.debug_funcnames) }
181  .debug_typenames 0 : { *(.debug_typenames) }
182  .debug_varnames  0 : { *(.debug_varnames) }
183}
Note: See TracBrowser for help on using the repository browser.