1 //=============================================================================
3 // MLT linker script for Fujitsu (FR-V)
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.
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.
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
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.
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.
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.
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 //=============================================================================
40 #include <pkgconf/system.h>
48 GROUP(libtarget.a libgcc.a libsupc++.a)
50 GROUP(libtarget.a libgcc.a)
54 #define FOLLOWING(_section_) AT ((LOADADDR (_section_) + SIZEOF (_section_) + ALIGN_LMA - 1) & ~ (ALIGN_LMA - 1))
56 #define FORCE_OUTPUT . = .
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) }
70 #define SECTION_fixed_vectors(_region_, _vma_, _lma_) \
71 .fixed_vectors _vma_ : _lma_ \
72 { FORCE_OUTPUT; KEEP (*(.fixed_vectors)) } \
75 #define SECTION_rom_vectors(_region_, _vma_, _lma_) \
76 .rom_vectors _vma_ : _lma_ \
77 { FORCE_OUTPUT; KEEP (*(.rom_vectors)) } \
80 #define SECTION_text(_region_, _vma_, _lma_) \
82 { _stext = ABSOLUTE(.); \
83 PROVIDE (__stext = ABSOLUTE(.)); \
84 *(.text*) *(.gnu.warning) *(.gnu.linkonce*) *(.init) \
85 *(.glue_7) *(.glue_7t) \
87 _etext = .; PROVIDE (__etext = .);
89 #define SECTION_fini(_region_, _vma_, _lma_) \
91 { FORCE_OUTPUT; *(.fini) } \
94 #define SECTION_rodata(_region_, _vma_, _lma_) \
95 .rodata _vma_ : _lma_ \
96 { FORCE_OUTPUT; *(.rodata*) } \
99 #define SECTION_rodata1(_region_, _vma_, _lma_) \
100 .rodata1 _vma_ : _lma_ \
101 { FORCE_OUTPUT; *(.rodata1) } \
104 #define SECTION_fixup(_region_, _vma_, _lma_) \
105 .fixup _vma_ : _lma_ \
106 { FORCE_OUTPUT; *(.fixup) } \
109 #define SECTION_gcc_except_table(_region_, _vma_, _lma_) \
110 .gcc_except_table _vma_ : _lma_ \
111 { FORCE_OUTPUT; *(.gcc_except_table) } \
114 #define SECTION_mmu_tables(_region_, _vma_, _lma_) \
115 .mmu_tables _vma_ : _lma_ \
116 { FORCE_OUTPUT; *(.mmu_tables) } \
119 #define SECTION_sram(_region_, _vma_, _lma_) \
120 .sram _vma_ : _lma_ \
121 { FORCE_OUTPUT; *(.sram*) } \
124 #define SECTION_data(_region_, _vma_, _lma_) \
125 .data _vma_ : _lma_ \
126 { __ram_data_start = ABSOLUTE (.); *(.data*) *(.data1) \
128 KEEP(*( SORT (.ecos.table.*))) ; \
130 __CTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.ctors*))) __CTOR_END__ = ABSOLUTE (.); \
131 __DTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.dtors*))) __DTOR_END__ = ABSOLUTE (.); \
134 . = ALIGN (8); *(.2ram.*) \
135 /* Global pointer stuff */ \
136 . = ALIGN(8); _gp = . + 2048; __global = _gp; \
137 _GOT_START_ = ABSOLUTE (.); *(.got) _GOT_END_ = ABSOLUTE (.); \
138 _GOT_PLT_START_ = ABSOLUTE (.); *(.got_plt) _GOT_PLT_END_ = ABSOLUTE (.); \
139 _GOT1_START_ = ABSOLUTE (.); *(.got1) _GOT1_END_ = ABSOLUTE (.); \
140 _GOT2_START_ = ABSOLUTE (.); *(.got2) _GOT2_END_ = ABSOLUTE (.); \
141 _DYNAMIC_ = ABSOLUTE (.); *(.dynamic) _DYNAMIC_ = ABSOLUTE (.); \
144 __rom_data_start = LOADADDR (.data); \
145 __ram_data_end = .; PROVIDE (__ram_data_end = .); _edata = .; PROVIDE (edata = .); \
146 __rom_data_end = LOADADDR (.data) + SIZEOF(.data);
148 #define SECTION_bss(_region_, _vma_, _lma_) \
150 { __bss_start = ABSOLUTE (.); \
151 *(.scommon) *(.dynbss) *(.sbss) *(.sbss.*) *(.bss*) *(.bss.*) *(COMMON) \
152 __bss_end = ABSOLUTE (.); } \
155 #define SECTIONS_END . = ALIGN(8); _end = .; PROVIDE (end = .);
157 #include <pkgconf/hal_frv.h>
158 #include CYGHWR_MEMORY_LAYOUT_LDI