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

4.104.114.84.95
Last change on this file since cc17eba was 7782f9fc, checked in by Joel Sherrill <joel.sherrill@…>, on 07/01/99 at 21:53:17

Modified to provide symbols with and without leading underscore in order
to support a.out and ELF.

  • Property mode set to 100644
File size: 3.2 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;
56RAM_END = _RAM_END;
57
58_PROM_START = 0x00000000;
59_PROM_END = _PROM_START + _PROM_SIZE;
60
61/*
62 *  Base address of the on-CPU peripherals
63 */
64
65_ERC32_MEC = 0x01f80000;
66ERC32_MEC = 0x01f80000;
67
68MEMORY
69{
70  rom     : ORIGIN = 0x00000000, LENGTH = 512K
71  ram     : ORIGIN = 0x02000000, LENGTH = 2M
72}
73
74/*
75 * stick everything in ram (of course)
76 */
77SECTIONS
78{
79  .text :
80  {
81    CREATE_OBJECT_SYMBOLS
82    text_start = .;
83    _text_start = .;
84    *(.text)
85    . = ALIGN (16);
86
87    *(.eh_fram)
88    . = ALIGN (16);
89
90    /*
91     * C++ constructors
92     */
93    __CTOR_LIST__ = .;
94    LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
95    *(.ctors)
96    LONG(0)
97    __CTOR_END__ = .;
98    __DTOR_LIST__ = .;
99    LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
100    *(.dtors)
101    LONG(0)
102    __DTOR_END__ = .;
103    etext = ALIGN(0x10);
104    _etext = .;
105    __CTOR_LIST__ = .;
106    LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
107    *(.ctors)
108    LONG(0)
109    __CTOR_END__ = .;
110    __DTOR_LIST__ = .;
111    LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
112    *(.dtors)
113    LONG(0)
114    __DTOR_END__ = .;
115    *(.lit)
116    *(.shdata)
117    _endtext = .;
118  } > ram
119  .dynamic        : { *(.dynamic)       } >ram
120  .got            : { *(.got)           } >ram
121  .plt            : { *(.plt)           } >ram
122  .hash           : { *(.hash)          } >ram
123  .dynrel         : { *(.dynrel)        } >ram
124  .dynsym         : { *(.dynsym)        } >ram
125  .dynstr         : { *(.dynstr)        } >ram
126  .hash           : { *(.hash)          } >ram
127  .data :
128  {
129    data_start = .;
130    _data_start = .;
131    _sdata = . ;
132    *(.data)
133    CONSTRUCTORS
134    edata = ALIGN(0x10);
135    _edata = .;
136  } > ram
137  .shbss :
138  {
139    *(.shbss)
140  } > ram
141  .bss :
142  {
143    __bss_start = ALIGN(0x8);
144    _bss_start = .;
145    bss_start = .;
146    *(.bss)
147    *(COMMON)
148    end = .;
149    _end = ALIGN(0x8);
150    __end = ALIGN(0x8);
151  } > ram
152  .stab . (NOLOAD) :
153  {
154    [ .stab ]
155  }
156  .stabstr . (NOLOAD) :
157  {
158    [ .stabstr ]
159  }
160}
Note: See TracBrowser for help on using the repository browser.