source: rtems/c/src/lib/libbsp/sparc/leon/startup/linkcmds @ 9c1133e

4.104.114.84.95
Last change on this file since 9c1133e was 9c1133e, checked in by Joel Sherrill <joel.sherrill@…>, on 01/20/03 at 19:57:14

mkChangeLogList [-n]

  • Property mode set to 100644
File size: 3.5 KB
Line 
1/*  linkcmds
2 *
3 *  $Id$
4 */
5
6OUTPUT_ARCH(sparc)
7__DYNAMIC  =  0;
8
9/*
10 * The memory map looks like this:
11 * +--------------------+ <- low memory
12 * | .text              |
13 * |        etext       |
14 * |        ctor list   | the ctor and dtor lists are for
15 * |        dtor list   | C++ support
16 * |        _endtext    |
17 * +--------------------+
18 * | .data              | initialized data goes here
19 * |        _sdata      |
20 * |        _edata      |
21 * +--------------------+
22 * | .bss               |
23 * |        __bss_start | start of bss, cleared by crt0
24 * |        _end        | start of heap, used by sbrk()
25 * +--------------------+
26 * |    heap space      |
27 * |        _ENDHEAP    |
28 * |    stack space     |
29 * |        __stack     | top of stack
30 * +--------------------+ <- high memory
31 */
32
33
34/*
35 * User modifiable values:
36 *
37 * _CLOCK_SPEED               in Mhz (used to program the counter/timers)
38 *
39 * _PROM_SIZE                 size of PROM (permissible values are 128K, 256K,
40 *                               512K, 1M, 2M, 4M, 8M and 16M)
41 * _RAM_SIZE                  size of RAM (permissible values are 256K, 512K,
42 *                               1M, 2M, 4M, 8M, 16M, and 32M)
43 *
44 */
45
46/* Default values, can be overridden */
47
48_PROM_SIZE = 2M;
49_RAM_SIZE = 4M;
50
51_RAM_START = 0x40000000;
52_RAM_END = _RAM_START + _RAM_SIZE;
53
54_PROM_START = 0x00000000;
55_PROM_END = _PROM_START + _PROM_SIZE;
56
57/*
58 *  Alternate names without leading _.
59 */
60
61PROM_START = _PROM_START;
62PROM_SIZE = _PROM_SIZE;
63PROM_END = _PROM_END;
64
65RAM_START = _RAM_START;
66RAM_SIZE = _RAM_SIZE;
67RAM_END = _RAM_END;
68
69/*
70 *  Base address of the on-CPU peripherals
71 */
72
73_LEON_REG = 0x80000000;
74LEON_REG = 0x80000000;
75
76/* these are the maximum values */
77
78MEMORY
79{
80  rom     : ORIGIN = 0x00000000, LENGTH = 256M
81  ram     : ORIGIN = 0x40000000, LENGTH = 1024M
82}
83
84/*
85 * stick everything in ram (of course)
86 */
87SECTIONS
88{
89  .text :
90  {
91    CREATE_OBJECT_SYMBOLS
92    text_start = .;
93    _text_start = .;
94    *(.text)
95    . = ALIGN (16);
96
97    /*
98     * Special FreeBSD sysctl sections.
99     */
100    . = ALIGN (16);
101    __start_set_sysctl_set = .;
102    *(set_sysctl_*);
103    __stop_set_sysctl_set = ABSOLUTE(.);
104    *(set_domain_*);
105    *(set_pseudo_*);
106
107    *(.eh_frame)
108    . = ALIGN (16);
109
110    *(.gnu.linkonce.t*)
111
112    /*
113     * C++ constructors
114     */
115    __CTOR_LIST__ = .;
116    LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
117    *(.ctors)
118    LONG(0)
119    __CTOR_END__ = .;
120    __DTOR_LIST__ = .;
121    LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
122    *(.dtors)
123    LONG(0)
124    __DTOR_END__ = .;
125
126    _rodata_start = . ;
127    *(.rodata*)
128    *(.gnu.linkonce.r*)
129    _erodata = ALIGN( 0x10 ) ;
130
131    etext = ALIGN(0x10);
132    _etext = .;
133    *(.init)
134    *(.fini)
135    *(.lit)
136    *(.shdata)
137    . = ALIGN (16);
138    _endtext = .;
139  } > ram
140  .dynamic        : { *(.dynamic)       } >ram
141  .jcr            : { *(.jcr)           } >ram
142  .got            : { *(.got)           } >ram
143  .plt            : { *(.plt)           } >ram
144  .hash           : { *(.hash)          } >ram
145  .dynrel         : { *(.dynrel)        } >ram
146  .dynsym         : { *(.dynsym)        } >ram
147  .dynstr         : { *(.dynstr)        } >ram
148  .hash           : { *(.hash)          } >ram
149  .data :
150  {
151    data_start = .;
152    _data_start = .;
153    _sdata = . ;
154    *(.data)
155    *(.gnu.linkonce.d*)
156    *(.gcc_except_table)
157    . = ALIGN(0x10);
158    edata = .;
159    _edata = .;
160  } > ram
161  .shbss :
162  {
163    *(.shbss)
164  } > ram
165  .bss :
166  {
167    __bss_start = ALIGN(0x8);
168    _bss_start = .;
169    bss_start = .;
170    *(.bss)
171    *(COMMON)
172    end = .;
173    _end = ALIGN(0x8);
174    __end = ALIGN(0x8);
175  } > ram
176  .stab . (NOLOAD) :
177  {
178    [ .stab ]
179  }
180  .stabstr . (NOLOAD) :
181  {
182    [ .stabstr ]
183  }
184}
Note: See TracBrowser for help on using the repository browser.