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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [ecos-2.0/] [packages/] [hal/] [powerpc/] [arch/] [v2_0/] [src/] [powerpc.ld] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1254 phoenix
//==========================================================================
2
//
3
//      powerpc.ld
4
//
5
//      Linker script for PowerPC
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 Red Hat, 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 version.
16
//
17
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
19
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
20
// for more details.
21
//
22
// You should have received a copy of the GNU General Public License along
23
// with eCos; if not, write to the Free Software Foundation, Inc.,
24
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25
//
26
// As a special exception, if other files instantiate templates or use macros
27
// or inline functions from this file, or you compile this file and link it
28
// with other works to produce a work based on this file, this file does not
29
// by itself cause the resulting work to be covered by the GNU General Public
30
// License. However the source code for this file must still be made available
31
// in accordance with section (3) of the GNU General Public License.
32
//
33
// This exception does not invalidate any other reasons why a work based on
34
// this file might be covered by the GNU General Public License.
35
//
36
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37
// at http://sources.redhat.com/ecos/ecos-license/
38
// -------------------------------------------
39
//####ECOSGPLCOPYRIGHTEND####
40
//==========================================================================
41
//#####DESCRIPTIONBEGIN####
42
//
43
// Author(s):   jskov
44
// Contributors:jskov
45
// Date:        1999-01-18
46
// Purpose:     PowerPC Linker script
47
//
48
//####DESCRIPTIONEND####
49
//
50
//==========================================================================
51
STARTUP(vectors.o)
52
ENTRY(__exception_reset)
53
#ifdef EXTRAS
54
INPUT(extras.o)
55
#endif
56
#if (__GNUC__ >= 3)
57
GROUP(libtarget.a libgcc.a libsupc++.a)
58
#else
59
GROUP(libtarget.a libgcc.a)
60
#endif
61
 
62
#define ALIGN_LMA 8
63
#define FOLLOWING(_section_) AT ((LOADADDR (_section_) + SIZEOF (_section_) + ALIGN_LMA - 1) & ~ (ALIGN_LMA - 1))
64
#define LMA_EQ_VMA
65
#define FORCE_OUTPUT . = .
66
 
67
 
68
#define SECTIONS_BEGIN
69
 
70
#define SECTION_vectors(_region_, _vma_, _lma_)        \
71
  .vectors _vma_ : _lma_                                              \
72
  { FORCE_OUTPUT; KEEP(*(.vectors)) }         \
73
  > _region_
74
 
75
#define SECTION_text(_region_, _vma_, _lma_)           \
76
  .text _vma_ : _lma_                                                 \
77
  { _stext = .;       \
78
    *(.text*) *(.gnu.warning) *(.gnu.linkonce*) *(.init) }      \
79
  > _region_                                                    \
80
  _etext = .;  PROVIDE (etext = .);
81
 
82
#define SECTION_fini(_region_, _vma_, _lma_)   \
83
    .fini _vma_ : _lma_                                       \
84
    { FORCE_OUTPUT; *(.fini) }        \
85
    > _region_
86
 
87
#define SECTION_rodata1(_region_, _vma_, _lma_)        \
88
    .rodata1 _vma_ : _lma_                                            \
89
    { FORCE_OUTPUT; *(.rodata1*) }             \
90
    > _region_
91
 
92
#define SECTION_rodata(_region_, _vma_, _lma_) \
93
    .rodata _vma_ : _lma_                                     \
94
    { FORCE_OUTPUT; *(.rodata*) }     \
95
    > _region_
96
 
97
#define SECTION_fixup(_region_, _vma_, _lma_)                      \
98
    .fixup _vma_ : _lma_                                                          \
99
    { __FIXUP_START__ = ABSOLUTE(.); *(.fixup) __FIXUP_END__ = ABSOLUTE(.);}\
100
    > _region_
101
 
102
#define SECTION_gcc_except_table(_region_, _vma_, _lma_)       \
103
    .gcc_except_table _vma_ : _lma_                                           \
