source: rtems/c/src/lib/libbsp/mips/genmongoosev/startup/linkcmds @ c9e7297

4.104.114.84.95
Last change on this file since c9e7297 was c9e7297, checked in by Joel Sherrill <joel.sherrill@…>, on 04/16/01 at 19:30:13

2001-04-16 Joel Sherrill <joel@…>

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