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

Subversion Repositories openrisc_me

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 *  This file contains directives for the GNU linker which are specific
3
 *  to the Motorola MVME167 board. This linker script produces ELF
4
 *  executables.
5
 *
6
 *  Copyright (c) 1999, National Research Council of Canada.
7
 *  Some of this material was copied from binutils-2.9.4 linker scripts,
8
 *  and is therefore likely to be copyrighted by the Free Software
9
 *  Foundation, even though explicit copyright notices did not appear in
10
 *  those files.
11
 *
12
 *  The license and distribution terms for this file may be
13
 *  found in the file LICENSE in this distribution or at
14
 *  http://www.OARcorp.com/rtems/license.html.
15
 *
16
 *  $Id: linkcmds,v 1.2 2001-09-27 12:00:20 chris Exp $
17
 */
18
 
19
/* These are not really needed here */
20
/* OUTPUT_FORMAT("elf32-m68k") */
21
OUTPUT_ARCH(m68k)
22
ENTRY(_start)
23
 
24
/*
25
 * Declare some sizes.  Heap is sized at whatever ram space is left.
26
 */
27
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x00800000;
28
_RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
29
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0;
30
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
31
 
32
MEMORY
33
{
34
  /*  The location of RAM is the address space is configurable.
35
      This is where we put one board. The base address should be
36
      passed as a parameter when building multiprocessor images
37
      where each board resides at a different address. */
38
  ram  : org = 0x00800000, l = 4M
39
  rom  : org = 0xFF800000, l = 4M
40
  sram : org = 0xFFE00000, l = 128K
41
}
42
 
43
SECTIONS
44
{
45
 /*
46
  * Text, data and bss segments
47
  */
48
  .text : {
49
    *(.text)
50
 
51
    /*
52
     * C++ constructors/destructors
53
     */
54
    *(.gnu.linkonce.t.*)
55
 
56
    /*
57
     * Initialization and finalization code.
58
     *
59
     * Various files can provide initialization and finalization
60
     * functions.  crtbegin.o and crtend.o are two instances. The
61
     * body of these functions are in .init and .fini sections. We
62
     * accumulate the bodies here, and prepend function prologues
63
     * from crti.o and function epilogues from crtn.o. crti.o must
64
     * be linked first; crtn.o must be linked last.  Because these
65
     * are wildcards, it doesn't matter if the user does not
66
     * actually link against crti.o and crtn.o; the linker won't
67
     * look for a file to match a wildcard.  The wildcard also
68
     * means that it doesn't matter which directory crti.o and
69
     * crtn.o are in.
70
     */
71
    PROVIDE (_init = .);
72
    *crti.o(.init)
73
    *(.init)
74
    *crtn.o(.init)
75
 
76
    PROVIDE (_fini = .);
77
    *crti.o(.fini)
78
    *(.fini)
79
    *crtn.o(.fini)
80
 
81
    /*
82
     * C++ constructors/destructors
83
     *
84
     * gcc uses crtbegin.o to find the start of the constructors
85
     * and destructors so we make sure it is first.  Because this
86
     * is a wildcard, it doesn't matter if the user does not
87
     * actually link against crtbegin.o; the linker won't look for
88
     * a file to match a wildcard.  The wildcard also means that
89
     * it doesn't matter which directory crtbegin.o is in. The
90
     * constructor and destructor list are terminated in
91
     * crtend.o.  The same comments apply to it.
92
     */
93
    . = ALIGN (16);
94
    *crtbegin.o(.ctors)
95
    *(.ctors)
96
    *crtend.o(.ctors)
97
 
98
    *crtbegin.o(.dtors)
99
    *(.dtors)
100
    *crtend.o(.dtors)
101
 
102
    /*
103
     * Exception frame info
104
     */
105
    . = ALIGN (16);
106
    *(.eh_frame)
107
 
108
    /*
109
     * Read-only data
110
     */
111
    . = ALIGN (16);
112
    PROVIDE(_rodata_start = . );
113
    *(.rodata)
114
    *(.gnu.linkonce.r*)
115
    PROVIDE(_erodata = . );
116
 
117
    . = ALIGN (16);
118
    PROVIDE (_etext = .);
119
  } >ram
120
 
121
  .data : {
122
    PROVIDE (_copy_start = .);
123
    *(.data)
124
    *(.gnu.linkonce.d*)
125
    *(.gcc_except_table)
126
    . = ALIGN (16);
127
    PROVIDE (_edata = .);
128
    PROVIDE (_copy_end = .);
129
  } >ram
130
 
131
 .bss : {
132
    _clear_start = .;
133
    *(.bss)
134
    *(COMMON)
135
    . = ALIGN (16);
136
    PROVIDE (end = .);
137
 
138
    . += _StackSize;
139
    . = ALIGN (16);
140
    _stack_init = .;
141
    _clear_end = .;
142
 
143
    _WorkspaceBase = .;
144
  } >ram
145
 
146
  /* Stabs debugging sections.  */
147
  .stab 0 : { *(.stab) }
148
  .stabstr 0 : { *(.stabstr) }
149
  .stab.excl 0 : { *(.stab.excl) }
150
  .stab.exclstr 0 : { *(.stab.exclstr) }
151
  .stab.index 0 : { *(.stab.index) }
152
  .stab.indexstr 0 : { *(.stab.indexstr) }
153
  .comment 0 : { *(.comment) }
154
 
155
  /* DWARF debug sections.
156
     Symbols in the DWARF debugging sections are relative to the beginning
157
     of the section so we begin them at 0.  */
158
  /* DWARF 1 */
159
  .debug          0 : { *(.debug) }
160
  .line           0 : { *(.line) }
161
 
162
  /* GNU DWARF 1 extensions */
163
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
164
  .debug_sfnames  0 : { *(.debug_sfnames) }
165
 
166
  /* DWARF 1.1 and DWARF 2 */
167
  .debug_aranges  0 : { *(.debug_aranges) }
168
  .debug_pubnames 0 : { *(.debug_pubnames) }
169
 
170
  /* DWARF 2 */
171
  .debug_info     0 : { *(.debug_info) }
172
  .debug_abbrev   0 : { *(.debug_abbrev) }
173
  .debug_line     0 : { *(.debug_line) }
174
  .debug_frame    0 : { *(.debug_frame) }
175
  .debug_str      0 : { *(.debug_str) }
176
  .debug_loc      0 : { *(.debug_loc) }
177
  .debug_macinfo  0 : { *(.debug_macinfo) }
178
 
179
  /* SGI/MIPS DWARF 2 extensions */
180
  .debug_weaknames 0 : { *(.debug_weaknames) }
181
  .debug_funcnames 0 : { *(.debug_funcnames) }
182
  .debug_typenames 0 : { *(.debug_typenames) }
183
  .debug_varnames  0 : { *(.debug_varnames) }
184
  /* These must appear regardless of  .  */
185
}

powered by: WebSVN 2.1.0

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