source: rtems/c/src/lib/libbsp/powerpc/psim/startup/linkcmds @ 0c875c6a

4.115
Last change on this file since 0c875c6a was 0c875c6a, checked in by Joel Sherrill <joel.sherrill@…>, on 01/28/11 at 20:29:53

2011-01-28 Joel Sherrill <joel.sherrilL@…>

  • beatnik/include/bsp.h, beatnik/irq/irq.h, beatnik/pci/gt_pci_init.c, ep1a/console/polled_io.c, ep1a/irq/openpic_xxx_irq.c, gen5200/include/irq.h, gen5200/irq/irq.c, gen5200/startup/bspstart.c, haleakala/irq/irq.c, mbx8xx/irq/irq.c, mbx8xx/irq/irq.h, motorola_powerpc/include/bsp.h, mpc8260ads/irq/irq.c, mpc8260ads/irq/irq.h, mvme3100/include/bsp.h, mvme3100/irq/irq.h, mvme3100/start/start.S, mvme5500/include/bsp.h, mvme5500/irq/irq.h, psim/include/bsp.h, psim/include/coverhd.h, psim/irq/irq.h, psim/shmsupp/addrconv.c, psim/shmsupp/getcfg.c, psim/startup/linkcmds, psim/tools/psim-gdb-top.in, psim/tools/psim-top.in, psim/tools/runtest-top.in, qemuppc/irq/irq.h, score603e/irq/irq.c, shared/bootloader/bootldr.h, shared/bootloader/em86.c, shared/bootloader/em86real.S, shared/bootloader/exception.S, shared/bootloader/head.S, shared/bootloader/lib.c, shared/bootloader/misc.c, shared/bootloader/mm.c, shared/bootloader/pci.c, shared/console/console.c, shared/console/consoleIo.h, shared/console/inch.c, shared/console/keyboard.h, shared/console/polled_io.c, shared/irq/i8259.c, shared/irq/irq.h, shared/irq/openpic_i8259_irq.c, shared/motorola/motorola.c, shared/motorola/motorola.h, shared/openpic/openpic.c, shared/openpic/openpic.h, shared/pci/pci.c, shared/residual/residual.c, shared/start/start.S, ss555/irq/irq.h: Fix typo where license said found in found in.
  • Property mode set to 100644
