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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [mn10300/] [am31/] [current/] [src/] [mn10300_am31.ld] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
//===========================================================================
2
//
3
// MLT linker script for MN10300
4
// adapted from packages\hal\mn10300\stdeval1\v1_1\src\stdeval1.ld
5
//
6
//===========================================================================
7
// ####ECOSGPLCOPYRIGHTBEGIN####
8
// -------------------------------------------
9
// This file is part of eCos, the Embedded Configurable Operating System.
10
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
11
//
12
// eCos is free software; you can redistribute it and/or modify it under
13
// the terms of the GNU General Public License as published by the Free
14
// Software Foundation; either version 2 or (at your option) any later
15
// version.
16
//
17
// eCos is distributed in the hope that it will be useful, but WITHOUT
18
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
20
// for more details.
21
//
22
// You should have received a copy of the GNU General Public License
23
// along with eCos; if not, write to the Free Software Foundation, Inc.,
24
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
25
//
26
// As a special exception, if other files instantiate templates or use
27
// macros or inline functions from this file, or you compile this file
28
// and link it with other works to produce a work based on this file,
29
// this file does not by itself cause the resulting work to be covered by
30
// the GNU General Public License. However the source code for this file
31
// must still be made available in accordance with section (3) of the GNU
32
// General Public License v2.
33
//
34
// This exception does not invalidate any other reasons why a work based
35
// on this file might be covered by the GNU General Public License.
36
// -------------------------------------------
37
// ####ECOSGPLCOPYRIGHTEND####
38
//===========================================================================
39
 
40
#include 
41
STARTUP(vectors.o)
42
ENTRY(reset_vector)
43
#ifdef EXTRAS
44
INPUT(extras.o)
45
#endif
46
#if (__GNUC__ >= 3)
47
GROUP(libtarget.a libgcc.a libsupc++.a)
48
#else
49
GROUP(libtarget.a libgcc.a)
50
#endif
51
 
52
 
53
#define ALIGN_LMA 4
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
#define SECTION_rom_vectors(_region_, _vma_, _lma_) \
61
    .rom_vectors _vma_ : _lma_ \
62
    { FORCE_OUTPUT; KEEP (*(.vectors)) } \
63
    > _region_
64
 
65
#define SECTION_text(_region_, _vma_, _lma_) \
66
    .text _vma_ : _lma_ \
67
    { __stext = ABSOLUTE(.); \
68
    *(.text*) *(.gnu.warning) *(.gnu.linkonce*) *(.init) } \
69
    > _region_ \
70
    __etext = .; PROVIDE (etext = .);
71
 
72
#define SECTION_fini(_region_, _vma_, _lma_) \
73
    .fini _vma_ : _lma_ \
74
    { FORCE_OUTPUT; *(.fini) } \
75
    > _region_
76
 
77
#define SECTION_rodata(_region_, _vma_, _lma_) \
78
    .rodata _vma_ : _lma_ \
79
    { FORCE_OUTPUT; *(.rodata*) } \
80
    > _region_
81
 
82
#define SECTION_rodata1(_region_, _vma_, _lma_) \
83
    .rodata1 _vma_ : _lma_ \
84
    { FORCE_OUTPUT; *(.rodata1) } \
85
    > _region_
86
 
87
#define SECTION_fixup(_region_, _vma_, _lma_) \
88
    .fixup _vma_ : _lma_ \
89
    { FORCE_OUTPUT; *(.fixup) } \
90
    > _region_
91
 
92
#define SECTION_gcc_except_table(_region_, _vma_, _lma_) \
93
    .gcc_except_table _vma_ : _lma_ \
94
    { FORCE_OUTPUT; *(.gcc_except_table) } \
95
    > _region_
96
 
97
#define SECTION_data(_region_, _vma_, _lma_) \
98
    .data _vma_ : _lma_ \
