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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [newlib-1.18.0/] [libgloss/] [rs6000/] [xilinx440.ld] - Blame information for rev 861

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

Line No. Rev Author Line
1 207 jeremybenn
/* Default linker script for PowerPC 440, for normal executables
2
 
3
Copyright (c) 2008, 2009 Xilinx, Inc.  All rights reserved.
4
 
5
Redistribution and use in source and binary forms, with or without
6
modification, are permitted provided that the following conditions are
7
met:
8
 
9
1.  Redistributions source code must retain the above copyright notice,
10
this list of conditions and the following disclaimer.
11
 
12
2.  Redistributions in binary form must reproduce the above copyright
13
notice, this list of conditions and the following disclaimer in the
14
documentation and/or other materials provided with the distribution.
15
 
16
3.  Neither the name of Xilinx nor the names of its contributors may be
17
used to endorse or promote products derived from this software without
18
specific prior written permission.
19
 
20
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
21
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
26
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
*/
32
 
33
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
34
              "elf32-powerpc")
35
OUTPUT_ARCH(powerpc:common)
36
ENTRY(_boot)
37
_START_ADDR = DEFINED(_START_ADDR) ? _START_ADDR : 0xFFFF0000;
38
_STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 4k;
39
_HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 4k;
40
STARTUP(boot.o)
41
/* Do we need any of these for elf?
42
   __DYNAMIC = 0;    */
43
PROVIDE (__stack = 0); PROVIDE (___stack = 0);
44
SECTIONS
45
{
46
 
47
  . = _START_ADDR;
48
 
49
  /* Read-only sections, merged into text segment: */
50
  .hash           : { *(.hash)          }
51
  .dynsym         : { *(.dynsym)                }
52
  .dynstr         : { *(.dynstr)                }
53
  .gnu.version   : { *(.gnu.version)      }
54
  .gnu.version_d   : { *(.gnu.version_d)  }
55
  .gnu.version_r   : { *(.gnu.version_r)  }
56
  .rela.text     :
57
    {
58
      *(.rela.text)
59
      *(.rela.text.*)
60
      *(.rela.gnu.linkonce.t*)
61
    }
62
  .rela.data     :
63
    {
64
      *(.rela.data)
65
      *(.rela.data.*)
66
      *(.rela.gnu.linkonce.d*)
67
    }
68
  .rela.rodata   :
69
    {
70
      *(.rela.rodata)
71
      *(.rela.rodata.*)
72
      *(.rela.gnu.linkonce.r*)
73
    }
74
  .rela.got       : { *(.rela.got)      }
75
  .rela.got1      : { *(.rela.got1)     }
76
  .rela.got2      : { *(.rela.got2)     }
77
  .rela.ctors     : { *(.rela.ctors)    }
78
  .rela.dtors     : { *(.rela.dtors)    }
79
  .rela.init      : { *(.rela.init)     }
80
  .rela.fini      : { *(.rela.fini)     }
81
  .rela.bss       : { *(.rela.bss)      }
82
  .rela.plt       : { *(.rela.plt)      }
83
  .rela.sdata     : { *(.rela.sdata)    }
84
  .rela.sbss      : { *(.rela.sbss)     }
85
  .rela.sdata2    : { *(.rela.sdata2)   }
86
  .rela.sbss2     : { *(.rela.sbss2)    }
87
  .text      :
88
  {
89
    *(.text)
90
    *(.text.*)
91
    *(.vectors)
92
    /* .gnu.warning sections are handled specially by elf32.em.  */
93
    *(.gnu.warning)
94
    *(.gnu.linkonce.t.*)
95
  } =0
96
  .init           : { KEEP (*(.init))   } =0
97
  .fini           : { KEEP (*(.fini))   } =0
98
  .rodata    :
99
  {
100
    *(.rodata)
101
    *(.rodata.*)
102
    *(.gnu.linkonce.r.*)
103
  }
104
  .rodata1        : { *(.rodata1) }
105
  _etext = .;
106
  PROVIDE (etext = .);
107
  PROVIDE (__etext = .);
108
  .sdata2   : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*)}
109
  __SDATA2_START__ = ADDR(.sdata2);
