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

4.104.114.84.95
Last change on this file since f8f370b6 was f8f370b6, checked in by Joel Sherrill <joel.sherrill@…>, on 04/16/97 at 17:45:35

Update from Eric Norum.

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