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

Subversion Repositories openrisc_me

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

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:02 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
 * Declare some sizes.
35
 */
36
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x80000;
37
_RamSize = DEFINED(_RamSize) ? _RamSize : 0x80000;
38
_RamEnd = _RamBase + _RamSize;
39
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
40
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
41
 
42
MEMORY
43
{
44
  ram     : ORIGIN = 0x80000, LENGTH = 512K
45
}
46
 
47
_copy_data_from_rom = 0;
48
 
49
/*
50
 * stick everything in ram (of course)
51
 */
52
SECTIONS
53
{
54
        ram : {
55
                . = .;
56
        } >ram
57
 
58
        /*
59
         * Text, data and bss segments
60
         */
61
        .text : {
62
                *(.text)
63
 
64
                /*
65
                 * C++ constructors/destructors
66
                 */
67
                *(.gnu.linkonce.t.*)
68
 
69
                /*
70
                 * Initialization and finalization code.
71
                 *
72
                 * Various files can provide initialization and finalization
73
                 * functions.  crtbegin.o and crtend.o are two instances. The
74
                 * body of these functions are in .init and .fini sections. We
75
                 * accumulate the bodies here, and prepend function prologues
76
                 * from crti.o and function epilogues from crtn.o. crti.o must
77
                 * be linked first; crtn.o must be linked last.  Because these
78
                 * are wildcards, it doesn't matter if the user does not
79
                 * actually link against crti.o and crtn.o; the linker won't
80
                 * look for a file to match a wildcard.  The wildcard also
81
                 * means that it doesn't matter which directory crti.o and
82
                 * crtn.o are in.
83
                 */
84
                PROVIDE (_init = .);
85
                *crti.o(.init)
86
                *(.init)
87
                *crtn.o(.init)
88
                PROVIDE (_fini = .);
89
                *crti.o(.fini)
90
                *(.fini)
91
                *crtn.o(.fini)
92
 
93
                /*
94
                 * C++ constructors/destructors
95
                 *
96
                 * gcc uses crtbegin.o to find the start of the constructors
97
                 * and destructors so we make sure it is first.  Because this
98
                 * is a wildcard, it doesn't matter if the user does not
99
                 * actually link against crtbegin.o; the linker won't look for
100
                 * a file to match a wildcard.  The wildcard also means that
101
                 * it doesn't matter which directory crtbegin.o is in. The
102
                 * constructor and destructor list are terminated in
103
                 * crtend.o.  The same comments apply to it.
104
                 */
105
                . = ALIGN (16);
106
                *crtbegin.o(.ctors)
107
                *(.ctors)
108
                *crtend.o(.ctors)
109
                *crtbegin.o(.dtors)
110
                *(.dtors)
111
                *crtend.o(.dtors)
112
 
113
                /*
114
                 * Exception frame info
115
                 */
116
                . = ALIGN (16);
117
                *(.eh_frame)
118
 
119
                /*
120
                 * Read-only data
121
                 */
122
                . = ALIGN (16);
123
                _rodata_start = . ;
124
                *(.rodata)
125
                *(.gnu.linkonce.r*)
126
 
127
                 . = ALIGN (16);
128
                PROVIDE (_etext = .);
129
        } >ram
130
        .data : {
131
                PROVIDE (_copy_start = .);
132
                *(.data)
133
                *(.gnu.linkonce.d*)
134
                *(.gcc_except_table)
135
                . = ALIGN (16);
136
                PROVIDE (_edata = .);
137
                PROVIDE (_copy_end = .);
138
        } >ram
139
        .bss : {
140
                _clear_start = .;
141
                *(.bss)
142
                *(COMMON)
143
                . = ALIGN (16);
144
                PROVIDE (end = .);
145
 
146
                . += _StackSize;
147
                . = ALIGN (16);
148
                _stack_init = .;
149
                _clear_end = .;
150
 
151
                _WorkspaceBase = .;
152
        } >ram
153
}

powered by: WebSVN 2.1.0

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