source: rtems/c/src/lib/libbsp/m68k/dmv152/startup/linkcmds @ 9b2c969

4.104.114.84.95
Last change on this file since 9b2c969 was 9b2c969, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 13, 2000 at 3:07:03 PM

Made sweep of changes to get all BSPs to the same point on the linkcmds
and memory layout. Next step is to share the same bsp_pretasking_hook.

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