source: rtems/c/src/lib/libbsp/m68k/mvme136/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 01/13/00 at 15:07:03

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.3 KB
Line 
1/*
2 *  This file contains directives for the GNU linker which are specific
3 *  to the Motorola MVME136/MVME135 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                . = 0x3000;
30        } >ram
31
32        /*
33         * Text, data and bss segments
34         */
35        .text : {
36                *(.text)
37
38                /*
39                 * C++ constructors/destructors
40                 *
41                 * Various files can provide initialization and finalization
42                 * functions.  crtbegin.o and crtend.o are two instances. The
43                 * body of these functions are in .init and .fini sections. We
44                 * accumulate the bodies here, and prepend function prologues
45                 * from crti.o and function epilogues from crtn.o. crti.o must
46                 * be linked first; crtn.o must be linked last.  Because these
47                 * are wildcards, it doesn't matter if the user does not
48                 * actually link against crti.o and crtn.o; the linker won't
49                 * look for a file to match a wildcard.  The wildcard also
50                 * means that it doesn't matter which directory crti.o and
51                 * crtn.o are in.
52                 */
53                *(.gnu.linkonce.t.*)
54
55                /*
56                 * Initialization and finalization code.
57                 *
58                 * gcc uses crtbegin.o to find the start of the constructors
59                 * and destructors so we make sure it is first.  Because this
60                 * is a wildcard, it doesn't matter if the user does not
61                 * actually link against crtbegin.o; the linker won't look for
62                 * a file to match a wildcard.  The wildcard also means that
63                 * it doesn't matter which directory crtbegin.o is in. The
64                 * constructor and destructor list are terminated in
65                 * crtend.o.  The same comments apply to it.
66                 */
67                PROVIDE (_init = .);
68                *crti.o(.init)
69                *(.init)
70                *crtn.o(.init)
71                PROVIDE (_fini = .);
72                *crti.o(.fini)
73                *(.fini)
74                *crtn.o(.fini)
75
76                /*
77                 * C++ constructors/destructors
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                PROVIDE (_copy_start = .);
106                *(.data)
107                *(.gnu.linkonce.d*)
108                *(.gcc_except_table)
109                . = ALIGN (16);
110                PROVIDE (_edata = .);
111                PROVIDE (_copy_end = .);
112        } >ram
113        .bss : {
114                PROVIDE (_bss_start = .);
115                PROVIDE (_clear_start = .);
116                *(.bss)
117                *(COMMON)
118                . = ALIGN (16);
119                PROVIDE (end = .);
120
121                . += StackSize;
122                PROVIDE (_stack_init = .);
123
124                . = ALIGN (16);
125                PROVIDE (_HeapStart = .);
126                . += HeapSize;
127                PROVIDE (_HeapEnd = .);
128
129                PROVIDE (_clear_end = .);
130
131                PROVIDE (_WorkspaceBase = .);
132        } >ram
133}
Note: See TracBrowser for help on using the repository browser.