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

Subversion Repositories openrisc_me

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

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

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

powered by: WebSVN 2.1.0

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