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

Subversion Repositories openrisc

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  linkcmds
2
 *
3
 *  $Id: linkcmds,v 1.2 2001-09-27 12:00:03 chris Exp $
4
 */
5
 
6
OUTPUT_ARCH(m68k)
7
__DYNAMIC  =  0;
8
 
9
/*
10
 * The memory map looks like this:
11
 * +--------------------+ <- low memory
12
 * | .text              |
13
 * |        etext       |
14
 * |        ctor list   | the ctor and dtor lists are for
15
 * |        dtor list   | C++ support
16
 * |        _endtext    |
17
 * +--------------------+
18
 * | .data              | initialized data goes here
19
 * |        _sdata      |
20
 * |        _edata      |
21
 * +--------------------+
22
 * | .bss               |
23
 * |        _clear_start| start of bss, cleared by crt0
24
 * |        _end        | start of heap, used by sbrk()
25
 * +--------------------+
26
 * |    heap space      |
27
 * |        _ENDHEAP    |
28
 * |    stack space     |
29
 * |        __stack     | top of stack
30
 * +--------------------+ <- high memory
31
 */
32
 
33
 
34
/*
35
 * User modifiable values:
36
 *
37
 * _VBR                 location of VBR table
38
 */
39
 
40
MEMORY
41
{
42
  ram     : ORIGIN = 0x203000, LENGTH = 256K
43
}
44
 
45
_VBR = 0x200000;                /* location of the VBR table (in RAM) */
46
__end_of_ram = 0x240000;
47
_copy_data_from_rom = 0;
48
 
49
/*
50
 * Declare some sizes.
51
 */
52
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x200000;
53
_RamSize = DEFINED(_RamSize) ? _RamSize : 256K;
54
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
55
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
56
 
57
/*
58
 * stick everything in ram (of course)
59
 */
60
 
61
SECTIONS
62
{
63
        ram : {
64
                . = .;
65
        } >ram
66
 
67
        /*
68
         * Text, data and bss segments
69
         */
70
        .text : {
71
                *(.text)
72
 
73
                /*
74
                 * C++ constructors/destructors
75
                 */
76
                *(.gnu.linkonce.t.*)
77
 
78
                /*
79
                 * Initialization and finalization code.
80
                 *
81
                 * Various files can provide initialization and finalization
82
                 * functions.  crtbegin.o and crtend.o are two instances. The
83
                 * body of these functions are in .init and .fini sections. We
84
                 * accumulate the bodies here, and prepend function prologues
85
                 * from crti.o and function epilogues from crtn.o. crti.o must
86
                 * be linked first; crtn.o must be linked last.  Because these
87
                 * are wildcards, it doesn't matter if the user does not
88
                 * actually link against crti.o and crtn.o; the linker won't
89
                 * look for a file to match a wildcard.  The wildcard also
90
                 * means that it doesn't matter which directory crti.o and
91
                 * crtn.o are in.
92
                 */
93
                PROVIDE (_init = .);
94
                *crti.o(.init)
95
                *(.init)
96
                *crtn.o(.init)
97
                PROVIDE (_fini = .);
98
                *crti.o(.fini)
99
                *(.fini)
100
                *crtn.o(.fini)
101
 
102
                /*
103
                 * C++ constructors/destructors
104
                 *
105
                 * gcc uses crtbegin.o to find the start of the constructors
106
                 * and destructors so we make sure it is first.  Because this
107
                 * is a wildcard, it doesn't matter if the user does not
108
                 * actually link against crtbegin.o; the linker won't look for
109
                 * a file to match a wildcard.  The wildcard also means that
110
                 * it doesn't matter which directory crtbegin.o is in. The
111
                 * constructor and destructor list are terminated in
112
                 * crtend.o.  The same comments apply to it.
113
                 */
114
                . = ALIGN (16);
115
                *crtbegin.o(.ctors)
116
                *(.ctors)
117
                *crtend.o(.ctors)
118
                *crtbegin.o(.dtors)
119
                *(.dtors)
120
                *crtend.o(.dtors)
121
 
122
                /*
123
                 * Exception frame info
124
                 */
125
                . = ALIGN (16);
126
                *(.eh_frame)
127
 
128
                /*
129
                 * Read-only data
130
                 */
131
                . = ALIGN (16);
132
                _rodata_start = . ;
133
                *(.rodata)
134
                *(.gnu.linkonce.r*)
135
 
136
                 . = ALIGN (16);
137
                PROVIDE (_etext = .);
138
        } >ram
139
        .data : {
140
                PROVIDE (_copy_start = .);
141
                *(.data)
142
                *(.gnu.linkonce.d*)
143
                *(.gcc_except_table)
144
                . = ALIGN (16);
145
                PROVIDE (_edata = .);
146
                PROVIDE (_copy_end = .);
147
        } >ram
148
        .bss : {
149
                _clear_start = .;
150
                *(.bss)
151
                *(COMMON)
152
                . = ALIGN (16);
153
                PROVIDE (end = .);
154
 
155
                . += _StackSize;
156
                . = ALIGN (16);
157
                _stack_init = .;
158
                _clear_end = .;
159
 
160
                _WorkspaceBase = .;
161
        } >ram
162
}

powered by: WebSVN 2.1.0

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