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

4.104.114.84.95
Last change on this file since b85df34 was b335c503, checked in by Joel Sherrill <joel.sherrill@…>, on 04/20/01 at 13:14:55

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

  • include/bsp.h (Clear_tm27_intr): Stop the timer and disable the interrupt. This was not quite right before and we were getting uncontrolled interrupt nesting in tm27.
  • timer/timer.c (Timer_Initialize): Added an extra reset and changed the ITMR register so we will never get an interrupt. (Read_timer): Fixed so the timer actually stops before it is read. Before some times reported were outraguously high.
  • start/start.S: Major clean including using stack in linkcmds, deleting unused code, and zeroing the BSS using the linkcmds information.
  • startup/linkcmds: Put heap in lower memory than workspace and move _clear_end so both are zeroed.
  • Property mode set to 100644
File size: 3.6 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    HeapBase = .;
112    . += HeapSize;    /* reserve some memory for heap */
113    WorkspaceBase = .;
114     /* HACK -- tied to value bspstart */
115    . += 4096K;    /* reserve some memory for workspace */
116    _clear_end = .;
117  }
118 end = .;
119 _end = .;
120
121
122/* Put starting stack in SRAM (8 Kb); this size is the same as the stack from
123      the original script (when everything was in SRAM). */
124   /* __stack = 0x8000A000; */
125  /* DWARF debug sections.
126     Symbols in the DWARF debugging sections are relative to
127     the beginning of the section so we begin them at 0.  */
128
129  /* DWARF 1 */
130  .debug          0 : { *(.debug) }
131  .line           0 : { *(.line) }
132
133  /* GNU DWARF 1 extensions */
134  .debug_srcinfo  0 : { *(.debug_srcinfo) }
135  .debug_sfnames  0 : { *(.debug_sfnames) }
136
137  /* DWARF 1.1 and DWARF 2 */
138  .debug_aranges  0 : { *(.debug_aranges) }
139  .debug_pubnames 0 : { *(.debug_pubnames) }
140
141  /* DWARF 2 */
142  .debug_info     0 : { *(.debug_info) }
143  .debug_abbrev   0 : { *(.debug_abbrev) }
144  .debug_line     0 : { *(.debug_line) }
145  .debug_frame    0 : { *(.debug_frame) }
146  .debug_str      0 : { *(.debug_str) }
147  .debug_loc      0 : { *(.debug_loc) }
148  .debug_macinfo  0 : { *(.debug_macinfo) }
149
150  /* SGI/MIPS DWARF 2 extensions */
151  .debug_weaknames 0 : { *(.debug_weaknames) }
152  .debug_funcnames 0 : { *(.debug_funcnames) }
153  .debug_typenames 0 : { *(.debug_typenames) }
154  .debug_varnames  0 : { *(.debug_varnames) }
155}
Note: See TracBrowser for help on using the repository browser.