source: rtems/c/src/lib/libbsp/sparc/erc32/startup/linkcmds @ f86ec42

4.104.114.84.95
Last change on this file since f86ec42 was f86ec42, checked in by Joel Sherrill <joel.sherrill@…>, on 02/17/98 at 23:35:54

Added .eh_frame, C++ constructor, and C++ destructor sections.

  • Property mode set to 100644
File size: 2.9 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 4K, 8K, 16K
40 *                               32K, 64K, 128K, 256K, and 512K)
41 * _RAM_SIZE                  size of RAM (permissible values are 256K, 512K,
42 *                               1MB, 2Mb, 4Mb, 8Mb, 16Mb, and 32Mb)
43 *
44 *  MAKE SURE THESE MATCH THE MEMORY DESCRIPTION SECTION!!!
45 */
46
47/*
48_CLOCK_SPEED = 10;
49*/
50
51_PROM_SIZE = 512K;
52_RAM_SIZE = 2M;
53
54_RAM_START = 0x02000000;
55_RAM_END = _RAM_START + _RAM_SIZE;
56
57_PROM_START = 0x00000000;
58_PROM_END = _PROM_START + _PROM_SIZE;
59
60/*
61 *  Base address of the on-CPU peripherals
62 */
63
64_ERC32_MEC = 0x01f80000;
65
66MEMORY
67{
68  rom     : ORIGIN = 0x00000000, LENGTH = 512K
69  ram     : ORIGIN = 0x02000000, LENGTH = 2M
70}
71
72/*
73 * stick everything in ram (of course)
74 */
75SECTIONS
76{
77  .text :
78  {
79    CREATE_OBJECT_SYMBOLS
80    text_start = .;
81    _text_start = .;
82    *(.text)
83    . = ALIGN (16);
84
85    *(.eh_fram)
86    . = ALIGN (16);
87
88    /*
89     * C++ constructors
90     */
91    __CTOR_LIST__ = .;
92    LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
93    *(.ctors)
94    LONG(0)
95    __CTOR_END__ = .;
96    __DTOR_LIST__ = .;
97    LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
98    *(.dtors)
99    LONG(0)
100    __DTOR_END__ = .;
101    etext = ALIGN(0x10);
102    _etext = .;
103    __CTOR_LIST__ = .;
104    LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
105    *(.ctors)
106    LONG(0)
107    __CTOR_END__ = .;
108    __DTOR_LIST__ = .;
109    LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
110    *(.dtors)
111    LONG(0)
112    __DTOR_END__ = .;
113    *(.lit)
114    *(.shdata)
115    _endtext = .;
116  } > ram
117  .data :
118  {
119    data_start = .;
120    _data_start = .;
121    _sdata = . ;
122    *(.data)
123    CONSTRUCTORS
124    edata = ALIGN(0x10);
125    _edata = .;
126  } > ram
127  .shbss :
128  {
129    *(.shbss)
130  } > ram
131  .bss :
132  {
133    __bss_start = ALIGN(0x8);
134    _bss_start = .;
135    bss_start = .;
136    *(.bss)
137    *(COMMON)
138    end = .;
139    _end = ALIGN(0x8);
140    __end = ALIGN(0x8);
141  } > ram
142  .stab . (NOLOAD) :
143  {
144    [ .stab ]
145  }
146  .stabstr . (NOLOAD) :
147  {
148    [ .stabstr ]
149  }
150}
Note: See TracBrowser for help on using the repository browser.