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

4.104.114.84.95
Last change on this file since a9c55f5 was a9c55f5, checked in by Joel Sherrill <joel.sherrill@…>, on 12/06/00 at 15:43:35

2000-12-06 Joel Sherrill <joel@…>

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