source: rtems/c/src/lib/libbsp/powerpc/psim/startup/linkcmds @ 4217b96

4.104.114.84.95
Last change on this file since 4217b96 was 4217b96, checked in by Joel Sherrill <joel.sherrill@…>, on 02/08/06 at 12:28:38

2006-02-08 Joel Sherrill <joel@…>

  • startup/linkcmds: Add sections required by newer gcc versions.
  • Property mode set to 100644
File size: 8.1 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) }
44  .rel.init       : { *(.rel.init) }
45  .rela.init      : { *(.rela.init) }
46  .rel.text       : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
47  .rela.text      : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
48  .rel.fini       : { *(.rel.fini) }
49  .rela.fini      : { *(.rela.fini) }
50  .rel.rodata     : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
51  .rela.rodata    : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
52  .rel.data       : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
53  .rela.data      : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
54  .rel.tdata      : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
55  .rela.tdata     : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
56  .rel.tbss       : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
57  .rela.tbss      : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
58  .rel.ctors      : { *(.rel.ctors) }
59  .rela.ctors     : { *(.rela.ctors) }
60  .rel.dtors      : { *(.rel.dtors) }
61  .rela.dtors     : { *(.rela.dtors) }
62  .rel.got        : { *(.rel.got) }
63  .rela.got       : { *(.rela.got) }
64  .rela.got1           : { *(.rela.got1) }
65  .rela.got2           : { *(.rela.got2) }
66  .rel.sdata      : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
67  .rela.sdata     : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
68  .rel.sbss       : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
69  .rela.sbss      : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
70  .rel.sdata2     : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
71  .rela.sdata2    : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
72  .rel.sbss2      : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
73  .rela.sbss2     : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
74  .rel.bss        : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
75  .rela.bss       : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
76  .rel.plt        : { *(.rel.plt) }
77  .rela.plt       : { *(.rela.plt) }
[8961188]78  .text      :
79  {
[4217b96]80    *(.text*)
[7a42b0ca]81    *(.gnu.linkonce.t.*)
[8961188]82    *(.descriptors)
[9c1133e]83
84    /*
85     * Special FreeBSD sysctl sections.
86     */
87    . = ALIGN (16);
88    __start_set_sysctl_set = .;
89    *(set_sysctl_*);
90    __stop_set_sysctl_set = ABSOLUTE(.);
91    *(set_domain_*);
92    *(set_pseudo_*);
93
[8961188]94    /* .gnu.warning sections are handled specially by elf32.em.  */
95    *(.gnu.warning)
[a524c00]96  } >RAM
[270ce1ff]97  .init           :
98  {
99    KEEP (*(.init))
100  } >RAM =0
101  .fini           :
102  {
103    _fini = .;
104    KEEP (*(.fini))
105  } >RAM =0
[85c92574]106  .rodata         : { *(.rodata*) *(.gnu.linkonce.r*) } >RAM
[a524c00]107  .rodata1        : { *(.rodata1)       } >RAM
[270ce1ff]108  PROVIDE (__FRAME_BEGIN__ = .);
[238f450]109  .eh_frame       : { *.(eh_frame)              } >RAM
[270ce1ff]110  PROVIDE (__FRAME_END__ = .);
[847375f]111  PROVIDE (_etext = .);
[8961188]112  PROVIDE (etext = .);
113  PROVIDE (__SDATA2_START__ = .);
[85c92574]114  .sdata2         : { *(.sdata2) *(.gnu.linkonce.s2.*)  } >RAM
115  .sbss2          : { *(.sbss2) *(.gnu.linkonce.sb2.*)  } >RAM
[8961188]116  PROVIDE (__SBSS2_END__ = .);
[270ce1ff]117  /* .eh_frame_hdr : { *(.eh_frame_hdr) } >RAM */
[8961188]118  /* Adjust the address for the data segment.  We want to adjust up to
119     the same address within the page on the next page up.  It would
120     be more correct to do this:
121       . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1));
122     The current expression does not correctly handle the case of a
123     text segment ending precisely at the end of a page; it causes the
124     data segment to skip a page.  The above expression does not have
125     this problem, but it will currently (2/95) cause BFD to allocate
126     a single segment, combining both text and data, for this case.
127     This will prevent the text segment from being shared among
128     multiple executions of the program; I think that is more
129     important than losing a page of the virtual address space (note
130     that no actual memory is lost; the page which is skipped can not
131     be referenced).  */
[3c87bb9c]132  /* . =  ALIGN(8) + 0x40000; */
[8961188]133  .data    :
134  {
[4b27d816]135    *(.data .data.* .gnu.linkonce.d.*)
136    SORT(CONSTRUCTORS)
[a524c00]137  } >RAM
[8961188]138  PROVIDE (__EXCEPT_START__ = .);
[a524c00]139  .gcc_except_table   : { *(.gcc_except_table) } >RAM
[8961188]140  PROVIDE (__EXCEPT_END__ = .);
141
[a524c00]142  .data1          : { *(.data1)         } >RAM
143  .got1           : { *(.got1)          } >RAM
144  .dynamic        : { *(.dynamic)       } >RAM
[8961188]145  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
146     get relocated with -mrelocatable. Also put in the .fixup pointers.
147     The current compiler no longer needs this, but keep it around for 2.7.2  */
[a524c00]148   PROVIDE (__GOT2_START__ = .);
149   PROVIDE (_GOT2_START_ = .);
150  .got2           :  { *(.got2)         } >RAM
151  PROVIDE (__GOT2_END__ = .);
[f35abd4]152  PROVIDE (_GOT2_END_ = .);
[a524c00]153
154  PROVIDE (__CTOR_LIST__ = .);
155  .ctors          : { *(.ctors)         } >RAM
156  PROVIDE (__CTOR_END__ = .);
157
158  PROVIDE (__DTOR_LIST__ = .);
159  .dtors          : { *(.dtors)         } >RAM
160  PROVIDE (__DTOR_END__ = .);
161
162  PROVIDE (__FIXUP_START__ = .);
163  PROVIDE (_FIXUP_START_ = .);
164  .fixup          : { *(.fixup)         } >RAM
165  PROVIDE (_FIXUP_END_ = .);
166  PROVIDE (__FIXUP_END__ = .);
167
[270ce1ff]168  .jcr            : { KEEP (*(.jcr))    } > RAM
169
[a524c00]170  PROVIDE (__GOT_START__ = .);
171  PROVIDE (_GOT_START_ = .);
[8961188]172  s.got = .;
[a524c00]173  .got            : { *(.got)           } >RAM
174  .got.plt        : { *(.got.plt)       } >RAM
175  PROVIDE (_GOT_END_ = .);
176  PROVIDE (__GOT_END__ = .);
177
[8961188]178  /* We want the small data sections together, so single-instruction offsets
179     can access them all, and initialized data all before uninitialized, so
180     we can shorten the on-disk segment size.  */
181  PROVIDE (__SDATA_START__ = .);
[4217b96]182  .sdata          : { *(.sdata*) *(.gnu.linkonce.s.*)   } >RAM
[8961188]183  _edata  =  .;
184  PROVIDE (edata = .);
[a524c00]185
[847375f]186  PROVIDE (RAM_END = 0x7f0000);
[8961188]187  .sbss      :
188  {
189    PROVIDE (__sbss_start = .);
[270ce1ff]190    *(.dynsbss)
[4217b96]191    *(.sbss* .gnu.linkonce.sb.*)
[8961188]192    PROVIDE (__sbss_end = .);
[a524c00]193  } >RAM
[8961188]194  PROVIDE (__SBSS_END__ = .);
[a524c00]195
[8961188]196  .bss       :
197  {
198   PROVIDE (__bss_start = .);
199   *(.dynbss)
[4217b96]200   *(.bss* .gnu.linkonce.b.*)
[8961188]201   *(COMMON)
[a524c00]202  } >RAM
[8961188]203  . =  ALIGN(8) + 0x8000;
[270ce1ff]204  __rtems_end = . ;
[9caa3e3]205  PROVIDE(__stack = .);
[3c87bb9c]206  PROVIDE(_end = .);
207  PROVIDE(end = .);
[8961188]208
209  /* These are needed for ELF backends which have not yet been
210     converted to the new style linker.  */
211  .stab 0 : { *(.stab) }
212  .stabstr 0 : { *(.stabstr) }
213  /* DWARF debug sections.
214     Symbols in the DWARF debugging sections are relative to the beginning
215     of the section so we begin them at 0.  */
216  /* DWARF 1 */
217  .debug          0 : { *(.debug) }
218  .line           0 : { *(.line) }
219  /* GNU DWARF 1 extensions */
220  .debug_srcinfo  0 : { *(.debug_srcinfo) }
221  .debug_sfnames  0 : { *(.debug_sfnames) }
222  /* DWARF 1.1 and DWARF 2 */
223  .debug_aranges  0 : { *(.debug_aranges) }
224  .debug_pubnames 0 : { *(.debug_pubnames) }
225  /* DWARF 2 */
226  .debug_info     0 : { *(.debug_info) }
227  .debug_abbrev   0 : { *(.debug_abbrev) }
228  .debug_line     0 : { *(.debug_line) }
229  .debug_frame    0 : { *(.debug_frame) }
230  .debug_str      0 : { *(.debug_str) }
231  .debug_loc      0 : { *(.debug_loc) }
232  .debug_macinfo  0 : { *(.debug_macinfo) }
233  /* SGI/MIPS DWARF 2 extensions */
234  .debug_weaknames 0 : { *(.debug_weaknames) }
235  .debug_funcnames 0 : { *(.debug_funcnames) }
236  .debug_typenames 0 : { *(.debug_typenames) }
237  .debug_varnames  0 : { *(.debug_varnames) }
238  /* These must appear regardless of  .  */
239}
Note: See TracBrowser for help on using the repository browser.