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/] [elflinkcmds] - 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: elflinkcmds,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.
26
 */
27
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
28
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
29
 
30
MEMORY
31
{
32
  /*  The location of RAM is the address space is configurable.
33
      This is where we put one board. The base address should be
34
      passed as a parameter when building multiprocessor images
35
      where each board resides at a different address. */
36
  ram  : org = 0x00800000, l = 4M
37
  rom  : org = 0xFF800000, l = 4M
38
  sram : org = 0xFFE00000, l = 128K
39
}
40
 
41
SECTIONS
42
{
43
  /*
44
   * We want the entry point to be the first thing in memory.
45
   * Merge all read-only data into the .text section.
46
   */
47
  .text 0x00800000 :
48
  {
49
    text_start = . ;
50
 
51
    *(.text)
52
    *(.text.*)
53
    *(.stub)
54
 
55
    /* C++ constructors/destructors */
56
    *(.gnu.linkonce.t*)
57
 
58
    /* Initialization and finalization code.
59
     *
60
     * Various files can provide initialization and finalization functions.
61
     * crtbegin.o and crtend.o are two instances. The body of these functions
62
     * are in .init and .fini sections. We accumulate the bodies here, and
63
     * prepend function prologues from crti.o and function epilogues from
64
     * crtn.o. crti.o must be linked first; crtn.o must be linked last.
65
     * Because these are wildcards, it doesn't matter if the user does not
66
     * actually link against crti.o and crtn.o; the linker won't look for a
67
     * file to match a wildcard.  The wildcard also means that it doesn't
68
     * matter which directory crti.o and crtn.o are in.
69
     */
70
    PROVIDE (_init = .);
71
    *crti.o(.init)
72
    *(.init)
73
    *crtn.o(.init)
74
 
75
    PROVIDE (_fini = .);
76
    *crti.o(.fini)
77
    *(.fini)
78
    *crtn.o(.init)
79
 
80
    . = ALIGN (16);
81
 
82
    /* C++ constructors and destructors for static objects.
83
     *
84
     * gcc uses crtbegin.o to find the start of the constructors and
85
     * destructors so we make sure it is first.  Because this is a wildcard,
86
     * it doesn't matter if the user does not actually link against
87
     * crtbegin.o; the linker won't look for a file to match a wildcard.  The
88
     * wildcard also means that it doesn't matter which directory crtbegin.o
89
     * is in. The constructor and destructor list are terminated in crtend.o.
90
     * The same comments apply to it.
91
     */
92
    PROVIDE (__CTOR_LIST__ = .);
93
    *crtbegin.o(.ctors)
94
    *(.ctors)
95
    *crtend.o(.ctors)
96
    PROVIDE (__CTOR_END__ = .);
97
 
98
    PROVIDE (__DTOR_LIST__ = .);
99
    *crtbegin.o(.dtors)
100
    *(.dtors)
101
    *crtend.o(.dtors)
102
    PROVIDE (__DTOR_END__ = .);
103
 
104
    . = ALIGN (16);
105
 
106
    /* Exception frame info */
107
    *(.eh_frame)
108
 
109
    . = ALIGN (16);
110
 
111
    /* Do we have any of these with egcs-1.x and higher? */
112
    *(.gcc_exc)
113
 
114
    . = ALIGN (16);
115
 
116
    _rodata_start = . ;
117
    *(.rodata)
118
    *(.rodata.*)
119
    *(.gnu.linkonce.r*)
120
    *(.rodata1)
121
    _erodata = .;
122
 
123
    _etext = .;
124
    PROVIDE (etext = .);
125
 
126
  } >ram =0x4e75
127
 
128
  . = ALIGN (16);
129
 
130
  .data :
131
  {
132
    data_start = .;
133
 
134
    *(.data)
135
    *(.data.*)
136
    *(.data1)
137
    *(.sdata)
138
    *(.gnu.linkonce.d*)
139
    *(.gcc_except_table)
140
 
141
    . = ALIGN (16);
142
    _edata = .;
143
    PROVIDE (edata = .);
144
  } >ram
145
 
146
  .bss :
147
  {
148
    bss_start = .;
149
    *(.dynbss)
150
    *(.bss)
151
    *(COMMON)
152
    *(.sbss)
153
    *(.scommon)
154
 
155
    . = ALIGN (16);
156
    _end = .;
157
    PROVIDE (end = .);
158
  } >ram
159
 
160
  _HeapStart    = .;
161
  . += HeapSize;        /* XXX -- Old gld can't handle this     */
162
  _HeapEnd = .;
163
  _StackStart = .;
164
  . += _StackSize;      /* XXX -- Old gld can't handle this     */
165
  /* . +=       0x10000; */     /* HeapSize     for     old     gld     */
166
  /* . +=       0x1000;  */     /* _StackSize for old gld */
167
  . =   ALIGN (16);
168
  _StackEnd = .;
169
  stack_init = .;
170
  clear_end =   .;
171
 
172
  _WorkspaceBase        = .;
173
 
174
  /* Stabs debugging sections.  */
175
  .stab 0 : { *(.stab) }
176
  .stabstr 0 : { *(.stabstr) }
177
  .stab.excl 0 : { *(.stab.excl) }
178
  .stab.exclstr 0 : { *(.stab.exclstr) }
179
  .stab.index 0 : { *(.stab.index) }
180
  .stab.indexstr 0 : { *(.stab.indexstr) }
181
  .comment 0 : { *(.comment) }
182
 
183
  /* DWARF debug sections.
184
     Symbols in the DWARF debugging sections are relative to the beginning
185
     of the section so we begin them at 0.  */
186
  /* DWARF 1 */
187
  .debug          0 : { *(.debug) }
188
  .line           0 : { *(.line) }
189
 
190
  /* GNU DWARF 1 extensions */
191
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
192
  .debug_sfnames  0 : { *(.debug_sfnames) }
193
 
194
  /* DWARF 1.1 and DWARF 2 */
195
  .debug_aranges  0 : { *(.debug_aranges) }
196
  .debug_pubnames 0 : { *(.debug_pubnames) }
197
 
198
  /* DWARF 2 */
199
  .debug_info     0 : { *(.debug_info) }
200
  .debug_abbrev   0 : { *(.debug_abbrev) }
201
  .debug_line     0 : { *(.debug_line) }
202
  .debug_frame    0 : { *(.debug_frame) }
203
  .debug_str      0 : { *(.debug_str) }
204
  .debug_loc      0 : { *(.debug_loc) }
205
  .debug_macinfo  0 : { *(.debug_macinfo) }
206
 
207
  /* SGI/MIPS DWARF 2 extensions */
208
  .debug_weaknames 0 : { *(.debug_weaknames) }
209
  .debug_funcnames 0 : { *(.debug_funcnames) }
210
  .debug_typenames 0 : { *(.debug_typenames) }
211
  .debug_varnames  0 : { *(.debug_varnames) }
212
  /* These must appear regardless of  .  */
213
}
214
 

powered by: WebSVN 2.1.0

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