source: rtems/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds @ 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: 2.8 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 */
20HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
21StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
22
23/*
24 * Declare on-board memory.
25 */
26MEMORY {
27          ram : ORIGIN = 0x00000000, LENGTH = 64M
28          rom : ORIGIN = 0x0F000000, LENGTH = 1M
29        dpram : ORIGIN = 0x0E000000, LENGTH = 8k
30}
31
32/*
33 * Load objects
34 */
35SECTIONS {
36        /*
37         * Boot PROM
38         */
39        rom : {
40                _RomBase = .;
41                __RomBase = .;
42        } >rom
43
44        /*
45         * Dynamic RAM
46         */
47        ram : {
48                _RamBase = .;
49                __RamBase = .;
50        } >ram
51
52        /*
53         * Text, data and bss segments
54         */
55        .text : {
56                CREATE_OBJECT_SYMBOLS
57                *(.text)
58                . = ALIGN (16);
59
60                *(.eh_fram)
61                . = ALIGN (16);
62
63                /*
64                 * C++ constructors
65                 */
66                __CTOR_LIST__ = .;
67                LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
68                *(.ctors)
69                LONG(0)
70                __CTOR_END__ = .;
71                __DTOR_LIST__ = .;
72                LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
73                *(.dtors)
74                LONG(0)
75                __DTOR_END__ = .;
76
77                etext = .;
78                _etext = .;
79        } >ram
80        .data : {
81                copy_start = .;
82                *(.data)
83                . = ALIGN (16);
84                _edata = .;
85                copy_end = .;
86        } >ram
87        .bss : {
88                M68Kvec = .;
89                _M68Kvec = .;
90                . += (256 * 4);
91                clear_start = .;
92                *(.bss)
93                *(COMMON)
94                . = ALIGN (16);
95                _end = .;
96
97                _HeapStart = .;
98                __HeapStart = .;
99                . += HeapSize;  /* XXX -- Old gld can't handle this */
100                . += StackSize; /* XXX -- Old gld can't handle this */
101                /* . += 0x10000; */ /* HeapSize for old gld */
102                /* . += 0x1000;  */ /* StackSize for old gld */
103                . = ALIGN (16);
104                stack_init = .;
105                clear_end = .;
106
107                _WorkspaceBase = .;
108                __WorkspaceBase = .;
109        } >ram
110
111        /*
112         * On-chip memory/peripherals
113         */
114        dpram : {
115                m360 = .;
116                _m360 = .;
117                . += (8 * 1024);
118
119        } >dpram
120}
Note: See TracBrowser for help on using the repository browser.