source: rtems/c/src/lib/libbsp/m68k/gen68360/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: 3.2 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
75                *(.eh_fram)
76                . = ALIGN (16);
77
78                /*
79                 * C++ constructors
80                 */
81                __CTOR_LIST__ = .;
82                LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
83                *(.ctors)
84                LONG(0)
85                __CTOR_END__ = .;
86                __DTOR_LIST__ = .;
87                LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
88                *(.dtors)
89                LONG(0)
90                __DTOR_END__ = .;
91
92                etext = .;
93                _etext = .;
94        } >ram
95        .data : {
96                copy_start = .;
97                *(.data)
98                . = ALIGN (16);
99                _edata = .;
100                copy_end = .;
101        } >ram
102        .bss : {
103                M68Kvec = .;
104                _M68Kvec = .;
105                . += (256 * 4);
106                clear_start = .;
107                *(.bss)
108                *(COMMON)
109                . = ALIGN (16);
110                _end = .;
111
112                _HeapStart = .;
113                __HeapStart = .;
114                . += HeapSize;  /* XXX -- Old gld can't handle this */
115                . += StackSize; /* XXX -- Old gld can't handle this */
116                /* . += 0x10000; */ /* HeapSize for old gld */
117                /* . += 0x1000;  */ /* StackSize for old gld */
118                . = ALIGN (16);
119                stack_init = .;
120                clear_end = .;
121
122                _WorkspaceBase = .;
123                __WorkspaceBase = .;
124        } >ram
125
126        /*
127         * On-chip memory/peripherals
128         */
129        dpram : {
130                m360 = .;
131                _m360 = .;
132                . += (8 * 1024);
133
134        } >dpram
135}
Note: See TracBrowser for help on using the repository browser.