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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [h8300/] [h8300h/] [current/] [src/] [h8300_h8300h.ld] - Blame information for rev 838

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
//===========================================================================
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 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
#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
#if defined(CYGHWR_HAL_H8300_VECTOR_ADDRESS)
98
#define SECTION_int_hook_table(_region_, _vma_, _lma_) \
99
    .int_hook_table CYGHWR_HAL_H8300_VECTOR_ADDRESS : _lma_ \
100
    { CYG_LABEL_DEFN(__int_hook_start) = ABSOLUTE (.); \
101
      FORCE_OUTPUT; *(.int_hook_table) } \
102
    > _region_ \
103
    CYG_LABEL_DEFN(__rom_int_hook_table) = LOADADDR(.int_hook_table); \
104
    CYG_LABEL_DEFN(__int_hook_end) = .;
105
#else
106
#define SECTION_int_hook_table(_region_, _vma_, _lma_) \
107
    .int_hook_table _vma_ : _lma_ \
108
    { CYG_LABEL_DEFN(__int_hook_start) = ABSOLUTE (.); \
109
      FORCE_OUTPUT; *(.int_hook_table) } \
110
    > _region_
111
#endif
112
 
113
#define SECTION_data(_region_, _vma_, _lma_) \
114
    .data _vma_ : _lma_ \
115
    { CYG_LABEL_DEFN(__ram_data_start) = ABSOLUTE (.); *(.data*) *(.data1) \
116
    . = ALIGN(4); \
117
    KEEP(*( SORT (.ecos.table.*))) ; \
118
    . = ALIGN(4); \
119
    CYG_LABEL_DEFN(_GOT1_START_) = ABSOLUTE (.); *(.got1) CYG_LABEL_DEFN(_GOT1_END_) = ABSOLUTE (.); \
120
    CYG_LABEL_DEFN(_GOT2_START_) = ABSOLUTE (.); *(.got2) CYG_LABEL_DEFN(_GOT2_END_) = ABSOLUTE (.); \
121
    . = ALIGN (4); \
122
    CYG_LABEL_DEFN(__CTOR_LIST__) = ABSOLUTE (.); KEEP (*(SORT (.ctors*))) CYG_LABEL_DEFN(__CTOR_END__) = ABSOLUTE (.); \
123
    CYG_LABEL_DEFN(__DTOR_LIST__) = ABSOLUTE (.); KEEP (*(SORT (.dtors*))) CYG_LABEL_DEFN(__DTOR_END__) = ABSOLUTE (.); \
124
    CYG_LABEL_DEFN(_GOT_START) = ABSOLUTE (.); CYG_LABEL_DEFN(_GLOBAL_OFFSET_TABLE_) = ABSOLUTE (.) + 32768; CYG_LABEL_DEFN(_SDA_BASE_) = ABSOLUTE (.); \
125
    *(.got.plt) *(.got) CYG_LABEL_DEFN(_GOT_END_) = ABSOLUTE (.); \
126
    *(.eh_frame) \
127
    *(.dynamic) *(.sdata*) *(.sbss*) } \
128
    > _region_ \
129
    CYG_LABEL_DEFN(__rom_data_start) = LOADADDR (.data); \
130
    CYG_LABEL_DEFN(__ram_data_end) = .; PROVIDE (CYG_LABEL_DEFN(__ram_data_end) = .); CYG_LABEL_DEFN(_edata) = .; PROVIDE (edata = .);
131
 
132
#define SECTION_bss(_region_, _vma_, _lma_) \
133
    .bss _vma_ : _lma_ \
134
    { CYG_LABEL_DEFN(__bss_start) = ABSOLUTE (.); \
135
    *(.scommon) *(.dynbss) *(.bss.*) *(COMMON) \
136
    CYG_LABEL_DEFN(__bss_end) = ABSOLUTE (.); } \
137
    > _region_
138
 
139
#define SECTION_2ram(_region_, _vma_, _lma_) \
140
    .2ram _vma_ : _lma_ \
141
    { CYG_LABEL_DEFN(__iram_start) = ABSOLUTE (.); \
142
    *( .2ram.*); \
143
    . = ALIGN(4); \
144
    CYG_LABEL_DEFN(__iram_end) = ABSOLUTE (.); } \
145
    > _region_ \
146
    CYG_LABEL_DEFN(__rom_iram_start) = LOADADDR (.2ram);
147
 
148
#define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .);
149
 
150
#include CYGHWR_MEMORY_LAYOUT_LDI
151
#include CYGBLD_HAL_PLATFORM_H
152
 
153
CYG_LABEL_DEFN(hal_virtual_vector_table) = CYGHWR_HAL_VECTOR_TABLE;

powered by: WebSVN 2.1.0

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