1 |
786 |
skrzyp |
//=============================================================================
|
2 |
|
|
//
|
3 |
|
|
// MLT linker script for Fujitsu FR30
|
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(_start)
|
43 |
|
|
#ifdef EXTRAS
|
44 |
|
|
INPUT(extras.o)
|
45 |
|
|
#endif
|
46 |
|
|
#if (__GNUC__ >= 3)
|
47 |
|
|
// GROUP(libtarget.a libgcc.a libsupc++.a)
|
48 |
|
|
GROUP(libtarget.a libgcc.a)
|
49 |
|
|
#else
|
50 |
|
|
GROUP(libtarget.a libgcc.a)
|
51 |
|
|
#endif
|
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 |
|
|
/* Debug information */ \
|
60 |
|
|
.debug_aranges 0 : { *(.debug_aranges) } \
|
61 |
|
|
.debug_pubnames 0 : { *(.debug_pubnames) } \
|
62 |
|
|
.debug_info 0 : { *(.debug_info) } \
|
63 |
|
|
.debug_abbrev 0 : { *(.debug_abbrev) } \
|
64 |
|
|
.debug_line 0 : { *(.debug_line) } \
|
65 |
|
|
.debug_frame 0 : { *(.debug_frame) } \
|
66 |
|
|
.debug_str 0 : { *(.debug_str) } \
|
67 |
|
|
.debug_loc 0 : { *(.debug_loc) } \
|
68 |
|
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
69 |
|
|
|
70 |
|
|
#define SECTION_fixed_vectors(_region_, _vma_, _lma_) \
|
71 |
|
|
.fixed_vectors _vma_ : _lma_ \
|
72 |
|
|
{ FORCE_OUTPUT; KEEP (*(.fixed_vectors)) } \
|
73 |
|
|
> _region_
|
74 |
|
|
|
75 |
|
|
#define SECTION_rom_vectors(_region_, _vma_, _lma_) \
|
76 |
|
|
.rom_vectors _vma_ : _lma_ \
|
77 |
|
|
{ FORCE_OUTPUT; KEEP (*(.rom_vectors)) } \
|
78 |
|
|
> _region_
|
79 |
|
|
|
80 |
|
|
#define SECTION_rom_startup(_region_, _vma_, _lma_) \
|
81 |
|
|
.rom_startup_trampoline _vma_ : _lma_ \
|
82 |
|
|
{ FORCE_OUTPUT; KEEP(*(.rom_startup_trampoline*)) } \
|
83 |
|
|
> _region_
|
84 |
|
|
|
85 |
|
|
#define SECTION_ram_startup(_region_, _vma_, _lma_) \
|
86 |
|
|
.ram_startup_trampoline _vma_ : _lma_ \
|
87 |
|
|
{ __ram_trampoline_start = ABSOLUTE (.); FORCE_OUTPUT; KEEP(*(.ram_startup_trampoline*)) } \
|
88 |
|
|
> _region_ \
|
89 |
|
|
__rom_trampoline_start = LOADADDR (.ram_startup_trampoline); \
|
90 |
|
|
__rom_trampoline_end = LOADADDR (.ram_startup_trampoline) + SIZEOF(.ram_startup_trampoline);
|
91 |
|
|
|
92 |
|
|
#define SECTION_text(_region_, _vma_, _lma_) \
|
93 |
|
|
.text _vma_ : _lma_ \
|
94 |
|
|
{ _stext = ABSOLUTE(.); \
|
95 |
|
|
PROVIDE (__stext = ABSOLUTE(.)); \
|
96 |
|
|
*(.text*) *(.gnu.warning) *(.gnu.linkonce*) *(.init) \
|
97 |
|
|
*(.glue_7) *(.glue_7t) \
|
98 |
|
|
} > _region_ \
|
99 |
|
|
_etext = .; PROVIDE (__etext = .);
|
100 |
|
|
|
101 |
|
|
#define SECTION_fini(_region_, _vma_, _lma_) \
|
102 |
|
|
.fini _vma_ : _lma_ \
|
103 |
|
|
{ FORCE_OUTPUT; *(.fini) } \
|
104 |
|
|
> _region_
|
105 |
|
|
|
106 |
|
|
#define SECTION_rodata(_region_, _vma_, _lma_) \
|
107 |
|
|
.rodata _vma_ : _lma_ \
|
108 |
|
|
{ FORCE_OUTPUT; *(.rodata*) } \
|
109 |
|
|
> _region_
|
110 |
|
|
|
111 |
|
|
#define SECTION_rodata1(_region_, _vma_, _lma_) \
|
112 |
|
|
.rodata1 _vma_ : _lma_ \
|
113 |
|
|
{ FORCE_OUTPUT; *(.rodata1) } \
|
114 |
|
|
> _region_
|
115 |
|
|
|
116 |
|
|
#define SECTION_fixup(_region_, _vma_, _lma_) \
|
117 |
|
|
.fixup _vma_ : _lma_ \
|
118 |
|
|
{ FORCE_OUTPUT; *(.fixup) } \
|
119 |
|
|
> _region_
|
120 |
|
|
|
121 |
|
|
#define SECTION_gcc_except_table(_region_, _vma_, _lma_) \
|
122 |
|
|
.gcc_except_table _vma_ : _lma_ \
|
123 |
|
|
{ FORCE_OUTPUT; *(.gcc_except_table) } \
|
124 |
|
|
> _region_
|
125 |
|
|
|
126 |
|
|
#define SECTION_sram(_region_, _vma_, _lma_) \
|
127 |
|
|
.sram _vma_ : _lma_ \
|
128 |
|
|
{ FORCE_OUTPUT; *(.sram*) } \
|
129 |
|
|
> _region_
|
130 |
|
|
|
131 |
|
|
#define SECTION_data(_region_, _vma_, _lma_) \
|
132 |
|
|
.data _vma_ : _lma_ \
|
133 |
|
|
{ __ram_data_start = ABSOLUTE (.); *(.data*) *(.data1) \
|
134 |
|
|
. = ALIGN (8); \
|
135 |
|
|
KEEP(*( SORT (.ecos.table.*))) ; \
|
136 |
|
|
. = ALIGN (8); \
|
137 |
|
|
__CTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.ctors*))) __CTOR_END__ = ABSOLUTE (.); \
|
138 |
|
|
__DTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.dtors*))) __DTOR_END__ = ABSOLUTE (.); \
|
139 |
|
|
*(.sdata*) \
|
140 |
|
|
*(.eh_frame) \
|
141 |
|
|
. = ALIGN (8); *(.2ram.*) \
|
142 |
|
|
/* Global pointer stuff */ \
|
143 |
|
|
. = ALIGN(8); _gp = . + 2048; __global = _gp; \
|
144 |
|
|
_GOT_START_ = ABSOLUTE (.); *(.got) _GOT_END_ = ABSOLUTE (.); \
|
145 |
|
|
_GOT_PLT_START_ = ABSOLUTE (.); *(.got_plt) _GOT_PLT_END_ = ABSOLUTE (.); \
|
146 |
|
|
_GOT1_START_ = ABSOLUTE (.); *(.got1) _GOT1_END_ = ABSOLUTE (.); \
|
147 |
|
|
_GOT2_START_ = ABSOLUTE (.); *(.got2) _GOT2_END_ = ABSOLUTE (.); \
|
148 |
|
|
_DYNAMIC_ = ABSOLUTE (.); *(.dynamic) _DYNAMIC_ = ABSOLUTE (.); \
|
149 |
|
|
} \
|
150 |
|
|
> _region_ \
|
151 |
|
|
__rom_data_start = LOADADDR (.data); \
|
152 |
|
|
__ram_data_end = .; PROVIDE (__ram_data_end = .); _edata = .; PROVIDE (edata = .); \
|
153 |
|
|
__rom_data_end = LOADADDR (.data) + SIZEOF(.data);
|
154 |
|
|
|
155 |
|
|
#define SECTION_bss(_region_, _vma_, _lma_) \
|
156 |
|
|
.bss _vma_ : _lma_ \
|
157 |
|
|
{ __bss_start = ABSOLUTE (.); \
|
158 |
|
|
*(.scommon) *(.dynbss) *(.sbss) *(.sbss.*) *(.bss*) *(.bss.*) *(COMMON) \
|
159 |
|
|
__bss_end = ABSOLUTE (.); } \
|
160 |
|
|
> _region_
|
161 |
|
|
|
162 |
|
|
#define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .);
|
163 |
|
|
|
164 |
|
|
#include
|
165 |
|
|
#include CYGHWR_MEMORY_LAYOUT_LDI
|