99
    { __ram_data_start = ABSOLUTE (.); *(.data*) *(.data1) \
100
    . = ALIGN(4); \
101
    KEEP(*( SORT (.ecos.table.*))) ; \
102
    . = ALIGN(4); \
103
    _GOT1_START_ = ABSOLUTE (.); *(.got1) _GOT1_END_ = ABSOLUTE (.); \
104
    _GOT2_START_ = ABSOLUTE (.); *(.got2) _GOT2_END_ = ABSOLUTE (.); \
105
    . = ALIGN (4); \
106
    __CTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.ctors*))) __CTOR_END__ = ABSOLUTE (.); \
107
    __DTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.dtors*))) __DTOR_END__ = ABSOLUTE (.); \
108
    _GOT_START = ABSOLUTE (.); _GLOBAL_OFFSET_TABLE_ = ABSOLUTE (.) + 32768; _SDA_BASE_ = ABSOLUTE (.); \
109
    *(.got.plt) *(.got) _GOT_END_ = ABSOLUTE (.); \
110
    *(.eh_frame) \
111
    *(.dynamic) *(.sdata*) *(.sbss*) } \
112
    > _region_ \
113
    __rom_data_start = LOADADDR (.data); \
114
    __ram_data_end = .; PROVIDE (__ram_data_end = .); _edata = .; PROVIDE (edata = .);
115
 
116
#define SECTION_bss(_region_, _vma_, _lma_) \
117
    .bss _vma_ : _lma_ \
118
    { __bss_start = ABSOLUTE (.); \
119
    *(.scommon) *(.dynbss) *(.bss) *(COMMON) \
120
    __bss_end = ABSOLUTE (.); } \
121
    > _region_
122
 
123
#define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .); \
124
  .stab 0 : { *(.stab) }                        \
125
  .stabstr 0 : { *(.stabstr) }                  \
126
  .stab.excl 0 : { *(.stab.excl) }              \
127
  .stab.exclstr 0 : { *(.stab.exclstr) }        \
128
  .stab.index 0 : { *(.stab.index) }            \
129
  .stab.indexstr 0 : { *(.stab.indexstr) }      \
130
  .comment 0 : { *(.comment) }                  \
131
  .debug          0 : { *(.debug) }             \
132
  .line           0 : { *(.line) }              \
133
  .debug_srcinfo  0 : { *(.debug_srcinfo) }     \
134
  .debug_sfnames  0 : { *(.debug_sfnames) }     \
135
  .debug_aranges  0 : { *(.debug_aranges) }     \
136
  .debug_pubnames 0 : { *(.debug_pubnames) }    \
137
  .debug_info     0 : { *(.debug_info) }        \
138
  .debug_abbrev   0 : { *(.debug_abbrev) }      \
139
  .debug_line     0 : { *(.debug_line) }        \
140
  .debug_frame    0 : { *(.debug_frame) }       \
141
  .debug_str      0 : { *(.debug_str) }         \
142
  .debug_loc      0 : { *(.debug_loc) }         \
143
  .debug_macinfo  0 : { *(.debug_macinfo) }     \
144
  .debug_weaknames 0 : { *(.debug_weaknames) }  \
145
  .debug_funcnames 0 : { *(.debug_funcnames) }  \
146
  .debug_typenames 0 : { *(.debug_typenames) }  \
147
  .debug_varnames  0 : { *(.debug_varnames) }
148
 
149
#include CYGHWR_MEMORY_LAYOUT_LDI
150
 
151
_mn10300_interrupt_control = 0x34000100;
152
_mn10300_interrupt_vectors = 0x20000000;
153
 
154
#if (defined (CYG_HAL_STARTUP_RAM) && ! defined (CYGPKG_HAL_MN10300_AM31_SIM))
155
#define VSR_BASE 0x48000000
156
_hal_vsr_table = VSR_BASE;
157
_hal_virtual_vector_table = VSR_BASE + 0x80;
158
#endif

powered by: WebSVN 2.1.0

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