source: rtems/c/src/lib/libbsp/m68k/dmv152/startup/linkcmds @ 0ab65474

4.104.114.84.95
Last change on this file since 0ab65474 was b8c9883, checked in by Joel Sherrill <joel.sherrill@…>, on 01/13/00 at 20:45:07

All m68k BSPs now build with new ELF style linkcmds.

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/*
2 *  This file contains directives for the GNU linker which are specific
3 *  to the DY-4 DMV152/SVME153 boards.
4 *
5 *  COPYRIGHT (c) 1989-1999.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.OARcorp.com/rtems/license.html.
11 *
12 *  $Id$
13 */
14
15/*
16 * Declare some sizes.
17 */
18_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
19_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
20
21MEMORY
22{
23        ram : org = 0x0, l = 1M
24}
25
26_RamBase = 0;
27_RamSize = 1M;
28
29SECTIONS
30{
31        ram : {
32                . = 0x12800;
33        } >ram
34
35        /*
36         * Text, data and bss segments
37         */
38        .text : {
39                *(.text)
40
41                /*
42                 * C++ constructors/destructors
43                 */
44                *(.gnu.linkonce.t.*)
45
46                /*
47                 * Initialization and finalization code.
48                 *
49                 * Various files can provide initialization and finalization
50                 * functions.  crtbegin.o and crtend.o are two instances. The
51                 * body of these functions are in .init and .fini sections. We
52                 * accumulate the bodies here, and prepend function prologues
53                 * from crti.o and function epilogues from crtn.o. crti.o must
54                 * be linked first; crtn.o must be linked last.  Because these
55                 * are wildcards, it doesn't matter if the user does not
56                 * actually link against crti.o and crtn.o; the linker won't
57                 * look for a file to match a wildcard.  The wildcard also
58                 * means that it doesn't matter which directory crti.o and
59                 * crtn.o are in.
60                 */
61                PROVIDE (_init = .);
62                *crti.o(.init)
63                *(.init)
64                *crtn.o(.init)
65                PROVIDE (_fini = .);
66                *crti.o(.fini)
67                *(.fini)
68                *crtn.o(.fini)
69
70                /*
71                 * C++ constructors/destructors
72                 *
73                 * gcc uses crtbegin.o to find the start of the constructors
74                 * and destructors so we make sure it is first.  Because this
75                 * is a wildcard, it doesn't matter if the user does not
76                 * actually link against crtbegin.o; the linker won't look for
77                 * a file to match a wildcard.  The wildcard also means that
78                 * it doesn't matter which directory crtbegin.o is in. The
79                 * constructor and destructor list are terminated in
80                 * crtend.o.  The same comments apply to it.
81                 */
82                . = ALIGN (16);
83                *crtbegin.o(.ctors)
84                *(.ctors)
85                *crtend.o(.ctors)
86                *crtbegin.o(.dtors)
87                *(.dtors)
88                *crtend.o(.dtors)
89
90                /*
91                 * Exception frame info
92                 */
93                . = ALIGN (16);
94                *(.eh_frame)
95
96                /*
97                 * Read-only data
98                 */
99                . = ALIGN (16);
100                _rodata_start = . ;
101                *(.rodata)
102                *(.gnu.linkonce.r*)
103
104                 . = ALIGN (16);
105                PROVIDE (etext = .);
106        } >ram
107        .data : {
108                copy_start = .;
109                *(.data)
110                *(.gnu.linkonce.d*)
111                *(.gcc_except_table)
112                . = ALIGN (16);
113                PROVIDE (_edata = .);
114                copy_end = .;
115        } >ram
116        .bss : {
117                _clear_start = .;
118                *(.bss)
119                *(COMMON)
120                . = ALIGN (16);
121                PROVIDE (end = .);
122
123                . += _StackSize;
124                . = ALIGN (16);
125                _stack_init = .;
126                _clear_end = .;
127
128                _WorkspaceBase = .;
129        } >ram
130}
Note: See TracBrowser for help on using the repository browser.