File size: 8.3 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2008.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
13OUTPUT_ARCH(powerpc)
14ENTRY(_start)
15/* Do we need any of these for elf?
16   __DYNAMIC = 0;    */
17PROVIDE (PSIM_INSTRUCTIONS_PER_MICROSECOND = 10000);
18
19RamBase = DEFINED(RamBase) ? RamBase : 0x0;
20/*
21 * make sure device tree (property /openprom/options/oea-memory-size)
22 * provides at least 'RamSize'.
23 * Also, the BATs must at map at least 'RamSize' (currently, they
24 * map 32M -- see startup/bspstart.c).
25 * Furthermore, the RAM region must be large enough (there is no
26 * disadvantage in making that one very large as long as it doesn't
27 * overlap another memory area).
28 *
29 */
30RamSize = DEFINED(RamSize) ? RamSize : 16M;
31
32MEMORY
33  {
34        RAM       : ORIGIN = 0, LENGTH = 32M
35        PSIM_REGS : ORIGIN = 0x0c000000, LENGTH = 16M
36        VECTORS   : ORIGIN = 0xFFF00000, LENGTH = 0x20000
37  }
38
39SECTIONS
40{
41  .entry_point_section :
42  {
43        *(.entry_point_section)
44  } > VECTORS
45
46  /*
47   * BSP: PSIM Register Block
48   */
49  .psim_regs (NOLOAD) : {
50    psim_reg*(.text)
51    psim_reg*(.data)
52    psim_reg*(.bss)
53    psim_reg*(COMMON)
54  } > PSIM_REGS
55
56  /* Read-only sections, merged into text segment: */
57  /* . = 0x40000 + SIZEOF_HEADERS; */
58  . = 0x4000;
59  .interp         : { *(.interp) }
60  .hash           : { *(.hash) }
61  .dynsym         : { *(.dynsym) }
62  .dynstr         : { *(.dynstr) }
63  .gnu.version    : { *(.gnu.version) }
64  .gnu.version_d  : { *(.gnu.version_d) }
65  .gnu.version_r  : { *(.gnu.version_r) }
66  .text      :
67  {
68    *(.text*)
69    *(.gnu.linkonce.t.*)
70    *(.descriptors)
71    *(.eh_frame_hdr*)
72    *(.eh_frame*)
73
74    /*
75     * Special FreeBSD sysctl sections.
76     */
77    . = ALIGN (16);
78    __start_set_sysctl_set = .;
79    *(set_sysctl_*);
80    __stop_set_sysctl_set = ABSOLUTE(.);
81    *(set_domain_*);
82    *(set_pseudo_*);
83
84    /* .gnu.warning sections are handled specially by elf32.em.  */
85    *(.gnu.warning)
86  } >RAM
87  .init           :
88  {
89    KEEP (*(.init))
90  } >RAM =0
91
92  .rel.dyn        :
93    {
94      *(.rel.init)
95      *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
96      *(.rel.fini)
97      *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
98      *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
99      *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
100      *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
101      *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
102      *(.rel.ctors)
103      *(.rel.dtors)
104      *(.rel.got)
105      *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
106      *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
107      *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
108      *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
109      *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
110    } >RAM
111  .rela.dyn       :
112    {
113      *(.rela.init)
114      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
115      *(.rela.fini)
116      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
117      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
118      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
119      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
120      *(.rela.ctors)
121      *(.rela.dtors)
122      *(.rela.got)
123      *(.rela.got1)
124      *(.rela.got2)
125      *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
126      *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
127      *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
128      *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
129      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
130    } >RAM
131  .rel.plt        : { *(.rel.plt) }
132  .rela.plt       : { *(.rela.plt) }
133
134  .fini           :
135  {
136    _fini = .;
137    KEEP (*(.fini))
138  } >RAM =0
139  .rodata         : { *(.rodata*) *(.gnu.linkonce.r*) } >RAM
140  .rodata1        : { *(.rodata1)       } >RAM
141  PROVIDE (__FRAME_BEGIN__ = .);
142  PROVIDE (__FRAME_END__ = .);
143  PROVIDE (_etext = .);
144  PROVIDE (etext = .);
145_SDA2_BASE_ = __SDATA2_START__ + 0x8000;
146  .sdata2         : { *(.sdata2) *(.gnu.linkonce.s2.*)  } >RAM
147  .sbss2          : { *(.sbss2) *(.gnu.linkonce.sb2.*)  } >RAM
148  PROVIDE (__SBSS2_END__ = .);
149  /* Adjust the address for the data segment.  We want to adjust up to
150     the same address within the page on the next page up.  It would
151     be more correct to do this:
152       . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1));
153     The current expression does not correctly handle the case of a
154     text segment ending precisely at the end of a page; it causes the
155     data segment to skip a page.  The above expression does not have
156     this problem, but it will currently (2/95) cause BFD to allocate
157     a single segment, combining both text and data, for this case.
158     This will prevent the text segment from being shared among
159     multiple executions of the program; I think that is more
160     important than losing a page of the virtual address space (note
161     that no actual memory is lost; the page which is skipped can not
162     be referenced).  */
163  /* . =  ALIGN(8) + 0x40000; */
164  .data    :
165  {
166    *(.data .data.* .gnu.linkonce.d.*)
167    SORT(CONSTRUCTORS)
168  } >RAM
169  PROVIDE (__EXCEPT_START__ = .);
170  .gcc_except_table   : { *(.gcc_except_table*) } >RAM
171  PROVIDE (__EXCEPT_END__ = .);
172
173  .data1          : { *(.data1)         } >RAM
174  .got1           : { *(.got1)          } >RAM
175  .dynamic        : { *(.dynamic)       } >RAM
176  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
177     get relocated with -mrelocatable. Also put in the .fixup pointers.
178     The current compiler no longer needs this, but keep it around for 2.7.2  */
179   PROVIDE (__GOT2_START__ = .);
180   PROVIDE (_GOT2_START_ = .);
181  .got2           :  { *(.got2)         } >RAM
182  PROVIDE (__GOT2_END__ = .);
183  PROVIDE (_GOT2_END_ = .);
184
185  PROVIDE (__CTOR_LIST__ = .);
186  .ctors          : { *(.ctors)         } >RAM
187  PROVIDE (__CTOR_END__ = .);
188
189  PROVIDE (__DTOR_LIST__ = .);
190  .dtors          : { *(.dtors)         } >RAM
191  PROVIDE (__DTOR_END__ = .);
192
193  PROVIDE (__FIXUP_START__ = .);
194  PROVIDE (_FIXUP_START_ = .);
195  .fixup          : { *(.fixup)         } >RAM
196  PROVIDE (_FIXUP_END_ = .);
197  PROVIDE (__FIXUP_END__ = .);
198
199  .jcr            : { KEEP (*(.jcr))    } > RAM
200
201  PROVIDE (__GOT_START__ = .);
202  PROVIDE (_GOT_START_ = .);
203  s.got = .;
204  .got            : { *(.got)           } >RAM
205  .got.plt        : { *(.got.plt)       } >RAM
206  PROVIDE (_GOT_END_ = .);
207  PROVIDE (__GOT_END__ = .);
208
209  /* We want the small data sections together, so single-instruction offsets
210     can access them all, and initialized data all before uninitialized, so
211     we can shorten the on-disk segment size.  */
212_SDA_BASE_ = __SDATA_START__ + 0x8000;
213  .sdata          : { *(.sdata*) *(.gnu.linkonce.s.*)   } >RAM
214  _edata  =  .;
215  PROVIDE (edata = .);
216
217  PROVIDE (RAM_END = 32M);
218  .sbss      :
219  {
220    PROVIDE (__sbss_start = .);
221    *(.dynsbss)
222    *(.sbss* .gnu.linkonce.sb.*)
223    PROVIDE (__sbss_end = .);
224  } >RAM
225  PROVIDE (__SBSS_END__ = .);
226
227  .bss       :
228  {
229   PROVIDE (__bss_start = .);
230   *(.dynbss)
231   *(.bss .bss* .gnu.linkonce.b*)
232   *(COMMON)
233  } >RAM
234  . = ALIGN(16);
235  . += 0x1000;
236  PROVIDE(__stack = .);
237  __rtems_end = . ;
238  . =  ALIGN(8) + 0x8000;
239  PROVIDE(_end = .);
240  PROVIDE(end = .);
241
242  /* These are needed for ELF backends which have not yet been
243     converted to the new style linker.  */
244  .stab 0 : { *(.stab) }
245  .stabstr 0 : { *(.stabstr) }
246  /* DWARF debug sections.
247     Symbols in the DWARF debugging sections are relative to the beginning
248     of the section so we begin them at 0.  */
249  /* DWARF 1 */
250  .debug          0 : { *(.debug) }
251  .line           0 : { *(.line) }
252  /* GNU DWARF 1 extensions */
253  .debug_srcinfo  0 : { *(.debug_srcinfo) }
254  .debug_sfnames  0 : { *(.debug_sfnames) }
255  /* DWARF 1.1 and DWARF 2 */
256  .debug_aranges  0 : { *(.debug_aranges) }
257  .debug_pubnames 0 : { *(.debug_pubnames) }
258  /* DWARF 2 */
259  .debug_info     0 : { *(.debug_info) }
260  .debug_abbrev   0 : { *(.debug_abbrev) }
261  .debug_line     0 : { *(.debug_line) }
262  .debug_frame    0 : { *(.debug_frame) }
263  .debug_str      0 : { *(.debug_str) }
264  .debug_loc      0 : { *(.debug_loc) }
265  .debug_macinfo  0 : { *(.debug_macinfo) }
266  /* SGI/MIPS DWARF 2 extensions */
267  .debug_weaknames 0 : { *(.debug_weaknames) }
268  .debug_funcnames 0 : { *(.debug_funcnames) }
269  .debug_typenames 0 : { *(.debug_typenames) }
270  .debug_varnames  0 : { *(.debug_varnames) }
271  /* These must appear regardless of  .  */
272}
Note: See TracBrowser for help on using the repository browser.