104
    { __EXCEPT_START__ = ABSOLUTE(.); *(.gcc_except_table)              \
105
      __EXCEPT_END__ = ABSOLUTE(.);}                                    \
106
    > _region_
107
 
108
#define SECTION_data(_region_, _vma_, _lma_)                         \
109
    .data _vma_ : _lma_                                                             \
110
    { __ram_data_start = ABSOLUTE(.); *(.data*)                                 \
111
    __GOT1_START__ = ABSOLUTE(.); *(.got1) __GOT1_END__ = ABSOLUTE(.);        \
112
      /* Put .ctors and .dtors next to the .got2 section, so that */          \
113
      /* the pointers get relocated with -mrelocatable.           */          \
114
     . = ALIGN(8); __CTOR_LIST__ = ABSOLUTE(.);                               \
115
      KEEP(*(SORT(.ctors*))) __CTOR_END__ = ABSOLUTE(.);                      \
116
    __DTOR_LIST__ = ABSOLUTE(.);                                              \
117
      KEEP(*(SORT(.dtors*))) __DTOR_END__ = ABSOLUTE(.);                      \
118
      . = ALIGN(8);                                                           \
119
      KEEP(*( SORT (.ecos.table.*))) ;                                        \
120
      . = ALIGN(4);                                                           \
121
      *( .2ram.*) ;                                                           \
122
    __GOT2_START__ = ABSOLUTE(.); *(.got2) __GOT2_END__ = ABSOLUTE(.);        \
123
    __GOT_START = ABSOLUTE(.); _GLOBAL_OFFSET_TABLE_ = ABSOLUTE(. + 32768);   \
124
    _SDA_BASE_ = ABSOLUTE(.); *(.got.plt) *(.got)                             \
125
    __GOT_END__ = ABSOLUTE(.);  *(.dynamic)                                   \
126
    *(.eh_frame)                                                              \
127
      /* We want the small data sections together, so single-instruction */   \
128
      /* offsets can access them all, and initialized data all before    */   \
129
      /* uninitialized, so we can shorten the on-disk segment size.      */   \
130
    __SDATA_START__ = ABSOLUTE(.); *(.sdata) *(.sdata.*)                      \
131
    __SDATA2_START__ = ABSOLUTE(.); *(.sdata2*) }                             \
132
    > _region_                                                                \
133
    __rom_data_start = LOADADDR(.data);                                       \
134
    __ram_data_end = .; PROVIDE(__ram_data_end = .);                          \
135
    _edata = .; PROVIDE (edata = .);
136
 
137
#define SECTION_sbss(_region_, _vma_, _lma_)                     \
138
    .sbss _vma_ : _lma_                                                         \
139
    { __sbss_start = ABSOLUTE (.);                                        \
140
    __SBSS_START__ = ABSOLUTE(.); *(.sbss.*) __SBSS_END__ = ABSOLUTE(.);   \
141
    __SBSSx_START__ = ABSOLUTE(.); *(.sbss*) __SBSSx_END__ = ABSOLUTE(.);\
142
    *(.scommon*)                                                          \
143
    __sbss_end = ABSOLUTE (.); }                                          \
144
    > _region_
145
 
146
#define SECTION_bss(_region_, _vma_, _lma_)                      \
147
    .bss _vma_ : _lma_                                                          \
148
    { __bss_start = ABSOLUTE (.);                       \
149
      FORCE_OUTPUT; *(.dynbss*) *(.bss*) *(COMMON)      \
150
      __bss_end = ABSOLUTE (.); }                       \
151
    > _region_
152
 
153
#define SECTIONS_END . = ALIGN(4); _end = .; PROVIDE (end = .);
154
 
155
#include 
156
#include CYGHWR_MEMORY_LAYOUT_LDI
157
 
158
// Define VSR and virtual tables to reside at fixed addresses.
159
#include CYGBLD_HAL_TARGET_H
160
hal_vsr_table = CYGHWR_HAL_VSR_TABLE;
161
hal_virtual_vector_table = CYGHWR_HAL_VIRTUAL_VECTOR_TABLE;

powered by: WebSVN 2.1.0

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