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

4.104.114.84.95
Last change on this file since f8f370b6 was f8f370b6, checked in by Joel Sherrill <joel.sherrill@…>, on Apr 16, 1997 at 5:45:35 PM

Update from Eric Norum.

  • Property mode set to 100644
File size: 2.9 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        } >ram
77        .data : {
78                copy_start = .;
79                *(.data)
80                . = ALIGN (16);
81                _edata = .;
82                copy_end = .;
83        } >ram
84        .bss : {
85                M68Kvec = .;
86                _M68Kvec = .;
87                . += (256 * 4);
88                clear_start = .;
89                *(.bss)
90                *(COMMON)
91                . = ALIGN (16);
92                _end = .;
93
94                _HeapStart = .;
95                __HeapStart = .;
96                . += HeapSize;  /* XXX -- Old gld can't handle this */
97                . += StackSize; /* XXX -- Old gld can't handle this */
98                /* . += 0x10000; */ /* HeapSize for old gld */
99                /* . += 0x1000;  */ /* StackSize for old gld */
100                . = ALIGN (16);
101                stack_init = .;
102                clear_end = .;
103
104                _WorkspaceBase = .;
105                __WorkspaceBase = .;
106        } >ram
107
108        /*
109         * On-chip memory/peripherals
110         */
111        dpram : {
112                m360 = .;
113                _m360 = .;
114                . += (8 * 1024);
115
116        } >dpram
117}
Note: See TracBrowser for help on using the repository browser.