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

4.104.114.84.95
Last change on this file since 98bcbda3 was 98bcbda3, checked in by Joel Sherrill <joel.sherrill@…>, on 03/23/98 at 18:35:41

Patches from Eric Norum:

Here are some patches to the gen68360 BSP. The improvements include:

Boot prom run-time selection of DRAM size (1/4/16 Mbytes)
Full 32-bit ethernet address obtained from boot prom.
Updated README.

  • Property mode set to 100644
File size: 3.1 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 */
24HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
25StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
26
27/*
28 * Declare on-board memory.
29 */
30MEMORY {
31          ram : ORIGIN = 0x00000000, LENGTH = 64M
32        myram : ORIGIN = 4M-512k,    LENGTH = 512k
33          rom : ORIGIN = 0x0F000000, LENGTH = 1M
34        dpram : ORIGIN = 0x0E000000, LENGTH = 8k
35}
36
37/*
38 * Load objects
39 */
40SECTIONS {
41        /*
42         * Boot PROM
43         */
44        rom : {
45                _RomBase = .;
46                __RomBase = .;
47        } >rom
48
49        /*
50         * Dynamic RAM
51         */
52        ram : {
53                _RamBase = .;
54                __RamBase = .;
55        } >ram
56
57        /*
58         * Text, data and bss segments
59         */
60        .text : AT (0x00000000) {
61                CREATE_OBJECT_SYMBOLS
62                *(.text)
63                . = ALIGN (16);
64
65                /*
66                 * C++ constructors
67                 */
68                __CTOR_LIST__ = .;
69                LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
70                *(.ctors)
71                LONG(0)
72                __CTOR_END__ = .;
73                __DTOR_LIST__ = .;
74                LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
75                *(.dtors)
76                LONG(0)
77                __DTOR_END__ = .;
78
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.