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

Last change on this file since 9348862 was 9348862, checked in by Joel Sherrill <joel.sherrill@…>, on 12/16/03 at 23:17:19

2003-12-16 Ralf Corsepius <corsepiu@…>

PR 533/bsps

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