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

Last change on this file since 606def83 was 606def83, checked in by Joel Sherrill <joel.sherrill@…>, on 12/16/03 at 14:08:39

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

PR 541/bsps

  • startup/linkcmds: Remove SEARCH_DIR.
  • Property mode set to 100644
File size: 6.3 KB
Line 
1/*
2 *
3 *  COPYRIGHT (c) 1989-1999.
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
8 *  http://www.rtems.com/license/LICENSE.
9 *
10 *  $Id$
11 */
12
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);
20PROVIDE (CPU_PPC_CLICKS_PER_MS = 16667);
21MEMORY
22  {
23        RAM : ORIGIN = 0, LENGTH = 8M
24        EPROM : ORIGIN = 0xFFF00000, LENGTH = 0x20000
25  }
26
27SECTIONS
28{
29  .vectors 0xFFF00100 :
30  {
31    *(.vectors)
32  } >EPROM
33
34  /* Read-only sections, merged into text segment: */
35  /* . = 0x40000 + SIZEOF_HEADERS; */
36  . = 0x4000;
37  .interp         : { *(.interp) }
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)    }
57  .plt            : { *(.plt)           }
58  .text      :
59  {
60    *(.text)
61    *(.gnu.linkonce.t.*)
62    *(.descriptors)
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
74    /* .gnu.warning sections are handled specially by elf32.em.  */
75    *(.gnu.warning)
76  } >RAM
77  .init           : { _init = .; __init = .; *(.init)           } >RAM
78  .fini           : { _fini = .; __fini = .; *(.fini)           } >RAM
79  .rodata         : { *(.rodata*) *(.gnu.linkonce.r*) } >RAM
80  .rodata1        : { *(.rodata1)       } >RAM
81  .eh_frame       : { *.(eh_frame)              } >RAM
82  PROVIDE (_etext = .);
83  PROVIDE (etext = .);
84  PROVIDE (__SDATA2_START__ = .);
85  .sdata2         : { *(.sdata2) *(.gnu.linkonce.s2.*)  } >RAM
86  .sbss2          : { *(.sbss2) *(.gnu.linkonce.sb2.*)  } >RAM
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).  */
102  /* . =  ALIGN(8) + 0x40000; */
103  .data    :
104  {
105    *(.data)
106    *(.gnu.linkonce.d.*)
107    CONSTRUCTORS
108  } >RAM
109  PROVIDE (__EXCEPT_START__ = .);
110  .gcc_except_table   : { *(.gcc_except_table) } >RAM
111  PROVIDE (__EXCEPT_END__ = .);
112
113  .data1          : { *(.data1)         } >RAM
114  .got1           : { *(.got1)          } >RAM
115  .dynamic        : { *(.dynamic)       } >RAM
116  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
117     get relocated with -mrelocatable. Also put in the .fixup pointers.
118     The current compiler no longer needs this, but keep it around for 2.7.2  */
119   PROVIDE (__GOT2_START__ = .);
120   PROVIDE (_GOT2_START_ = .);
121  .got2           :  { *(.got2)         } >RAM
122  PROVIDE (__GOT2_END__ = .);
123  PROVIDE (_GOT2_END_ = .);
124
125  PROVIDE (__CTOR_LIST__ = .);
126  .ctors          : { *(.ctors)         } >RAM
127  PROVIDE (__CTOR_END__ = .);
128
129  PROVIDE (__DTOR_LIST__ = .);
130  .dtors          : { *(.dtors)         } >RAM
131  PROVIDE (__DTOR_END__ = .);
132
133  PROVIDE (__FIXUP_START__ = .);
134  PROVIDE (_FIXUP_START_ = .);
135  .fixup          : { *(.fixup)         } >RAM
136  PROVIDE (_FIXUP_END_ = .);
137  PROVIDE (__FIXUP_END__ = .);
138
139  PROVIDE (__GOT_START__ = .);
140  PROVIDE (_GOT_START_ = .);
141  s.got = .;
142  .got            : { *(.got)           } >RAM
143  .got.plt        : { *(.got.plt)       } >RAM
144  PROVIDE (_GOT_END_ = .);
145  PROVIDE (__GOT_END__ = .);
146
147  /* We want the small data sections together, so single-instruction offsets
148     can access them all, and initialized data all before uninitialized, so
149     we can shorten the on-disk segment size.  */
150  PROVIDE (__SDATA_START__ = .);
151  .sdata          : { *(.sdata) *(.gnu.linkonce.s.*)    } >RAM
152  _edata  =  .;
153  PROVIDE (edata = .);
154
155  PROVIDE (RAM_END = 0x7f0000);
156  .sbss      :
157  {
158    PROVIDE (__sbss_start = .);
159    *(.sbss)
160    *(.scommon)
161    *(.gnu.linkonce.sb.*)
162    PROVIDE (__sbss_end = .);
163  } >RAM
164  PROVIDE (__SBSS_END__ = .);
165
166  .bss       :
167  {
168   PROVIDE (__bss_start = .);
169   *(.dynbss)
170   *(.bss)
171   *(COMMON)
172  } >RAM
173  . =  ALIGN(8) + 0x8000;
174  PROVIDE(__stack = .);
175  PROVIDE(_end = .);
176  PROVIDE(end = .);
177
178  /* These are needed for ELF backends which have not yet been
179     converted to the new style linker.  */
180  .stab 0 : { *(.stab) }
181  .stabstr 0 : { *(.stabstr) }
182  /* DWARF debug sections.
183     Symbols in the DWARF debugging sections are relative to the beginning
184     of the section so we begin them at 0.  */
185  /* DWARF 1 */
186  .debug          0 : { *(.debug) }
187  .line           0 : { *(.line) }
188  /* GNU DWARF 1 extensions */
189  .debug_srcinfo  0 : { *(.debug_srcinfo) }
190  .debug_sfnames  0 : { *(.debug_sfnames) }
191  /* DWARF 1.1 and DWARF 2 */
192  .debug_aranges  0 : { *(.debug_aranges) }
193  .debug_pubnames 0 : { *(.debug_pubnames) }
194  /* DWARF 2 */
195  .debug_info     0 : { *(.debug_info) }
196  .debug_abbrev   0 : { *(.debug_abbrev) }
197  .debug_line     0 : { *(.debug_line) }
198  .debug_frame    0 : { *(.debug_frame) }
199  .debug_str      0 : { *(.debug_str) }
200  .debug_loc      0 : { *(.debug_loc) }
201  .debug_macinfo  0 : { *(.debug_macinfo) }
202  /* SGI/MIPS DWARF 2 extensions */
203  .debug_weaknames 0 : { *(.debug_weaknames) }
204  .debug_funcnames 0 : { *(.debug_funcnames) }
205  .debug_typenames 0 : { *(.debug_typenames) }
206  .debug_varnames  0 : { *(.debug_varnames) }
207  /* These must appear regardless of  .  */
208}
Note: See TracBrowser for help on using the repository browser.