1 //=============================================================================
3 // MLT linker script for NEC
4 // adapted from packages/hal/arm/pid/v1_1/src/pid.ld
6 //=============================================================================
7 //####ECOSGPLCOPYRIGHTBEGIN####
8 // -------------------------------------------
9 // This file is part of eCos, the Embedded Configurable Operating System.
10 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
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 version.
16 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
17 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 // You should have received a copy of the GNU General Public License along
22 // with eCos; if not, write to the Free Software Foundation, Inc.,
23 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25 // As a special exception, if other files instantiate templates or use macros
26 // or inline functions from this file, or you compile this file and link it
27 // with other works to produce a work based on this file, this file does not
28 // by itself cause the resulting work to be covered by the GNU General Public
29 // License. However the source code for this file must still be made available
30 // in accordance with section (3) of the GNU General Public License.
32 // This exception does not invalidate any other reasons why a work based on
33 // this file might be covered by the GNU General Public License.
35 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
36 // at http://sources.redhat.com/ecos/ecos-license/
37 // -------------------------------------------
38 //####ECOSGPLCOPYRIGHTEND####
39 //=============================================================================
41 #include <pkgconf/system.h>
44 // Enter at reset_vector in non-RAM startups so they are more representative
45 // of actual execution when loaded over ICE
46 #ifdef CYG_HAL_STARTUP_RAM
55 GROUP(libtarget.a libgcc.a libsupc++.a)
57 GROUP(libtarget.a libgcc.a)
61 #define FOLLOWING(_section_) AT ((LOADADDR (_section_) + SIZEOF (_section_) + ALIGN_LMA - 1) & ~ (ALIGN_LMA - 1))
63 #define FORCE_OUTPUT . = .
65 #define SECTIONS_BEGIN \
66 /* Debug information */ \
67 .debug_aranges 0 : { *(.debug_aranges) } \
68 .debug_pubnames 0 : { *(.debug_pubnames) } \
69 .debug_info 0 : { *(.debug_info) } \
70 .debug_abbrev 0 : { *(.debug_abbrev) } \
71 .debug_line 0 : { *(.debug_line) } \
72 .debug_frame 0 : { *(.debug_frame) } \
73 .debug_str 0 : { *(.debug_str) } \
74 .debug_loc 0 : { *(.debug_loc) } \
75 .debug_macinfo 0 : { *(.debug_macinfo) }
77 #define SECTION_rom_vectors(_region_, _vma_, _lma_) \
78 .rom_vectors _vma_ : _lma_ \
79 { FORCE_OUTPUT; KEEP (*(.vectors)) } \
82 #define SECTION_ram_vectors(_region_, _vma_, _lma_) \
83 .ram_vectors _vma_ : _lma_ \
84 { ___ram_vectors_start = ABSOLUTE(.); \
85 FORCE_OUTPUT; KEEP (*(.ram_vectors)) \
86 ___ram_vectors_end = ABSOLUTE(.); \
88 ___ram_vectors_loadaddr = LOADADDR(.ram_vectors);
90 #define SECTION_text(_region_, _vma_, _lma_) \
92 { stext = ABSOLUTE(.); \
93 PROVIDE (__stext = ABSOLUTE(.)); \
94 *(.text*) *(.gnu.warning) *(.gnu.linkonce*) *(.init) \
95 *(.glue_7) *(.glue_7t) \
97 etext = .; PROVIDE (__etext = .);
99 #define SECTION_fini(_region_, _vma_, _lma_) \
100 .fini _vma_ : _lma_ \
101 { FORCE_OUTPUT; *(.fini) } \
104 #define SECTION_rodata(_region_, _vma_, _lma_) \
105 .rodata _vma_ : _lma_ \
106 { FORCE_OUTPUT; *(.rodata*) } \
109 #define SECTION_rodata1(_region_, _vma_, _lma_) \
110 .rodata1 _vma_ : _lma_ \
111 { FORCE_OUTPUT; *(.rodata1) } \
114 #define SECTION_fixup(_region_, _vma_, _lma_) \
115 .fixup _vma_ : _lma_ \
116 { FORCE_OUTPUT; *(.fixup) } \
119 #define SECTION_gcc_except_table(_region_, _vma_, _lma_) \
120 .gcc_except_table _vma_ : _lma_ \
121 { FORCE_OUTPUT; *(.gcc_except_table) } \
124 #define SECTION_data(_region_, _vma_, _lma_) \
125 .data _vma_ : _lma_ \
126 { ___ram_data_start = ABSOLUTE (.); *(.data*) *(.data1); \
127 _GOT1_START_ = ABSOLUTE (.); *(.got1) _GOT1_END_ = ABSOLUTE (.); \
128 _GOT2_START_ = ABSOLUTE (.); *(.got2) _GOT2_END_ = ABSOLUTE (.); \
130 KEEP(*( SORT (.ecos.table.*))) ; \
131 ___CTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.ctors*))) ___CTOR_END__ = ABSOLUTE (.); \
132 ___DTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.dtors*))) ___DTOR_END__ = ABSOLUTE (.); \
134 *(.dynamic) *(.sdata*) *(.sbss*) } \
136 ___rom_data_start = LOADADDR (.data); \
137 ___ram_data_end = .; PROVIDE (___ram_data_end = .); _edata = .; PROVIDE (edata = .); \
138 PROVIDE (___rom_data_end = LOADADDR (.data) + SIZEOF(.data));
140 #define SECTION_bss(_region_, _vma_, _lma_) \
142 { ___bss_start = ABSOLUTE (.); \
143 *(.scommon) *(.dynbss) *(.bss*) *(COMMON) \
144 ___bss_end = ABSOLUTE (.); } \
147 #include <cyg/hal/plf_sections.h>
149 #include <pkgconf/hal_v85x.h>
150 #include <pkgconf/hal_v85x_v850.h>
151 #include CYGHWR_MEMORY_LAYOUT_LDI