source: rtems/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom @ 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 BOOTP PROM.
7 * To create the PROM image from the linker output you must use objcopy
8 * (--adjust-section-vma) to place the data segment at the end of the text
9 * segment in the PROM.  The start-up code takes care of copying this region
10 * to RAM.
11 *
12 * Saskatchewan Accelerator Laboratory
13 * University of Saskatchewan
14 * Saskatoon, Saskatchewan, CANADA
15 * eric@skatter.usask.ca
16 *
17 *  $Id$
18 */
19
20/*
21 * a.out format doesn't handle prom images very well
22 */
23OUTPUT_FORMAT(coff-m68k)
24
25/*
26 * Declare some sizes.
27 * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
28 *      number used there is not constant.  If this happens to you, edit
29 *      the lines marked XXX below to use a constant value.
30 */
31HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
32StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
33
34/*
35 * Declare on-board memory.
36 */
37MEMORY {
38          ram : ORIGIN = 0x00000000, LENGTH = 64M
39          rom : ORIGIN = 0xFF000000, LENGTH = 1M
40        dpram : ORIGIN = 0xFE000000, LENGTH = 8k
41}
42
43/*
44 * Load objects
45 */
46SECTIONS {
47        /*
48         * Boot PROM
49         */
50        rom : {
51                _RomBase = .;
52                __RomBase = .;
53        } >rom
54
55        /*
56         * Dynamic RAM
57         */
58        ram : {
59                _RamBase = .;
60                __RamBase = .;
61        } >ram
62
63        /*
64         * Text, data and bss segments
65         */
66        .text : {
67                CREATE_OBJECT_SYMBOLS
68                *(.text)
69                . = ALIGN (16);
70
71                /*
72                 * C++ constructors
73                 */
74                __CTOR_LIST__ = .;
75                LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
76                *(.ctors)
77                LONG(0)
78                __CTOR_END__ = .;
79                __DTOR_LIST__ = .;
80                LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
81                *(.dtors)
82                LONG(0)
83                __DTOR_END__ = .;
84
85                etext = .;
86                _etext = .;
87        } >rom
88        .data : {
89                copy_start = .;
90                *(.data)
91                . = ALIGN (16);
92                _edata = .;
93                copy_end = .;
94        } >ram
95        .bss : {
96                M68Kvec = .;
97                _M68Kvec = .;
98                . += (256 * 4);
99                clear_start = .;
100                *(.bss)
101                *(COMMON)
102                . = ALIGN (16);
103                _end = .;
104
105                _HeapStart = .;
106                __HeapStart = .;
107                . += HeapSize;  /* XXX -- Old gld can't handle this */
108                . += StackSize; /* XXX -- Old gld can't handle this */
109                /* . += 0x10000; */ /* HeapSize for old gld */
110                /* . += 0x1000;  */ /* StackSize for old gld */
111                . = ALIGN (16);
112                stack_init = .;
113                clear_end = .;
114
115                _WorkspaceBase = .;
116                __WorkspaceBase = .;
117        } >ram
118
119        /*
120         * On-chip memory/peripherals
121         */
122        dpram : {
123                m360 = .;
124                _m360 = .;
125                . += (8 * 1024);
126
127        } >dpram
128}
Note: See TracBrowser for help on using the repository browser.