1 |
27 |
unneback |
//===========================================================================
|
2 |
|
|
//
|
3 |
|
|
// MLT linker script for H8/300H
|
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 |
|
|
#include
|
42 |
|
|
STARTUP(vectors.o)
|
43 |
|
|
ENTRY(CYG_LABEL_DEFN(_start))
|
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 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 |
|
|
.vectors _vma_ : _lma_ \
|
62 |
|
|
{ FORCE_OUTPUT; KEEP (*(.vectors)) } \
|
63 |
|
|
> _region_
|
64 |
|
|
|
65 |
|
|
#define SECTION_text(_region_, _vma_, _lma_) \
|
66 |
|
|
.text _vma_ : _lma_ \
|
67 |
|
|
{ CYG_LABEL_DEFN(__stext) = ABSOLUTE(.); \
|
68 |
|
|
*(.text*) *(.gnu.warning) *(.gnu.linkonce*) *(.init) } \
|
69 |
|
|
> _region_ \
|
70 |
|
|
CYG_LABEL_DEFN(__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_int_fook_table(_region_, _vma_, _lma_) \
|
98 |
|
|
.int_fook_table _vma_ : _lma_ \
|
99 |
|
|
{ CYG_LABEL_DEFN(__int_fook_start) = ABSOLUTE (.); \
|
100 |
|
|
FORCE_OUTPUT; *(.int_fook_table) } \
|
101 |
|
|
> _region_ \
|
102 |
|
|
CYG_LABEL_DEFN(__rom_int_fook_start) = LOADADDR (.int_fook_table); \
|
103 |
|
|
CYG_LABEL_DEFN(__int_fook_end) = .;
|
104 |
|
|
|
105 |
|
|
#define SECTION_data(_region_, _vma_, _lma_) \
|
106 |
|
|
.data _vma_ : _lma_ \
|
107 |
|
|
{ CYG_LABEL_DEFN(__ram_data_start) = ABSOLUTE (.); *(.data*) *(.data1) \
|
108 |
|
|
. = ALIGN(4); \
|
109 |
|
|
KEEP(*( SORT (.ecos.table.*))) ; \
|
110 |
|
|
. = ALIGN(4); \
|
111 |
|
|
CYG_LABEL_DEFN(_GOT1_START_) = ABSOLUTE (.); *(.got1) CYG_LABEL_DEFN(_GOT1_END_) = ABSOLUTE (.); \
|
112 |
|
|
CYG_LABEL_DEFN(_GOT2_START_) = ABSOLUTE (.); *(.got2) CYG_LABEL_DEFN(_GOT2_END_) = ABSOLUTE (.); \
|
113 |
|
|
. = ALIGN (4); \
|
114 |
|
|
CYG_LABEL_DEFN(__CTOR_LIST__) = ABSOLUTE (.); KEEP (*(SORT (.ctors*))) CYG_LABEL_DEFN(__CTOR_END__) = ABSOLUTE (.); \
|
115 |
|
|
CYG_LABEL_DEFN(__DTOR_LIST__) = ABSOLUTE (.); KEEP (*(SORT (.dtors*))) CYG_LABEL_DEFN(__DTOR_END__) = ABSOLUTE (.); \
|
116 |
|
|
CYG_LABEL_DEFN(_GOT_START) = ABSOLUTE (.); CYG_LABEL_DEFN(_GLOBAL_OFFSET_TABLE_) = ABSOLUTE (.) + 32768; CYG_LABEL_DEFN(_SDA_BASE_) = ABSOLUTE (.); \
|
117 |
|
|
*(.got.plt) *(.got) CYG_LABEL_DEFN(_GOT_END_) = ABSOLUTE (.); \
|
118 |
|
|
*(.eh_frame) \
|
119 |
|
|
*(.dynamic) *(.sdata*) *(.sbss*) } \
|
120 |
|
|
> _region_ \
|
121 |
|
|
CYG_LABEL_DEFN(__rom_data_start) = LOADADDR (.data); \
|
122 |
|
|
CYG_LABEL_DEFN(__ram_data_end) = .; PROVIDE (CYG_LABEL_DEFN(__ram_data_end) = .); CYG_LABEL_DEFN(_edata) = .; PROVIDE (edata = .);
|
123 |
|
|
|
124 |
|
|
#define SECTION_bss(_region_, _vma_, _lma_) \
|
125 |
|
|
.bss _vma_ : _lma_ \
|
126 |
|
|
{ CYG_LABEL_DEFN(__bss_start) = ABSOLUTE (.); \
|
127 |
|
|
*(.scommon) *(.dynbss) *(.bss) *(COMMON) \
|
128 |
|
|
CYG_LABEL_DEFN(__bss_end) = ABSOLUTE (.); } \
|
129 |
|
|
> _region_
|
130 |
|
|
|
131 |
|
|
#define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .);
|
132 |
|
|
|
133 |
|
|
#include CYGHWR_MEMORY_LAYOUT_LDI
|
134 |
|
|
#include CYGBLD_HAL_PLATFORM_H
|
135 |
|
|
|
136 |
|
|
CYG_LABEL_DEFN(hal_virtual_vector_table) = CYGHWR_HAL_VECTOR_TABLE;
|
137 |
|
|
|
138 |
|
|
|