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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [mips/] [vr4300/] [current/] [src/] [mips_vr4300.ld] - Blame information for rev 838

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

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

powered by: WebSVN 2.1.0

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