OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [m68k/] [ods68302/] [startup/] [linkcmds] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 * $Id: linkcmds,v 1.2 2001-09-27 12:00:23 chris Exp $
3
 *
4
 * MC68302 Linker command file
5
 *
6
 */
7
 
8
/*
9
 * Declare some sizes.
10
 */
11
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
12
_RamSize = DEFINED(_RamSize) ? _RamSize : 1M;
13
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
14
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
15
 
16
/*
17
 * Declare on-board memory.
18
 */
19
MEMORY {
20
          ram : ORIGIN = 0x00000000, LENGTH = 1M
21
}
22
SECTIONS
23
{
24
        ram : {
25
                . = .;
26
        } >ram
27
 
28
        .vtable :
29
        {
30
                vtable_start = .;
31
                *(.vtable)
32
                evtable = .;
33
        } >ram
34
 
35
 
36
        /*
37
         * Text, data and bss segments
38
         */
39
        .text : {
40
                *(.text)
41
 
42
                /*
43
                 * C++ constructors/destructors
44
                 */
45
                *(.gnu.linkonce.t.*)
46
 
47
                /*
48
                 * Initialization and finalization code.
49
                 *
50
                 * Various files can provide initialization and finalization
51
                 * functions.  crtbegin.o and crtend.o are two instances. The
52
                 * body of these functions are in .init and .fini sections. We
53
                 * accumulate the bodies here, and prepend function prologues
54
                 * from crti.o and function epilogues from crtn.o. crti.o must
55
                 * be linked first; crtn.o must be linked last.  Because these
56
                 * are wildcards, it doesn't matter if the user does not
57
                 * actually link against crti.o and crtn.o; the linker won't
58
                 * look for a file to match a wildcard.  The wildcard also
59
                 * means that it doesn't matter which directory crti.o and
60
                 * crtn.o are in.
61
                 */
62
                PROVIDE (_init = .);
63
                *crti.o(.init)
64
                *(.init)
65
                *crtn.o(.init)
66
                PROVIDE (_fini = .);
67
                *crti.o(.fini)
68
                *(.fini)
69
                *crtn.o(.fini)
70
 
71
                /*
72
                 * C++ constructors/destructors
73
                 *
74
                 * gcc uses crtbegin.o to find the start of the constructors
75
                 * and destructors so we make sure it is first.  Because this
76
                 * is a wildcard, it doesn't matter if the user does not
77
                 * actually link against crtbegin.o; the linker won't look for
78
                 * a file to match a wildcard.  The wildcard also means that
79
                 * it doesn't matter which directory crtbegin.o is in. The
80
                 * constructor and destructor list are terminated in
81
                 * crtend.o.  The same comments apply to it.
82
                 */
83
                . = ALIGN (16);
84
                *crtbegin.o(.ctors)
85
                *(.ctors)
86
                *crtend.o(.ctors)
87
                *crtbegin.o(.dtors)
88
                *(.dtors)
89
                *crtend.o(.dtors)
90
 
91
                /*
92
                 * Exception frame info
93
                 */
94
                . = ALIGN (16);
95
                *(.eh_frame)
96
 
97
                /*
98
                 * Read-only data
99
                 */
100
                . = ALIGN (16);
101
                _rodata_start = . ;
102
                *(.rodata)
103
                *(.gnu.linkonce.r*)
104
 
105
                 . = ALIGN (16);
106
                PROVIDE (_etext = .);
107
        } >ram
108
        .data : {
109
                PROVIDE (_copy_start = .);
110
                *(.data)
111
                *(.gnu.linkonce.d*)
112
                *(.gcc_except_table)
113
                . = ALIGN (16);
114
                PROVIDE (_edata = .);
115
                PROVIDE (_copy_end = .);
116
        } >ram
117
        .bss : {
118
                _clear_start = .;
119
                *(.bss)
120
                *(COMMON)
121
                . = ALIGN (16);
122
                PROVIDE (end = .);
123
 
124
                . += _StackSize;
125
                . = ALIGN (16);
126
                _stack_init = .;
127
                _clear_end = .;
128
 
129
                _WorkspaceBase = .;
130
        } >ram
131
}
132
 
133
m302 = MC68302_BASE;
134
_VBR = ADDR(.vtable);           /* location of the VBR table (in RAM) */
135
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.