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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [mips/] [vr4300/] [v2_0/] [src/] [mips_vr4300.ld] - Blame information for rev 737

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

Line No. Rev Author Line
1 27 unneback
//===========================================================================
2
//
3
// MLT linker script for MIPS VR4300
4
//
5
//===========================================================================
6
//####ECOSGPLCOPYRIGHTBEGIN####
7
// -------------------------------------------
8
// This file is part of eCos, the Embedded Configurable Operating System.
9
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
10
//
11
// eCos is free software; you can redistribute it and/or modify it under
12
// the terms of the GNU General Public License as published by the Free
13
// Software Foundation; either version 2 or (at your option) any later version.
14
//
15
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
16
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
18
// for more details.
19
//
20
// You should have received a copy of the GNU General Public License along
21
// with eCos; if not, write to the Free Software Foundation, Inc.,
22
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
23
//
24
// As a special exception, if other files instantiate templates or use macros
25
// or inline functions from this file, or you compile this file and link it
26
// with other works to produce a work based on this file, this file does not
27
// by itself cause the resulting work to be covered by the GNU General Public
28
// License. However the source code for this file must still be made available
29
// in accordance with section (3) of the GNU General Public License.
30
//
31
// This exception does not invalidate any other reasons why a work based on
32
// this file might be covered by the GNU General Public License.
33
//
34
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
35
// at http://sources.redhat.com/ecos/ecos-license/
36
// -------------------------------------------
37
//####ECOSGPLCOPYRIGHTEND####
38
//===========================================================================
39
 
40
#include 
41
 
42
STARTUP(vectors.o)
43
ENTRY(reset_vector)
44
OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-littlemips")
45
#ifdef EXTRAS
46
INPUT(extras.o)
47
#endif
48
#if (__GNUC__ >= 3)
49
GROUP(libtarget.a libgcc.a libsupc++.a)
50
#else
51
GROUP(libtarget.a libgcc.a)
52
#endif
53
 
54
#define ALIGN_LMA 8
55
#define FOLLOWING(_section_) AT ((LOADADDR (_section_) + SIZEOF (_section_) + ALIGN_LMA - 1) & ~ (ALIGN_LMA - 1))
56
#define LMA_EQ_VMA
57
#define FORCE_OUTPUT . = .
58
 
59
#define SECTIONS_BEGIN
60
 
61
#if defined(CYG_HAL_STARTUP_RAM)
62
 
63
/* this version for RAM startup */
64
#define SECTION_rom_vectors(_region_, _vma_, _lma_) \
65
    .rom_vectors _vma_ : _lma_ \
66
    { KEEP (*(.utlb_vector)) \
67
    . = ALIGN(0x80); KEEP(*(.other_vector)) \
68
        /* debug and reset vector not used in RAM version */ \
69
        KEEP (*(.reset_vector)) } \
70
    > _region_
71
 
72
#elif defined(CYG_HAL_STARTUP_ROM)
73
 
74
/* this version for ROM startup */
75
#define SECTION_rom_vectors(_region_, _vma_, _lma_)     \
76
    .rom_vectors _vma_ : _lma_                          \
77
    {                                                   \
78
        KEEP (*(.reset_vector))                         \
79
        . = ALIGN(0x200);                               \
80
        KEEP (*(.utlb_vector))                          \
81
        . = ALIGN(0x100);                               \
82
        . = . + (0x80);                                 \
83
        KEEP(*(.other_vector))                          \
84
    } > _region_
85
 
86
#elif defined(CYG_HAL_STARTUP_ROMRAM)
87
 
88
/* this version for ROMRAM startup.  These are actually a           */
89
/* combination of the ROM and RAM vector locations since the code   */
90
/* starts off in ROM and transfers to RAM during startup.           */
91
#define SECTION_rom_vectors(_region_, _vma_, _lma_)     \
92
    .rom_vectors _vma_ : _lma_                          \
93
    {                                                   \
94
        KEEP (*(.reset_vector))                         \
95
        . = ALIGN(0x100);                               \
96
        KEEP (*(.utlb_vector))                          \
97
        . = ALIGN(0x80);                                \
98
        KEEP(*(.other_vector))                          \
99
        . = ALIGN(0x800);                               \
100
    } > _region_ =0
101
 
102
#endif /* ROMRAM startup version of ROM vectors */
103
 
104
#define SECTION_text(_region_, _vma_, _lma_) \
105
    .text _vma_ : _lma_ \
106
    { _stext = ABSOLUTE(.); \
107
    *(.text*) *(.gnu.warning) *(.gnu.linkonce*) *(.init) } \
108
    > _region_ \
109
    _etext = .; PROVIDE (etext = .);
110
 
111
#define SECTION_fini(_region_, _vma_, _lma_) \
112
    .fini _vma_ : _lma_ \
113
    { FORCE_OUTPUT; *(.fini) } \
114
    > _region_
115
 
116
#define SECTION_ctors(_region_, _vma_, _lma_)   \
117
   .ctors _vma_ : _lma_                         \
118
   {                                            \
119
     __CTOR_LIST__ = ABSOLUTE (.);              \
120
     KEEP(*(.ctors))                            \
121
     KEEP(*(SORT(.ctors.*)))                    \
122
     __CTOR_END__ = ABSOLUTE (.);               \
123
   } > _region_
