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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [i386/] [arch/] [current/] [src/] [i386.ld] - Blame information for rev 791

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

Line No. Rev Author Line
1 786 skrzyp
//==========================================================================
2
//
3
//      i386.ld
4
//
5
//      Linker script for i386
6
//
7
//==========================================================================
8
// ####ECOSGPLCOPYRIGHTBEGIN####
9
// -------------------------------------------
10
// This file is part of eCos, the Embedded Configurable Operating System.
11
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
12
//
13
// eCos is free software; you can redistribute it and/or modify it under
14
// the terms of the GNU General Public License as published by the Free
15
// Software Foundation; either version 2 or (at your option) any later
16
// version.
17
//
18
// eCos is distributed in the hope that it will be useful, but WITHOUT
19
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
21
// for more details.
22
//
23
// You should have received a copy of the GNU General Public License
24
// along with eCos; if not, write to the Free Software Foundation, Inc.,
25
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
26
//
27
// As a special exception, if other files instantiate templates or use
28
// macros or inline functions from this file, or you compile this file
29
// and link it with other works to produce a work based on this file,
30
// this file does not by itself cause the resulting work to be covered by
31
// the GNU General Public License. However the source code for this file
32
// must still be made available in accordance with section (3) of the GNU
33
// General Public License v2.
34
//
35
// This exception does not invalidate any other reasons why a work based
36
// on this file might be covered by the GNU General Public License.
37
// -------------------------------------------
38
// ####ECOSGPLCOPYRIGHTEND####
39
//==========================================================================
40
//#####DESCRIPTIONBEGIN####
41
//
42
// Author(s):   jskov
43
// Contributors:jskov
44
// Date:        1999-01-18
45
// Purpose:     i386 Linker script
46
//
47
//####DESCRIPTIONEND####
48
//
49
//==========================================================================
50
STARTUP(vectors.o)
51
ENTRY(_start)
52
#ifdef EXTRAS
53
INPUT(extras.o)
54
#endif
55
#if (__GNUC__ >= 3)
56
GROUP(libtarget.a libgcc.a libsupc++.a)
57
#else
58
GROUP(libtarget.a libgcc.a)
59
#endif
60
 
61
#define ALIGN_LMA 8
62
#define FOLLOWING(_section_) AT ((LOADADDR (_section_) + SIZEOF (_section_) + ALIGN_LMA - 1) & ~ (ALIGN_LMA - 1))
63
#define LMA_EQ_VMA
64
#define FORCE_OUTPUT . = .
65
 
66
 
67
#define SECTIONS_BEGIN
68
 
69
#define SECTION_vectors(_region_, _vma_, _lma_)        \
70
  .vectors _vma_ : _lma_                                              \
71
  { FORCE_OUTPUT; KEEP(*(.vectors)) }         \
72
  > _region_
73
 
74
#define SECTION_text(_region_, _vma_, _lma_)           \
75
  .text _vma_ : _lma_                                                 \
76
  { _stext = .;                 \
77
    *(.text*) *(.gnu.warning) *(.gnu.linkonce*) *(.init) }      \
78
  > _region_                                                    \
79
  _etext = .;  PROVIDE (etext = .);
80
 
81
#define SECTION_fini(_region_, _vma_, _lma_)   \
82
    .fini _vma_ : _lma_                                       \
83
    { FORCE_OUTPUT; *(.fini) }        \
84
    > _region_
85
 
86
#define SECTION_rodata1(_region_, _vma_, _lma_)        \
87
    .rodata1 _vma_ : _lma_                                            \
88
    { FORCE_OUTPUT; *(.rodata1) }             \
89
    > _region_
90
 
91
#define SECTION_rodata(_region_, _vma_, _lma_)                 \
92
    .rodata _vma_ : _lma_                                                     \
93
    { FORCE_OUTPUT; *(.rodata*) } \
94
    > _region_
95
 
96
#define SECTION_fixup(_region_, _vma_, _lma_)                   \
97
    .fixup _vma_ : _lma_                                                       \
98
    { _FIXUP_START_ = ABSOLUTE(.); *(.fixup) _FIXUP_END_ = ABSOLUTE(.);} \
99
    > _region_
100
 
101
#define SECTION_gcc_except_table(_region_, _vma_, _lma_)       \
102
    .gcc_except_table _vma_ : _lma_                            \