110
  __SDATA2_END__ = ADDR(.sdata2) + SIZEOF(.sdata2);
111
  .sbss2   : { *(.sbss2) *(.gnu.linkonce.sb2.*)}
112
  __SBSS2_START__ = ADDR(.sbss2);
113
  __SBSS2_END__ = ADDR(.sbss2) + SIZEOF(.sbss2);
114
  /* Adjust the address for the data segment.  We want to adjust up to
115
     the same address within the page on the next page up.  It would
116
     be more correct to do this:
117
       . = ALIGN(0x08) + (ALIGN(8) & (0x08 - 1));
118
     The current expression does not correctly handle the case of a
119
     text segment ending precisely at the end of a page; it causes the
120
     data segment to skip a page.  The above expression does not have
121
     this problem, but it will currently (2/95) cause BFD to allocate
122
     a single segment, combining both text and data, for this case.
123
     This will prevent the text segment from being shared among
124
     multiple executions of the program; I think that is more
125
     important than losing a page of the virtual address space (note
126
     that no actual memory is lost; the page which is skipped can not
127
     be referenced).  */
128
/*  . =  ALIGN(8) + 0x08;*/
129
  .data    :
130
  {
131
    *(.data)
132
    *(.data.*)
133
    *(.gnu.linkonce.d*)
134
    CONSTRUCTORS
135
  }
136
  .data1   : { *(.data1) }
137
  .got1           : { *(.got1) }
138
  .dynamic        : { *(.dynamic) }
139
  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
140
     get relocated with -mrelocatable. Also put in the .fixup pointers.
141
     The current compiler no longer needs this, but keep it around for 2.7.2  */
142
                PROVIDE (_GOT2_START_ = .);
143
                PROVIDE (__GOT2_START_ = .);
144
  .got2           :  { *(.got2) }
145
                PROVIDE (__CTOR_LIST__ = .);
146
                PROVIDE (___CTOR_LIST__ = .);
147
                .ctors   :
148
  {
149
    /* gcc uses crtbegin.o to find the start of
150
       the constructors, so we make sure it is
151
       first.  Because this is a wildcard, it
152
       doesn't matter if the user does not
153
       actually link against crtbegin.o; the
154
       linker won't look for a file to match a
155
       wildcard.  The wildcard also means that it
156
       doesn't matter which directory crtbegin.o
157
       is in.  */
158
    KEEP (*crtbegin.o(.ctors))
159
    /* We don't want to include the .ctor section from
160
       from the crtend.o file until after the sorted ctors.
161
       The .ctor section from the crtend file contains the
162
       end of ctors marker and it must be last */
163
    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
164
    KEEP (*(SORT(.ctors.*)))
165
    KEEP (*(.ctors))
166
  }
167
                PROVIDE (__CTOR_END__ = .);
168
                PROVIDE (___CTOR_END__ = .);
169
                PROVIDE (__DTOR_LIST__ = .);
170
                PROVIDE (___DTOR_LIST__ = .);
171
                 .dtors         :
172
  {
173
    KEEP (*crtbegin.o(.dtors))
174
    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
175
    KEEP (*(SORT(.dtors.*)))
176
    KEEP (*(.dtors))
177
  }
178
                PROVIDE (__DTOR_END__ = .);
179
                PROVIDE (___DTOR_END__ = .);
180
                PROVIDE (_FIXUP_START_ = .);
181
                PROVIDE (__FIXUP_START_ = .);
182
  .fixup          : { *(.fixup) }
183
                PROVIDE (_FIXUP_END_ = .);
184
                PROVIDE (__FIXUP_END_ = .);
185
                PROVIDE (_GOT2_END_ = .);
186
                PROVIDE (__GOT2_END_ = .);
187
                PROVIDE (_GOT_START_ = .);
188
                PROVIDE (__GOT_START_ = .);
189
  .got            : { *(.got) }
190
  .got.plt        : { *(.got.plt) }
191
                PROVIDE (_GOT_END_ = .);
192
                PROVIDE (__GOT_END_ = .);
193
  /* Added by Sathya to handle C++ exceptions */
194
  .eh_frame   : {
195
    *(.eh_frame)
196
  }
