source: rtems/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds @ 1587af6

4.104.114.84.95
Last change on this file since 1587af6 was 1587af6, checked in by Joel Sherrill <joel.sherrill@…>, on Dec 20, 1997 at 4:37:29 PM

Update from Eric Norum to include C++ support.

  • Property mode set to 100644
File size: 3.3 KB
Line 
1/*
2 * This file contains GNU linker directives for a generic MC68360 board.
3 * Variations in memory size and allocation can be made by
4 * overriding some values with linker command-line arguments.
5 *
6 * Saskatchewan Accelerator Laboratory
7 * University of Saskatchewan
8 * Saskatoon, Saskatchewan, CANADA
9 * eric@skatter.usask.ca
10 *
11 *  $Id$
12 */
13
14/*
15 * Declare some sizes.
16 * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
17 *      number used there is not constant.  If this happens to you, edit
18 *      the lines marked XXX below to use a constant value.
19 */
20RamSize = DEFINED(RamSize) ? RamSize : 4M;
21HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
22StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
23
24/*
25 * Declare on-board memory.
26 * It would be nice if the ram length could be given as
27 * LENGTH=RamSize, but gld doesn't allow non-constant
28 * values in the LENGTH expression. 
29 */
30MEMORY {
31          ram : ORIGIN = 0x00000000, LENGTH = 64M
32          rom : ORIGIN = 0x0F000000, LENGTH = 1M
33        dpram : ORIGIN = 0x0E000000, LENGTH = 8k
34}
35
36/*
37 * Declare low-order three octets of Ethernet address.
38 */
39ETHERNET_ADDRESS = DEFINED(ETHERNET_ADDRESS) ? ETHERNET_ADDRESS : 0xDEAD12;
40
41/*
42 * Load objects
43 */
44SECTIONS {
45        /*
46         * Hardware variations
47         */
48        _RamSize = RamSize;
49        __RamSize = RamSize;
50
51        /*
52         * Boot PROM
53         */
54        rom : {
55                _RomBase = .;
56                __RomBase = .;
57        } >rom
58
59        /*
60         * Dynamic RAM
61         */
62        ram : {
63                _RamBase = .;
64                __RamBase = .;
65        } >ram
66
67        /*
68         * Text, data and bss segments
69         */
70        .text : {
71                CREATE_OBJECT_SYMBOLS
72                *(.text)
73                . = ALIGN (16);
74                etext = .;
75                _etext = .;
76
77                /*
78                 * C++ constructors
79                 */
80                __CTOR_LIST__ = .;
81                LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
82                *(.ctors)
83                LONG(0)
84                __CTOR_END__ = .;
85                __DTOR_LIST__ = .;
86                LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
87                *(.dtors)
88                LONG(0)
89                __DTOR_END__ = .;
90        } >ram
91        .data : {
92                copy_start = .;
93                *(.data)
94                . = ALIGN (16);
95                _edata = .;
96                copy_end = .;
97        } >ram
98        .bss : {
99                M68Kvec = .;
100                _M68Kvec = .;
101                . += (256 * 4);
102                clear_start = .;
103                *(.bss)
104                *(COMMON)
105                . = ALIGN (16);
106                _end = .;
107
108                _HeapStart = .;
109                __HeapStart = .;
110                . += HeapSize;  /* XXX -- Old gld can't handle this */
111                . += StackSize; /* XXX -- Old gld can't handle this */
112                /* . += 0x10000; */ /* HeapSize for old gld */
113                /* . += 0x1000;  */ /* StackSize for old gld */
114                . = ALIGN (16);
115                stack_init = .;
116                clear_end = .;
117
118                _WorkspaceBase = .;
119                __WorkspaceBase = .;
120        } >ram
121
122        /*
123         * On-chip memory/peripherals
124         */
125        dpram : {
126                m360 = .;
127                _m360 = .;
128                . += (8 * 1024);
129
130        } >dpram
131}
Note: See TracBrowser for help on using the repository browser.