103
    { _EXCEPT_START_ = ABSOLUTE(.);                            \
104
      KEEP(*(.gcc_except_table))                               \
105
      *(.gcc_except_table.*)                                   \
106
      _EXCEPT_END_ = ABSOLUTE(.);}                             \
107
    > _region_
108
 
109
// Note: The __ in the name is an encoding of the .
110
#define SECTION_rel__got(_region_, _vma_, _lma_)                                \
111
    .rel.text _vma_ : _lma_ { *(.rel.text*) *(.rel.gnu.linkonce*) } > _region_  \
112
    .rel.data _vma_ : _lma_ { *(.rel.data*) } > _region_                        \
113
    .rel.got _vma_ : _lma_                                                      \
114
    { *(.rel.got)      }                                                        \
115
    > _region_
116
 
117
#define SECTION_data(_region_, _vma_, _lma_)                       \
118
    .data _vma_ : _lma_                                                           \
119
    { __ram_data_start = ABSOLUTE(.); *(.data*)                               \
120
    _GOT1_START_ = ABSOLUTE(.); *(.got1) _GOT1_END_ = ABSOLUTE(.);          \
121
      /* Put .ctors and .dtors next to the .got2 section, so that */        \
122
      /* the pointers get relocated with -mrelocatable.           */        \
123
     . = ALIGN(8); __CTOR_LIST__ = ABSOLUTE(.);                             \
124
      KEEP(*(SORT(.ctors*))) __CTOR_END__ = ABSOLUTE(.);                    \
125
    __DTOR_LIST__ = ABSOLUTE(.);                                            \
126
      KEEP(*(SORT(.dtors*))) __DTOR_END__ = ABSOLUTE(.);                    \
127
    . = ALIGN(32);                                                           \
128
    KEEP(*( SORT (.ecos.table.*)));                                         \
129
    _GOT2_START_ = ABSOLUTE(.); *(.got2) _GOT2_END_ = ABSOLUTE(.);          \
130
    _GOT_START_ = ABSOLUTE(.); _GLOBAL_OFFSET_TABLE_ = ABSOLUTE(. + 32768); \
131
    _SDA_BASE_ = ABSOLUTE(.); *(.got.plt) *(.got)                           \
132
    _GOT_END_ = ABSOLUTE(.);  *(.dynamic) *(.eh_frame)                      \
133
      /* We want the small data sections together, so single-instruction */ \
134
      /* offsets can access them all, and initialized data all before    */ \
135
      /* uninitialized, so we can shorten the on-disk segment size.      */ \
136
    _SDATA_START_ = ABSOLUTE(.); *(.sdata*)                                 \
137
    . = ALIGN (4); *(.2ram.*) }                                             \
138
    > _region_                                                              \
139
    __rom_data_start = LOADADDR(.data);                                     \
140
    __ram_data_end = .; PROVIDE(__ram_data_end = .);                        \
141
    _edata = .; PROVIDE (edata = .);
142
 
143
#define SECTION_sbss(_region_, _vma_, _lma_)                   \
144
    .sbss _vma_ : _lma_                                                       \
145
    { __bss_start = ABSOLUTE (.);       \
146
    _SBSS_START_ = ABSOLUTE(.); *(.sbss*) _SBSS_END_ = ABSOLUTE(.);      \
147
    *(.scommon*) }                                                       \
148
    > _region_
149
 
150
#define SECTION_bss(_region_, _vma_, _lma_)                      \
151
    .bss _vma_ : _lma_                                                          \
152
    { FORCE_OUTPUT; *(.dynbss*) *(.bss*) *(COMMON) }      \
153
    > _region_  \
154
    __bss_end = .;
155
 
156
#define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .);
157
 
158
#include 
159
#include CYGHWR_MEMORY_LAYOUT_LDI
160
 
161
// Standard tables at base of memory
162
 
163
idtStart                 = 0x00001000;
164
hal_vsr_table            = 0x00001800;
165
hal_virtual_vector_table = 0x00001c00;
166
cyg_hal_smp_cpu_sync      = 0x00002800;
167
cyg_hal_smp_cpu_sync_flag = 0x00002900;
168
cyg_hal_smp_cpu_entry     = 0x00002a00;
169
cyg_hal_smp_cpu_running   = 0x00002b00;
170
cyg_hal_smp_vsr_sync_flag = 0x00002c00;
171
 
172
 
173
 

powered by: WebSVN 2.1.0

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