197
  .jcr   : {
198
    *(.jcr)
199
  }
200
  .gcc_except_table   : {
201
    *(.gcc_except_table)
202
  }
203
  /* We want the small data sections together, so single-instruction offsets
204
     can access them all, and initialized data all before uninitialized, so
205
     we can shorten the on-disk segment size.  */
206
  .sdata          : { *(.sdata) *(.sdata.*) *(.gnu.linkonce.s.*)}
207
  __SDATA_START__ = ADDR(.sdata);
208
  __SDATA_END__ = ADDR(.sdata) + SIZEOF(.sdata);
209
  _edata  =  .;
210
  PROVIDE (edata = .);
211
  PROVIDE (__edata = .);
212
  .sbss      :
213
  {
214
    __sbss_start = .;
215
    ___sbss_start = .;
216
    *(.sbss)
217
    *(.sbss.*)
218
    *(.gnu.linkonce.sb.*)
219
    *(.scommon)
220
    *(.dynsbss)
221
    __sbss_end = .;
222
    ___sbss_end = .;
223
  }
224
  .plt   : { *(.plt) }
225
  .bss       :
226
  {
227
   __bss_start = .;
228
   ___bss_start = .;
229
   *(.dynbss)
230
   *(.bss)
231
   *(.bss.*)
232
   *(.gnu.linkonce.b.*)
233
   *(COMMON)
234
   . = ALIGN(4);
235
   __bss_end = .;
236
  }
237
 
238
  .stack     :
239
  {
240
    _stack_end = .;
241
    . = . + _STACK_SIZE;
242
    . = ALIGN(16);
243
    __stack = .;
244
  }
245
 
246
  .heap      :
247
  {
248
    _heap_start = .;
249
    . = . + _HEAP_SIZE;
250
    . = ALIGN(16);
251
    _heap_end = .;
252
  }
253
 
254
  .tdata   : {
255
    *(.tdata)
256
    *(.tdata.*)
257
    *(.gnu.linkonce.td.*)
258
  }
259
  .tbss   : {
260
    *(.tbss)
261
    *(.gnu.linkonce.tb.*)
262
  }
263
 
264
  _end = . ;
265
  end = .;
266
  __end = .;
267
 
268
  .boot0 0xFFFFFF00  : { *(.boot0)}
269
 
270
  .boot  0xFFFFFFFC  : { *(.boot) }
271
 
272
  /* These are needed for ELF backends which have not yet been
273
     converted to the new style linker.  */
274
  .stab 0 : { *(.stab) }
275
  .stabstr 0 : { *(.stabstr) }
276
  /* DWARF debug sections.
277
     Symbols in the DWARF debugging sections are relative to the beginning
278
     of the section so we begin them at 0.  */
279
  /* DWARF 1 */
280
  .debug          0 : { *(.debug) }
281
  .line           0 : { *(.line) }
282
  /* GNU DWARF 1 extensions */
283
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
284
  .debug_sfnames  0 : { *(.debug_sfnames) }
285
  /* DWARF 1.1 and DWARF 2 */
286
  .debug_aranges  0 : { *(.debug_aranges) }
287
  .debug_pubnames 0 : { *(.debug_pubnames) }
288
  /* DWARF 2 */
289
  .debug_info     0 : { *(.debug_info) }
290
  .debug_abbrev   0 : { *(.debug_abbrev) }
291
  .debug_line     0 : { *(.debug_line) }
292
  .debug_frame    0 : { *(.debug_frame) }
293
  .debug_str      0 : { *(.debug_str) }
294
  .debug_loc      0 : { *(.debug_loc) }
295
  .debug_macinfo  0 : { *(.debug_macinfo) }
296
  /* SGI/MIPS DWARF 2 extensions */
297
  .debug_weaknames 0 : { *(.debug_weaknames) }
298
  .debug_funcnames 0 : { *(.debug_funcnames) }
299
  .debug_typenames 0 : { *(.debug_typenames) }
300
  .debug_varnames  0 : { *(.debug_varnames) }
301
  /* These must appear regardless of  .  */
302
}

powered by: WebSVN 2.1.0

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