source: rtems/c/src/lib/libbsp/powerpc/psim/startup/linkcmds @ 001b4162

4.104.114.95
Last change on this file since 001b4162 was d1f57b5, checked in by Joel Sherrill <joel.sherrill@…>, on 03/03/08 at 23:07:47

2008-03-03 Joel Sherrill <joel.sherrill@…>

  • startup/linkcmds: Add wildcard to gcc_except_table section so programs compiled with gcc 4.3.x can link.
  • Property mode set to 100644
File size: 7.7 KB
RevLine 
[b6394ae]1/*
2 *
[08311cc3]3 *  COPYRIGHT (c) 1989-1999.
[b6394ae]4 *  On-Line Applications Research Corporation (OAR).
5 *
6 *  The license and distribution terms for this file may be
7 *  found in found in the file LICENSE in this distribution or at
[9d2bdb5]8 *  http://www.rtems.com/license/LICENSE.
[b6394ae]9 *
10 *  $Id$
11 */
12
[8961188]13OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
14              "elf32-powerpc")
15OUTPUT_ARCH(powerpc)
16ENTRY(_start)
17/* Do we need any of these for elf?
18   __DYNAMIC = 0;    */
[270ce1ff]19PROVIDE (PSIM_INSTRUCTIONS_PER_MICROSECOND = 10000);   /* 100); */
[847375f]20PROVIDE (CPU_PPC_CLICKS_PER_MS = 16667);
[8961188]21MEMORY
22  {
[847375f]23        RAM : ORIGIN = 0, LENGTH = 8M
[8961188]24        EPROM : ORIGIN = 0xFFF00000, LENGTH = 0x20000
25  }
26
27SECTIONS
28{
[270ce1ff]29  .entry_point_section :
[8961188]30  {
[270ce1ff]31        *(.entry_point_section)
32  } > EPROM
[8961188]33
34  /* Read-only sections, merged into text segment: */
35  /* . = 0x40000 + SIZEOF_HEADERS; */
36  . = 0x4000;
[270ce1ff]37  .interp         : { *(.interp) }
38  .hash           : { *(.hash) }
39  .dynsym         : { *(.dynsym) }
40  .dynstr         : { *(.dynstr) }
41  .gnu.version    : { *(.gnu.version) }
42  .gnu.version_d  : { *(.gnu.version_d) }
43  .gnu.version_r  : { *(.gnu.version_r) }
[8961188]44  .text      :
45  {
[4217b96]46    *(.text*)
[7a42b0ca]47    *(.gnu.linkonce.t.*)
[8961188]48    *(.descriptors)
[9c1133e]49
50    /*
51     * Special FreeBSD sysctl sections.
52     */
53    . = ALIGN (16);
54    __start_set_sysctl_set = .;
55    *(set_sysctl_*);
56    __stop_set_sysctl_set = ABSOLUTE(.);
57    *(set_domain_*);
58    *(set_pseudo_*);
59
[8961188]60    /* .gnu.warning sections are handled specially by elf32.em.  */
61    *(.gnu.warning)
[a524c00]62  } >RAM
[270ce1ff]63  .init           :
64  {
65    KEEP (*(.init))
66  } >RAM =0
[417fca76]67
68  .rel.dyn        :
69    {
70      *(.rel.init)
71      *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
72      *(.rel.fini)
73      *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
74      *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
75      *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
76      *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
77      *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
78      *(.rel.ctors)
79      *(.rel.dtors)
80      *(.rel.got)
81      *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
82      *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
83      *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
84      *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
85      *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
86    } >RAM
87  .rela.dyn       :
88    {
89      *(.rela.init)
90      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
91      *(.rela.fini)
92      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
93      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
94      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
95      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
96      *(.rela.ctors)
97      *(.rela.dtors)
98      *(.rela.got)
99      *(.rela.got1)
100      *(.rela.got2)
101      *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
102      *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
103      *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
104      *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
105      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
106    } >RAM
107  .rel.plt        : { *(.rel.plt) }
108  .rela.plt       : { *(.rela.plt) }
109
[270ce1ff]110  .fini           :
111  {
112    _fini = .;
113    KEEP (*(.fini))
114  } >RAM =0
[85c92574]115  .rodata         : { *(.rodata*) *(.gnu.linkonce.r*) } >RAM
[a524c00]116  .rodata1        : { *(.rodata1)       } >RAM
[270ce1ff]117  PROVIDE (__FRAME_BEGIN__ = .);
[238f450]118  .eh_frame       : { *.(eh_frame)              } >RAM
[270ce1ff]119  PROVIDE (__FRAME_END__ = .);
[847375f]120  PROVIDE (_etext = .);
[8961188]121  PROVIDE (etext = .);
[431bcd75]122_SDA2_BASE_ = __SDATA2_START__ + 0x8000;
[85c92574]123  .sdata2         : { *(.sdata2) *(.gnu.linkonce.s2.*)  } >RAM
124  .sbss2          : { *(.sbss2) *(.gnu.linkonce.sb2.*)  } >RAM
[8961188]125  PROVIDE (__SBSS2_END__ = .);
[270ce1ff]126  /* .eh_frame_hdr : { *(.eh_frame_hdr) } >RAM */
[8961188]127  /* Adjust the address for the data segment.  We want to adjust up to
128     the same address within the page on the next page up.  It would
129     be more correct to do this:
130       . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1));
131     The current expression does not correctly handle the case of a
132     text segment ending precisely at the end of a page; it causes the
133     data segment to skip a page.  The above expression does not have
134     this problem, but it will currently (2/95) cause BFD to allocate
135     a single segment, combining both text and data, for this case.
136     This will prevent the text segment from being shared among
137     multiple executions of the program; I think that is more
138     important than losing a page of the virtual address space (note
139     that no actual memory is lost; the page which is skipped can not
140     be referenced).  */
[3c87bb9c]141  /* . =  ALIGN(8) + 0x40000; */
[8961188]142  .data    :
143  {
[4b27d816]144    *(.data .data.* .gnu.linkonce.d.*)
145    SORT(CONSTRUCTORS)
[a524c00]146  } >RAM
[8961188]147  PROVIDE (__EXCEPT_START__ = .);
[d1f57b5]148  .gcc_except_table   : { *(.gcc_except_table*) } >RAM
[8961188]149  PROVIDE (__EXCEPT_END__ = .);
150
[a524c00]151  .data1          : { *(.data1)         } >RAM
152  .got1           : { *(.got1)          } >RAM
153  .dynamic        : { *(.dynamic)       } >RAM
[8961188]154  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
155     get relocated with -mrelocatable. Also put in the .fixup pointers.
156     The current compiler no longer needs this, but keep it around for 2.7.2  */
[a524c00]157   PROVIDE (__GOT2_START__ = .);
158   PROVIDE (_GOT2_START_ = .);
159  .got2           :  { *(.got2)         } >RAM
160  PROVIDE (__GOT2_END__ = .);
[f35abd4]161  PROVIDE (_GOT2_END_ = .);
[a524c00]162
163  PROVIDE (__CTOR_LIST__ = .);
164  .ctors          : { *(.ctors)         } >RAM
165  PROVIDE (__CTOR_END__ = .);
166
167  PROVIDE (__DTOR_LIST__ = .);
168  .dtors          : { *(.dtors)         } >RAM
169  PROVIDE (__DTOR_END__ = .);
170
171  PROVIDE (__FIXUP_START__ = .);
172  PROVIDE (_FIXUP_START_ = .);
173  .fixup          : { *(.fixup)         } >RAM
174  PROVIDE (_FIXUP_END_ = .);
175  PROVIDE (__FIXUP_END__ = .);
176
[270ce1ff]177  .jcr            : { KEEP (*(.jcr))    } > RAM
178
[a524c00]179  PROVIDE (__GOT_START__ = .);
180  PROVIDE (_GOT_START_ = .);
[8961188]181  s.got = .;
[a524c00]182  .got            : { *(.got)           } >RAM
183  .got.plt        : { *(.got.plt)       } >RAM
184  PROVIDE (_GOT_END_ = .);
185  PROVIDE (__GOT_END__ = .);
186
[8961188]187  /* We want the small data sections together, so single-instruction offsets
188     can access them all, and initialized data all before uninitialized, so
189     we can shorten the on-disk segment size.  */
[431bcd75]190_SDA_BASE_ = __SDATA_START__ + 0x8000;
[4217b96]191  .sdata          : { *(.sdata*) *(.gnu.linkonce.s.*)   } >RAM
[8961188]192  _edata  =  .;
193  PROVIDE (edata = .);
[a524c00]194
[847375f]195  PROVIDE (RAM_END = 0x7f0000);
[8961188]196  .sbss      :
197  {
198    PROVIDE (__sbss_start = .);
[270ce1ff]199    *(.dynsbss)
[4217b96]200    *(.sbss* .gnu.linkonce.sb.*)
[8961188]201    PROVIDE (__sbss_end = .);
[a524c00]202  } >RAM
[8961188]203  PROVIDE (__SBSS_END__ = .);
[a524c00]204
[8961188]205  .bss       :
206  {
207   PROVIDE (__bss_start = .);
208   *(.dynbss)
[bd86290d]209   *(.bss .bss* .gnu.linkonce.b*)
[8961188]210   *(COMMON)
[a524c00]211  } >RAM
[270ce1ff]212  __rtems_end = . ;
[8ddf67e]213  . =  ALIGN(8) + 0x8000;
[9caa3e3]214  PROVIDE(__stack = .);
[3c87bb9c]215  PROVIDE(_end = .);
216  PROVIDE(end = .);
[8961188]217
218  /* These are needed for ELF backends which have not yet been
219     converted to the new style linker.  */
220  .stab 0 : { *(.stab) }
221  .stabstr 0 : { *(.stabstr) }
222  /* DWARF debug sections.
223     Symbols in the DWARF debugging sections are relative to the beginning
224     of the section so we begin them at 0.  */
225  /* DWARF 1 */
226  .debug          0 : { *(.debug) }
227  .line           0 : { *(.line) }
228  /* GNU DWARF 1 extensions */
229  .debug_srcinfo  0 : { *(.debug_srcinfo) }
230  .debug_sfnames  0 : { *(.debug_sfnames) }
231  /* DWARF 1.1 and DWARF 2 */
232  .debug_aranges  0 : { *(.debug_aranges) }
233  .debug_pubnames 0 : { *(.debug_pubnames) }
234  /* DWARF 2 */
235  .debug_info     0 : { *(.debug_info) }
236  .debug_abbrev   0 : { *(.debug_abbrev) }
237  .debug_line     0 : { *(.debug_line) }
238  .debug_frame    0 : { *(.debug_frame) }
239  .debug_str      0 : { *(.debug_str) }
240  .debug_loc      0 : { *(.debug_loc) }
241  .debug_macinfo  0 : { *(.debug_macinfo) }
242  /* SGI/MIPS DWARF 2 extensions */
243  .debug_weaknames 0 : { *(.debug_weaknames) }
244  .debug_funcnames 0 : { *(.debug_funcnames) }
245  .debug_typenames 0 : { *(.debug_typenames) }
246  .debug_varnames  0 : { *(.debug_varnames) }
247  /* These must appear regardless of  .  */
248}
Note: See TracBrowser for help on using the repository browser.