124
 
125
#define SECTION_dtors(_region_, _vma_, _lma_)   \
126
   .dtors _vma_ : _lma_                         \
127
   {                                            \
128
     __DTOR_LIST__ = ABSOLUTE (.);              \
129
     KEEP(*(SORT(.dtors.*)))                    \
130
     KEEP(*(.dtors))                            \
131
     __DTOR_END__ = ABSOLUTE (.);               \
132
   } > _region_
133
 
134
#define SECTION_rodata(_region_, _vma_, _lma_)  \
135
    .rodata _vma_ : _lma_                       \
136
    { FORCE_OUTPUT; *(.rodata*) }               \
137
    > _region_
138
 
139
#define SECTION_vsr_table(_region_, _vma_, _lma_) \
140
    .vsr_table _vma_ : _lma_ \
141
    { FORCE_OUTPUT; *(.vsr_table) } \
142
    > _region_
143
 
144
#define SECTION_rodata1(_region_, _vma_, _lma_) \
145
    .rodata1 _vma_ : _lma_ \
146
    { FORCE_OUTPUT; *(.rodata1) } \
147
    > _region_
148
 
149
#define SECTION_fixup(_region_, _vma_, _lma_) \
150
    .fixup _vma_ : _lma_ \
151
    { FORCE_OUTPUT; *(.fixup) } \
152
    > _region_
153
 
154
#define SECTION_rel__dyn(_region_, _vma_, _lma_) \
155
    .rel.dyn _vma_ : _lma_ \
156
    { FORCE_OUTPUT; *(.rel.dyn) } \
157
    > _region_
158
 
159
#define SECTION_gcc_except_table(_region_, _vma_, _lma_) \
160
    .gcc_except_table _vma_ : _lma_ \
161
    { FORCE_OUTPUT; *(.gcc_except_table) } \
162
    > _region_
163
 
164
#define SECTION_data(_region_, _vma_, _lma_) \
165
    .data _vma_ : _lma_ \
166
    { __ram_data_start = ABSOLUTE (.); \
167
    *(.data*) *(.data1) \
168
    *( .2ram.*)                                     \
169
    _GOT1_START_ = ABSOLUTE (.); *(.got1) _GOT1_END_ = ABSOLUTE (.); \
170
    _GOT2_START_ = ABSOLUTE (.); *(.got2) _GOT2_END_ = ABSOLUTE (.); \
171
    . = ALIGN (8); \
172
    KEEP(*( SORT (.ecos.table.*))) ;            \
173
    . = ALIGN (8); \
174
    _GOT_START = ABSOLUTE (.); _gp = ABSOLUTE (.); __global = _gp; _GLOBAL_OFFSET_TABLE_ = ABSOLUTE (.); _SDA_BASE_ = ABSOLUTE (.); \
175
    *(.got.plt) *(.got) _GOT_END_ = ABSOLUTE (.); \
176
    *(.dynamic) *(.lit8) *(.lit4) *(.sdata*) *(.sbss*) *(.eh_frame) } \
177
    > _region_ \
178
    __rom_data_start = LOADADDR (.data); \
179
    __ram_data_end = .; PROVIDE (__ram_data_end = .); _edata = .; PROVIDE (edata = .);
180
 
181
#define SECTION_bss(_region_, _vma_, _lma_) \
182
    .bss _vma_ : _lma_ \
183
    { __bss_start = ABSOLUTE (.); \
184
    *(.scommon) *(.dynbss) *(.bss) *(COMMON) \
185
    __bss_end = ABSOLUTE (.); } \
186
    > _region_
187
 
188
#define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .); \
189
    .debug           0 : { *(.debug) } \
190
    .line            0 : { *(.line) } \
191
    .debug_srcinfo   0 : { *(.debug_srcinfo) } \
192
    .debug_sfnames   0 : { *(.debug_sfnames) } \
193
    .debug_aranges   0 : { *(.debug_aranges) } \
194
    .debug_pubnames  0 : { *(.debug_pubnames) } \
195
    .debug_info      0 : { *(.debug_info) } \
196
    .debug_abbrev    0 : { *(.debug_abbrev) } \
197
    .debug_line      0 : { *(.debug_line) } \
198
    .debug_frame     0 : { *(.debug_frame) } \
199
    .debug_str       0 : { *(.debug_str) } \
200
    .debug_loc       0 : { *(.debug_loc) } \
201
    .debug_macinfo   0 : { *(.debug_macinfo) } \
202
    .debug_weaknames 0 : { *(.debug_weaknames) } \
203
    .debug_funcnames 0 : { *(.debug_funcnames) } \
204
    .debug_typenames 0 : { *(.debug_typenames) } \
205
    .debug_varnames  0 : { *(.debug_varnames) } \
206
    /DISCARD/          : { *(.debug_vector) }
207
 
208
#include CYGHWR_MEMORY_LAYOUT_LDI
209
 
210
#ifndef CYGPKG_HAL_MIPS_SIM
211
hal_vsr_table = 0x80000400;
212
hal_virtual_vector_table = 0x80000600;
213
#endif
214
 

powered by: WebSVN 2.1.0

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